Commit graph

196359 commits

Author SHA1 Message Date
Pavel Ondračka
4e4b124fa9 r300: add .clang-format file for the compiler
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Acked-by: :Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23771>
2024-10-15 09:24:02 +00:00
Mary Guillemard
b12c294e7b panvk: Define primitive size for RUN_TILER/RUN_IDVS
We were ignoring line width with line topologies.

This also force a value of 1.0f in case point topology is in use while
no write in shader is being performed to respect maintenance5
requirements.

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/31623>
2024-10-15 08:50:19 +00:00
Iago Toral Quiroga
188f1c6cbe v3dv: rewrite device identification
Instead of trying to match device compatible strings like 'brcm,2712-v3d',
which may change with product revisions, match the device name, like 'v3d'.
This simplifies a bit the matching logic and allows us to have less
diverging paths for hardware and simulator.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31619>
2024-10-15 07:57:51 +00:00
Iago Toral Quiroga
23432921b3 v3dv: drop device_id field
This was added only to report the DRM device ID of the actual
GPU used in the simulated environment but there is no real
reason we need to do that, so let's juts keep it simple and
provide the device ID of the simulated device instead.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31619>
2024-10-15 07:57:51 +00:00
Tapani Pälli
a3c03b6a96 mesa: fix DXT1 support with EXT_texture_compression_dxt1
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11987
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31540>
2024-10-15 07:19:55 +00:00
Utku Iseri
271fdedc5a st/mesa: clamp reported max lod bias
mesa clamps lod bias values to -32,31 during quantization,
so the reported max value should also be limited to 31.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11977
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31525>
2024-10-15 06:38:48 +00:00
Marek Olšák
0727634443 nir/opt_load_store_vectorize: vectorize load_smem_amd
radeonsi+ACO with the new vectorization callback:

TOTALS FROM AFFECTED SHADERS (19508/58918)
  VGPRs: 708672 -> 708864 (0.03 %)
  Code Size: 31458688 -> 31217160 (-0.77 %) bytes
  Max Waves: 305960 -> 305952 (-0.00 %)

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29398>
2024-10-15 05:50:24 +00:00
Marek Olšák
a44e5cfccf nir/opt_load_store_vectorize: allow a 4-byte hole between 2 loads
If there is a 4-byte hole between 2 loads, drivers can now optionally
vectorize the loads by including the hole between them, e.g.:
    4B load + 4B hole + 8B load --> 16B load

All vectorize callbacks already reject all holes, but AMD will want to
allow it.

radeonsi+ACO with the new vectorization callback:

