Commit graph

201327 commits

Author SHA1 Message Date
Eric R. Smith
fc3cfaa4aa panfrost: add a perf warning when resources need to be converted
This is a minor debugging aid.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30243>
2024-12-02 19:49:58 +00:00
Alyssa Rosenzweig
56acdca86d hk: claim 1.4
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:47 +00:00
Alyssa Rosenzweig
3f5086016b hk: implement timestamps
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:47 +00:00
Alyssa Rosenzweig
55cd987de2 asahi: fix agxdecode memory mapping
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:47 +00:00
Asahi Lina
fbb38a30a6 asahi: Add timestamp buffer ops
TODO: virt support (needs virglrenderer changes & virt ABI break)

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Asahi Lina
6697fb26ed asahi: UAPI update to add support for user timestamp buffers
Signed-off-by: Asahi Lina <lina@asahilina.net>
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
751bd986fb asahi: add =bodump debug help
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
8caddd2ca1 asahi: fix agx_batch_add_bo
when we have exactly POT BOs. fixes crash in portal 2. oh lord.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
f34cd9e966 asahi: add more asserts around bo add
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
f98971e776 asahi,hk: mmap BO on first use
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
e7b3dcb9f7 asahi: label individual pools
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
09c8520293 asahi: fix u_blitter related leaks
see also 689f38b2b4 ("panfrost: fix refcnt imbalance related to blitter")

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
d49f0786c8 asahi: fix page size alignment
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
59b0dd7c64 asahi: drop dead
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Asahi Lina
07e836b932 asahi: Fix agx_gpu_time_to_ns & implement DRM_ASAHI_GET_TIME
agx_gpu_time_to_ns() was broken since it was overflowing the u64
timestamp after just ~10 minutes. Fix that by automatically computing a
reduced conversion fraction, and add support for DRM_ASAHI_GET_TIME
where supported (replacing the CPU timer hack).

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Asahi Lina
925eca02c4 asahi: UAPI update to add GET_TIME & cleanup
Also fix editor config for this file & disable clang-format, to make
syncing with the kernel easier.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
d894941895 hk,asahi,libagx: unify a bit of code
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
b41b7e6bc8 asahi: don't leak rodata
needs a bigger refactor but that's not a right now problem.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
1ac82c8d24 asahi: drop dead pool stuff
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
fe92abf82b agx: reduce preamble/main alignment
this was overkill.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
91ce434103 agx: disable bounds check optimization
fixes Fallout 4. needs more investigation when we have better debug tooling.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
2b3b0cd339 hk: clarify bounds check calculations
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
4d4f82b739 hk: implement hack for layered no attachments
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
4386150ab3 hk: fix z bias perf regression
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
57447cbb82 hk: fix incorrect index size translate
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
be8a24f3b2 asahi: crash on fault
now that we have soft fault we don't need this w/a to pass cts, and this will
help us with avoiding flakes in other places.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
ecd94113ca libagx: increase wg size for query copy
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Simon Ser
105fcb9cfd dri: revert INVALID modifier special-casing
Commit 361f362258 ("dri: Unify createImage and createImageWithModifiers")
has introduced new behavior for drivers which don't support explicit
format modifiers. Before this commit, INVALID was not special-cased
and any call to dri_create_image() with one or more modifiers returned
NULL. After this commit, INVALID gained a special meaning: it indicates
that the implicit modifier is accepted by the caller. This is surprising
and is an API break.

This causes further API breaks: for instance, before this commit a BO
created via gbm_bo_create_with_modifiers() was guaranteed to always
return a non-INVALID modifier in gbm_bo_get_modifier().

This is inconsistent with gbm_dri_surface_create(): that function
treats INVALID as a bad entry in the modifier list, and fails if
it's the only acceptable modifier.

Additionally, drivers don't special-case INVALID and just ignore it
if they see it in a modifier list. This causes more inconsistencies.
For instance, let's say that a library user passes the modifier list
{ INVALID, FOO } to GBM. If a driver supports explicit modifiers and
doesn't support FOO for scanout, it'll return NULL. If a driver
doesn't support explicit modifiers, the current logic would return
a non-NULL BO with an INVALID modifier. This discrepency makes it
harder to reason about the system: half of the API ignores INVALID,
while the other half assumes INVALID indicates an implicit modifier.

