Commit Graph

198571 Commits

Author SHA1 Message Date
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
David Rosca
308bae950f ac/surface: Add RADEON_SURF_VIDEO_REFERENCE
Select supported swizzle mode for VCN DPB surfaces.

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
Kenneth Graunke
92797c6878 nir/algebraic: Reassociate fadd into fmul in DP4-like pattern
This extends the optimization from commit 09705747d7 ("nir/algebraic:
Reassociate fadd into fmul in DPH-like pattern") to a chain of 4 ffmas
for a DP4-style pattern.

Moving the add to the other end of the sequence allows it to be fused
into an FMA.

fossil-db results from Alchemist:

   Totals:
   Instrs: 158544142 -> 158490516 (-0.03%); split: -0.04%, +0.00%
   Subgroup size: 7808912 -> 7808920 (+0.00%); split: +0.00%, -0.00%
   Cycle count: 17859550672 -> 17859491966 (-0.00%); split: -0.01%, +0.01%
   Spill count: 84652 -> 84494 (-0.19%); split: -0.37%, +0.18%
   Fill count: 160728 -> 160623 (-0.07%); split: -0.29%, +0.23%
   Scratch Memory Size: 4278272 -> 4272128 (-0.14%); split: -0.29%, +0.14%
   Max live registers: 32411695 -> 32409789 (-0.01%); split: -0.01%, +0.00%
   Max dispatch width: 5627856 -> 5627920 (+0.00%); split: +0.00%, -0.00%
   Non SSA regs after NIR: 185359099 -> 185307703 (-0.03%); split: -0.03%, +0.00%

   Totals from 16378 (2.56% of 640872) affected shaders:
   Instrs: 9818723 -> 9765097 (-0.55%); split: -0.58%, +0.04%
   Subgroup size: 194056 -> 194064 (+0.00%); split: +0.01%, -0.01%
   Cycle count: 294967108 -> 294908402 (-0.02%); split: -0.58%, +0.56%
   Spill count: 10088 -> 9930 (-1.57%); split: -3.09%, +1.53%
   Fill count: 24738 -> 24633 (-0.42%); split: -1.90%, +1.48%
   Scratch Memory Size: 439296 -> 433152 (-1.40%); split: -2.80%, +1.40%
   Max live registers: 1297204 -> 1295298 (-0.15%); split: -0.22%, +0.07%
   Max dispatch width: 133232 -> 133296 (+0.05%); split: +0.14%, -0.10%
   Non SSA regs after NIR: 11999084 -> 11947688 (-0.43%); split: -0.43%, +0.00%

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32197>
2024-12-02 13:15:16 +00:00
Lionel Landwerlin
888f63cf1b anv/iris: leave 4k alignments for clear colors with modifiers
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 17f97a69c1 ("iris: Reduce clear color state alignment to 64B")
Fixes: 063715ed45 ("anv: Reduce clear color state alignment to 64B")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12195
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13057
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32422>
2024-12-02 12:51:45 +00:00
Collabora's Gfx CI Team
52f13f5603 Uprev Piglit to 468221c722481c470e6a23760b914c33143c2af6
d04d6fff00...468221c722

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32272>
2024-12-02 12:13:05 +00:00
Sergi Blanch Torne
a4e3ff0464 Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit fd14b34923.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32420>
2024-12-02 11:38:20 +00:00
Michel Dänzer
8197111881 winsys/amdgpu: Always use amdgpu_device_get_fd for aws->fd
If the caller passed in the same DRM file description, use it for sws->fd
as well. This is simpler than the previously reverted commit and also
fixes https://gitlab.freedesktop.org/mesa/mesa/-/issues/12208.

v2:
* Move fallback sws->fd assignment to proper scope, fixes CI failures.
* Remove close(sws->fd) from amdgpu_winsys_create failure path, it can
  never be a valid file descriptor != aws->fd there.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32377>
2024-12-02 10:38:22 +00:00