TOTALS FROM AFFECTED SHADERS (25248/58918)
  VGPRs: 871116 -> 871872 (0.09 %)
  Spilled SGPRs: 397 -> 407 (2.52 %)
  Code Size: 43074536 -> 42496352 (-1.34 %) bytes

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29398>
2024-10-15 05:50:24 +00:00
Marek Olšák
80c156422d nir/opt_load_store_vectorize: allow overfetching, merge overfetched loads
New load merging transformations (first, second), examples:
    (vec4, vec3) ==> vec8(read=0x7f) (because NIR doesn't have vec7)
    (vec1, vec8(read=0x7f)) ==> vec8(read=0xff)
    - the unused component at the end of vec8 is dropped

Not merged:
    vec8(read=0xfe) + vec1
    - unused components at the beginning are kept

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29398>
2024-10-15 05:50:24 +00:00
Marek Olšák
65ace5649b nir: reject unsupported component counts from all vectorize callbacks
If you allow an unsupported component count in the callback for loads,
nir_opt_load_store_vectorize will align num_components to the next supported
vector size, essentially overfetching.

This changes all callbacks to reject it. AMD will enable it in a later commit.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29398>
2024-10-15 05:50:24 +00:00
Marek Olšák
02923e237d nir: add hole_size parameter into the vectorize callback
It will be used to allow merging loads with a hole between them.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29398>
2024-10-15 05:50:24 +00:00
Marek Olšák
8ce43b7765 nir/opt_load_store_vectorize: add entry::num_components
We will represent vec6..vec7, vec9..vec15 loads with 8 and 16
components respectively, so we need to track how many components
we really use.

This is a prerequisite for optimal merging up to vec16. Example:
    Step 1: vec4 + vec3 ==> vec7as8 (last component unused)
    Step 2: vec1 + vec7as8 ==> vec8 (last unused component dropped)

Without using the number of components read, the same example would end up
doing:
    Step 1: vec4 + vec3 ==> vec8
    Step 2: vec1 + vec8 ==> vec9 (fail)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29398>
2024-10-15 05:50:24 +00:00
Alyssa Rosenzweig
e9303c0952 nir: extract round component helper
another nir pass will use this.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29398>
2024-10-15 05:50:24 +00:00
Faith Ekstrand
c2684968de nvk: Advertise 64-bit atomics on buffer views
We also add an nvk_format_supports_atomics() helper.  This helper lives
in NVK for now because it's not just about the format and hardware but
also about whether or not we have compiler support in NAK.

Fixes: 1d10de539c ("nvk: Implement VK_EXT_shader_image_atomic_int64")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31633>
2024-10-15 05:21:03 +00:00
Faith Ekstrand
d3d8271620 nvk: Re-sort the features table
There were a couple of KHR extensions that got mixed in with the EXTs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31633>
2024-10-15 05:21:03 +00:00
Faith Ekstrand
681f807747 nvk: Only set texture/sampler tables and SLM for enabled engines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31633>
2024-10-15 05:21:02 +00:00
Faith Ekstrand
7ae2cc7f0a nvk: Add an nvkmd_engines bitfield to nvk_queue
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31633>
2024-10-15 05:21:02 +00:00
Serdar Kocdemir
1efbfd370b gfxstream: Use KHR version of the line_rasterization extension
Vulkan headers are exposing KHR version of the extension. Without this
change, codegen won't generate the necessary guest code, and the calls
with the extension structures will be skipped, causing dEQP failures.

Test: dEQP-VK.api.info.vulkan1p2_limits_validation*

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31650>
2024-10-15 04:49:06 +00:00
Marek Olšák
64c4d29e65 nir/opt_vectorize_io: fix stack buffer overflow with 16-bit output stores
uncovered by unrelated work

Fixes: 2514999c9c - nir: add nir_opt_vectorize_io, vectorizing lowered IO

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31644>
2024-10-15 03:59:17 +00:00
Timothy Arceri
46facf9037 nir/glsl: set cast mode for image during function inlining
Fixes: d681cf96fb ("nir/glsl: set deref cast mode during function inlining")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11980

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31554>
2024-10-15 03:13:24 +00:00
Chia-I Wu
b0a378374b panvk: advertise VK_EXT_physical_device_drm
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31635>
2024-10-15 00:34:04 +00:00
Chia-I Wu
fbea9ab3b8 panvk: query device ids of drm device nodes
They are needed for VK_EXT_physical_device_drm.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31635>
2024-10-15 00:34:04 +00:00
Chia-I Wu
6df3a0af4b panvk: refactor panthor_kmod_dev creation
Move pan_kmod_dev creation code to create_kmod_dev.  It also fixes
double close of render fd on errors, if the render fd ownership has been
transferred to pan_kmod_dev.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31635>
2024-10-15 00:34:04 +00:00
Chia-I Wu
620a2f17d0 panvk: remove unused panvk_physical_device::master_fd
panvk does not and could not support VK_KHR_display.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31635>
2024-10-15 00:34:04 +00:00
José Roberto de Souza
ab12e01af6 intel/perf: Add BMG OA support
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30982>
2024-10-14 23:54:04 +00:00
José Roberto de Souza
aa2f9b72b2 intel/perf: Sync oa-lnl.xml
IGT have sync the oa-lnl.xml with latest OA definitions.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30982>
2024-10-14 23:54:04 +00:00
Alessandro Astone
2c79e01259 panvk: Add missing headers to android platform
Fixes: 2de95773b9 ("panvk: Kill panvk_private.h")

Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31610>
2024-10-14 23:09:03 +00:00
David Heidelberg
321012b95d osmesa: Fix OSMesaGetDepthBuffer() test without depth
Correct copy-paste typo of depth_cpp instead of depth and use nullptr
instead of NULL, as GTest suggest in documentation:

When comparing a pointer to NULL, use EXPECT_EQ(ptr, nullptr) instead of EXPECT_EQ(ptr, NULL).

Fixes: ef9362acb8 ("gallium/osmesa: Return cleanly for OSMesaGetDepthBuffer() with no depth.")
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31606>
2024-10-14 22:10:55 +00:00
Konstantin Seurer
70a1453537 nir/print: Fix the alignment of 8-bit definitions
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31612>
2024-10-14 21:21:04 +00:00
Jordan Justen
0530d4d59d intel/dev: Add 0xb640 ARL PCI id
Backport-to: 24.2
Ref: 35667a0330
Ref: bspec 55420
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31618>
2024-10-14 19:43:35 +00:00
Sergi Blanch Torne
e8e8c17a0c Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit 98f2a55eda.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31620>
2024-10-14 19:02:59 +00:00
Erik Faye-Lund
620739ebc4 panvk: expose KHR_external_fence and KHR_external_fence_capabilities
These seems to already be implemented, let's expose them!

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31487>
2024-10-14 18:33:29 +00:00
Erik Faye-Lund
17b81d1fdc panvk: expose KHR_external_memory and KHR_external_memory_capabilities
Seems to be implemented already, let's expose them!

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31487>
2024-10-14 18:33:29 +00:00
Erik Faye-Lund
f18bab24eb panvk: expose KHR_external_semaphore and KHR_external_semaphore_capabilities
These seem to already be implemented, so let's expose them.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31487>
2024-10-14 18:33:29 +00:00
Erik Faye-Lund
76172b8ebd docs/features: fix bad sorting of drivers
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31487>
2024-10-14 18:33:29 +00:00
Erik Faye-Lund
c144e065a7 panvk: expose KHR_bind_memory2 support
This seems to already be implemented, so let's expose it...

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31487>
2024-10-14 18:33:29 +00:00
Erik Faye-Lund
1e9788e20f panvk: expose KHR_relaxed_block_layout support
There's nothing that prevents this AFAIK, so let's just expose it.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31487>
2024-10-14 18:33:29 +00:00
Erik Faye-Lund
9940702477 panvk: implement and expose KHR_maintenance2
All we were missing were VK_IMAGE_CREATE_EXTENDED_USAGE_BIT, let's
implement that and enable the extension.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31487>
2024-10-14 18:33:29 +00:00
Samuel Pitoiset
56813236f4 radv: use app names instead of exec name for shader based drirc workarounds
Otherwise, they aren't applied if shaders are pre-compiled using
builders because the executable name would be fossilize-replay.

Using pApplicationName is the correct way to do because it's replayed
by Fossilize correctly.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31621>
2024-10-14 17:56:20 +00:00
Pavel Ondračka
0a81dc8782 r300/ci: add deqp and piglit on RV410
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30137>
2024-10-14 17:25:53 +00:00
Pavel Ondračka
bb3eb60c0c r300/ci: share some common variables
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30137>
2024-10-14 17:25:53 +00:00
David Heidelberg
d14d3c5bdd amd: Pass addrlib cpp args to the tests
The declaration and definition used by tests otherwise differs from
addrlib.
Found by LTO -Werror=lto-type-mismatch.

Fixes: 1d69c0419b ("amd/addrlib: prevent defining regparm differently")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31613>
2024-10-14 16:52:31 +00:00
Alejandro Piñeiro
e965dfd90b panfrost: make DRM version panfrost/panthor conditional on drm-shim
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31542>
2024-10-14 15:31:36 +00:00
Alejandro Piñeiro
6a6a8c6cff panfrost: add support for DRM_PANTHOR_DEV_QUERY_TIMESTAMP_INFO on drm-shim
In opposite to other DRM_PANTHOR_DEV_QUERY queries, it just fills it
with noop values. Real values doesn't seem relevant on the usual uses
for drm-shim.

This avoids the following error when using shader-db:
  $ ./run shaders/glmark/1-1.shader_test
  Unknown DRM_IOCTL_PANTHOR_DEV_QUERY 2
  MESA: error: DRM_IOCTL_PANTHOR_DEV_QUERY failed (err=2)

As we are here we also add DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO
support.

Fixes: 302127fe9d ("pan/kmod: Add timestamp uapi support")

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31542>
2024-10-14 15:31:36 +00:00
Sergi Blanch Torne
281d135810 ci: run shellcheck when changes on scripts to check
The 'yaml-toml-shell-test' job has a task to review the CI shell files. So,
we need this job present when there is a change on any of those shells.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31627>
2024-10-14 13:50:26 +00:00
Sergi Blanch Torne
abb29959ee ci: shellcheck requires better 'boolean or' syntax
Some merge requests are failing due to `.gitlab-ci/run-shellcheck.sh` failing
on the 'yaml-toml-shell-test' because an 'or', on an elif, in the meson's
build needs to be reformulated.

Fixes: afab416be4 ("ci: enable IPO/LTO only for nightly builds")

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Acked-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31627>
2024-10-14 13:50:26 +00:00
Faith Ekstrand
f33e18ab39 vulkan/queue: Check for _mem_signal_temp before we submit
vk_queue_push_submit() takes ownership of the vk_queue_submit object and
potentially passes it to another thread.  This fixes a race where, if
the other thread processes and deletes the vk_queue_submit before we get
to checking _mem_signal_temp, we may have a use-after-free.

Fixes: c95b646e23 ("vulkan/queue: Use _mem_signal_temp instead of signal_mem_sync")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11988
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31597>
2024-10-14 13:13:15 +00:00
Christian Gmeiner
980d0e2d06 docs: Update the list of drivers with CPU tracepoints
v3d and vc4 gained support for this feature.

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/31575>
2024-10-14 12:21:51 +00:00
Christian Gmeiner
63f0a2f9a0 vc4: Add a few function traces
Sprinkle around a few traces that were useful in locating submit and
fence waits.

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/31575>
2024-10-14 12:21:51 +00:00
Christian Gmeiner
cf939334e6 v3d: Add a few function traces
Sprinkle around a few traces that were useful in locating submit and
fence waits.

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/31575>
2024-10-14 12:21:51 +00:00