To fix these issues, revert to the behavior before the commit, and
require use of the dedicated API without supplying any modifier for
implicit modifiers.

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: 361f362258 ("dri: Unify createImage and createImageWithModifiers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32396>
2024-12-02 18:42:59 +00:00
Connor Abbott
1b42bc76da ir3: Fix reload_live_out() in shared RA
We never split live ranges, so we don't need to store the location of
each live value when recording live outs, but the physreg assigned to a
register will still be clobbered when we reload it so we have to record
the original physreg and then make sure to use it when reloading the
live out.

We probably never encountered a case where we needed to reload live outs
in a loop before, but after enabling clustered subgroup reductions
dEQP-VK.subgroups.clustered.compute.subgroupclusteredmin_{i,u}64vec4_requiredsubgroupsize
hits this case and fails in RA validation without this fix.

Fixes: fa22b0901a ("ir3/ra: Add specialized shared register RA/spilling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32435>
2024-12-02 18:06:18 +00:00
Faith Ekstrand
173171f73e nvk: Advertise Vulkan 1.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
2024-12-02 17:22:49 +00:00
Faith Ekstrand
dbf4424d07 nvk: Add new Vulkan 1.4 features and properties
These are the features and properties that don't already exist in
extensions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
2024-12-02 17:22:49 +00:00
Faith Ekstrand
f9e993dfaf nvk: No-op implement VK_KHR_global_priority
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
2024-12-02 17:22:49 +00:00
Faith Ekstrand
0819e04f21 nvk: Increase push constant space to 256B
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
2024-12-02 17:22:49 +00:00
Faith Ekstrand
218fff2d5c vulkan: Update XML and headers to 1.4.303
Also fix vk_cmd_queue generation for dropped KHR suffixes

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
2024-12-02 17:22:49 +00:00
Faith Ekstrand
2fae75b278 treewide: Stop putting enum in front of Vulkan enum types
The Vulkan headers add typedefs to fix aliasing issues whenever a type
gets renamed.  However, C doesn't allow "enum typedef" so this doesn't
work if people stick the "enum" keyword in front.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
2024-12-02 17:22:49 +00:00
Faith Ekstrand
54aeff37ee vulkan: Add Vulkan 1.4 feature aliases
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
2024-12-02 17:22:49 +00:00
Faith Ekstrand
6fe6c42903 vulkan: Allow the same item to show up twice in core version <requires>
The way the XML is being organized these days, they're doing one
<requires> section for each promoted thing and if something gets
promoted twice by different extensions.  As long as we grab the lowest
of those core versions, we should be fine.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
2024-12-02 17:22:49 +00:00
Job Noorman
25eee91016 ir3: add reformatting commits to .git-blame-ignore-revs
Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32429>
2024-12-02 16:44:50 +00:00
Bas Nieuwenhuizen
0702c554de util/perf: Fix some warnings.
Warnings about long unsigned vs. long long unsigned, so lets use the proper thing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32019>
2024-12-02 15:15:52 +00:00
Christian Gmeiner
105fbaab49 v3dv: Switch to use libbroadcom_perfcntr
Switch to a common library that does all the performance counter
readout. This converts one version-dependend file to a generic one.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32277>
2024-12-02 14:13:24 +00:00
Christian Gmeiner
bb3fc7a44f v3d: Switch to use libbroadcom_perfcntrs
Switch to a common library that does all the performance counter
readout. This converts one version-dependend file to a generic one.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32277>
2024-12-02 14:13:24 +00:00
Christian Gmeiner
e531e9d616 broadcom: Add perfcount library
Copy the code from the gallium driver into a small library located
in src/broadcom.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32277>
2024-12-02 14:13:24 +00:00
Christian Gmeiner
5d186d1386 v3dv: Switch to v3d_X(..)
Use the common helper.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32277>
2024-12-02 14:13:24 +00:00
Christian Gmeiner
3b4636c769 v3d: Move v3d_X(..) to src/broadcom/common
It will be re-used by libbroadcom_perfcntrs

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32277>
2024-12-02 14:13:24 +00:00
Christian Gmeiner
787da655d1 v3dv: Switch to v3d_ioctl(..)
Use the common helper.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32277>
2024-12-02 14:13:24 +00:00
Christian Gmeiner
0d4313951f v3d: Move v3d_ioctl(..) to src/broadcom/common
It will be re-used by libbroadcom_perfcntrs.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32277>
2024-12-02 14:13:23 +00:00
Christian Gmeiner
fadcea80c0 broadcom/common: Make v3d_device_info.h usable for C++
We need it for our pps ds.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32277>
2024-12-02 14:13:23 +00:00
David Rosca
4da1756be4 radeonsi/vcn: Create encode DPB surfaces with PIPE_BIND_VIDEO_ENCODE_DPB
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32303>
2024-12-02 13:48:22 +00:00
David Rosca
7d27de70af radeonsi/vcn: Create decode DPB surfaces with PIPE_BIND_VIDEO_DECODE_DPB
Always use surface for DPB now that it is not GFX12 only.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32303>
2024-12-02 13:48:22 +00:00
David Rosca
1d206ca94c radeonsi: Support PIPE_BIND_VIDEO_DECODE/ENCODE_DPB
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32303>
2024-12-02 13:48:22 +00:00