Commit graph

186524 commits

Author SHA1 Message Date
Yogesh Mohan Marimuthu
c7e8486130 winsys/amdgpu: rws instead of ws for radeon_winsys
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27968>
2024-03-15 18:06:55 +00:00
Yogesh Mohan Marimuthu
f2275eed44 winsys/amdgpu: sws instead of ws for amdgpu_screen_winsys
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27968>
2024-03-15 18:06:55 +00:00
Valentine Burley
92879e9da8 docs/features: Add missing VK_EXT_surface/swapchain_maintenance1 entry
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28203>
2024-03-15 17:48:30 +00:00
Valentine Burley
5bde82b353 nvk: Expose VK_EXT_swapchain_colorspace
This extension is basically a no-op exposing some new enums.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28203>
2024-03-15 17:48:29 +00:00
Valentine Burley
68e93cce5e nvk: Expose VK_EXT_surface/swapchain_maintenance1
Passes dEQP-VK.wsi.*.maintenance1.*.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28203>
2024-03-15 17:48:29 +00:00
Valentine Burley
547636dc43 nvk: Expose VK_EXT_display_control
Use the common implementation.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28203>
2024-03-15 17:48:29 +00:00
Valentine Burley
3da1c0b6c9 nvk: Fix missing implementation of creating images from swapchains
These pNext structs are part of VK_KHR_swapchain which is core Vulkan
1.1 but they were missing. Based on ANV and RADV.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10806

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28203>
2024-03-15 17:48:29 +00:00
Pavel Ondračka
092299f18a r300: remove some late NIR passes
Some of those are no longer needed after moving the sin/cos input fixups
to finalize_nir, while others were are just some unneeded remnants from
nir_to_tgsi era.

Almost no shader-db change on RV530:
total instructions in shared programs: 128940 -> 128939 (<.01%)
instructions in affected programs: 154 -> 153 (-0.65%)
helped: 3
HURT: 2
total cycles in shared programs: 197402 -> 197401 (<.01%)
cycles in affected programs: 263 -> 262 (-0.38%)
helped: 3
HURT: 2

or RV370:
total instructions in shared programs: 83946 -> 83944 (<.01%)
instructions in affected programs: 32 -> 30 (-6.25%)
helped: 2
HURT: 0
total cycles in shared programs: 132829 -> 132827 (<.01%)
cycles in affected programs: 93 -> 91 (-2.15%)
helped: 2
HURT: 0

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28070>
2024-03-15 17:28:32 +00:00
Pavel Ondračka
d430225b29 r300: move sin/cos input fixups to finalize_nir
RV530 shader-db (and similarly R420):
total instructions in shared programs: 129022 -> 128940 (-0.06%)
instructions in affected programs: 4142 -> 4060 (-1.98%)
helped: 48
HURT: 10
total cycles in shared programs: 197475 -> 197402 (-0.04%)
cycles in affected programs: 4906 -> 4833 (-1.49%)
helped: 45
HURT: 10
total temps in shared programs: 17551 -> 17543 (-0.05%)
temps in affected programs: 71 -> 63 (-11.27%)
helped: 8
HURT: 0
total consts in shared programs: 94392 -> 94358 (-0.04%)
consts in affected programs: 2963 -> 2929 (-1.15%)
helped: 35
HURT: 1

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28070>
2024-03-15 17:28:32 +00:00
Pavel Ondračka
ba1bc94233 r300: explicitly check if sin/cos input is already in correct range
before applying the input range normalization. This allows to move the pass
to finalize nir later without worrying we would apply the fixup twice and
also saves few instructions in wined3d shaders, where d3d9 already
guarantees the correct input range.

RV530 shader-db (and similarly for R4xx) improves few Anno1404 shaders:
total instructions in shared programs: 129040 -> 129022 (-0.01%)
instructions in affected programs: 310 -> 292 (-5.81%)
helped: 5
HURT: 0

no change on RV370

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28070>
2024-03-15 17:28:32 +00:00
Samuel Pitoiset
67fd490fe5 radv: add a GPU hang workaround for legacy tess+GS for GFX10.3
Ported from RadeonSI ea94cb95e4
("radeonsi/gfx10.3: add a GPU hang workaround for legacy tess+GS")

Fixes: a23802bcb9 ("ac,radeonsi: start adding support for gfx10.3")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28165>
2024-03-15 16:38:14 +00:00
Samuel Pitoiset
96e9c3fe77 radv: program SAMPLE_MASK_TRACKER_WATERMARK optimally for GFX11 APUs
Ported from RadeonSI 6ce3a95852
("radeonsi/gfx11: program SAMPLE_MASK_TRACKER_WATERMARK optimally for APUs")

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28165>
2024-03-15 16:38:14 +00:00
Samuel Pitoiset
d81809618f radv: fix programming of PA_SC_BINNER_CNTL_1.MAX_ALLOC_COUNT on GFX11
Ported from RadeonSI 7d3a414662
("radeonsi/gfx11: fix programming of PA_SC_BINNER_CNTL_1.MAX_ALLOC_COUNT")

Fixes: 25a66477d0 ("radeonsi/gfx11: register changes")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28165>
2024-03-15 16:38:14 +00:00
Samuel Pitoiset
8203284c03 radv: disable binning correctly on GFX11.5
Ported from RadeonSI 20445f296b
("radeonsi: disable binning correctly on gfx11.5").

Fixes: b44a886b84 ("amd/common: add registers for gfx11.5")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28165>
2024-03-15 16:38:14 +00:00
Yonggang Luo
680e707534 treewide: Replace the invalid usage #if DEBUG with #ifdef DEBUG
This is done by find&replace and exclude the following folders in vscode
docs,*.rs,addrlib,src/imgui,*.sh,src/intel/vulkan/grl/gpu

This is a prepare step for re-working https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21946

These issues are found when to try switch DEBUG to MESA_DEBUG=0|1 in MR

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28092

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28083>
2024-03-15 16:08:18 +00:00
Friedrich Vock
3f1cb470f0 radeonsi: Only enable SEs that the device reports
Matches PAL behavior.

Cc: mesa-stable
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28196>
2024-03-15 13:23:34 +00:00
nyanmisaka
bad41f4db7 frontends/va: Report vendor and device ID through VADisplayPCIID
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18718>
2024-03-15 13:05:27 +00:00
Eric Engestrom
7c480c2066 nouveau/ci: only trigger jobs for relevant changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28204>
2024-03-15 12:49:20 +00:00
Eric Engestrom
67bb74863d nouveau/ci: fix yaml indentation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28204>
2024-03-15 12:49:20 +00:00
Eric Engestrom
4e3f3c10e1 nouveau: add missing vl lib
It's always been missing since the conversion to meson.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10792
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28133>
2024-03-15 12:28:13 +00:00
Rohan Garg
656f590bf5 iris,anv: WA 1509820217 is no impact for Xe2+
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28201>
2024-03-15 12:02:45 +00:00
Eric Engestrom
5b3cb226b1 ci: include all the src/**/gitlab-ci.yml files
No risk of getting it wrong, and this means adding the upcoming ones
will no longer trigger a full CI.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28202>
2024-03-15 11:22:54 +00:00
duncan.hopkins
5fabb66f59 dri: guarded DRI code.
Added code guards that isolate DRM code paths so platformss that do not have DRM libraries can compile.
MacOS does not have vf86drm library and headers.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
2024-03-15 10:50:12 +00:00
duncan.hopkins
fcd0b4c94a util: Updated util/libdrm.h stubs with drmGetMagic()
Update adds in missing items that MacOS code needs to compile and run the DRI2 code.

New code is copied from the public repository: https://gitlab.freedesktop.org/mesa/drm/-/blob/main/xf86drm.h

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
2024-03-15 10:50:12 +00:00
duncan.hopkins
8ad4862126 gallium/dri: Added XCB dependency to frontends/dri/libdrm build. Fix header issues with xcb.h being used.
On systems where the xcb.h is not in the standard prefixed location,
meson needs to be told where to find it.
Adding the `dep_xcb` to the `libdri`build fixes this.

This issue happened on macOS when the brew package manager was not in the default location.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
2024-03-15 10:50:12 +00:00
duncan.hopkins
00e1562f5b gallium/dri: Switch xf86drm.h for util/libdrm.h to allow for the no-op shim to be used.
This patch allows MacOS to compile the dri[2] systems by switching from direct xf86drm.h to
the pre-existing util/libdrm.h.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
2024-03-15 10:50:12 +00:00
duncan.hopkins
1d9215f904 egl: Changed EGLNativeDisplayType size check to make sure it is big enough instead of exactly the same size.
MacOS uses a smaller EGLNativeDisplayType than 'void*', which is big enough for the storage.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
2024-03-15 10:50:12 +00:00
duncan.hopkins
4477139ec2 egl: Added DRI3 code guards.
MacOS does not have any DRI3 libraries, these code guards hide the code paths
the fail to compile without DRI3.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
2024-03-15 10:50:11 +00:00
duncan.hopkins
275fdf709d egl: MacOS platform guard around pthread_condattr_setclock()
This patch disabled the call to pthread_condattr_setclock on MacOS/Apple platforms.
This funciton is missing from the the Xcode pthread implemetation.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
2024-03-15 10:50:11 +00:00
duncan.hopkins
8387deff87 compiler/clc: fix compiler issue on MacOS with st_mtim[e] in stat.
MacOSs 'sys/stat.h' version of 'stat' doe snot have the 'st_mtim' that is used on other systems.
The change allows MacOS to use 'st_mtime' without affecting the behaviour on any other platform.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
2024-03-15 10:50:11 +00:00
Samuel Pitoiset
6146a1651a radv: emit VGT_GS_OUT_PRIM_TYPE as part of the dynamic primitive topology
With pipelines, the topology class is known at creation time but with
ESO this needs to be re-emitted when the topology change and not only
when graphics shaders are emitted.

This fixes spec@nv_primitive_restart@primitive-restart-* with Zink
when shader object is enabled.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28179>
2024-03-15 09:26:33 +00:00
Samuel Pitoiset
ccf894f29c radv: fix RADV_PERFTEST=dmashaders with ESO
Update the shader upload sequence when individual shaders are bound
to fix that.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28154>
2024-03-15 08:10:59 +00:00
Samuel Pitoiset
dd0b4f05ad radv: add helpers to bind the GS copy shader and the RT prolog
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28154>
2024-03-15 08:10:59 +00:00
Friedrich Vock
cc61409ea6 radv: Only enable SEs that the device reports
Matches PAL behavior.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28195>
2024-03-15 07:31:34 +00:00
Caio Oliveira
bfdcddfda9 intel/tools: Make intel_stub_gpu work when using meson devenv
When `meson devenv` is used, the shim library that is meant to be
preloaded is not necessarily available at the installation dir.  So
when running in that mode both the script and the shim library will
be in the same (build) directory, so adjust the ld_preload to pick
that.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10798
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28134>
2024-03-15 03:25:46 +00:00
Jordan Justen
6922f421f4 intel/compiler: nib_ctrl no longer exists on Xe2+
Ref: cfb34dc695 ("intel/eu/validate: Validate that the ExecSize is a factor of chosen ChanOff")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28191>
2024-03-15 03:01:53 +00:00
Jordan Justen
72d289b8d1 intel/compiler/fs: Restore SIMD32 restriction for ray_queries on Xe2
In 96e0d979a7, the restriction was dropped because we don't compile a
SIMD8 program on Xe2. This change moves it to run_fs() so the
restriction will be added when compiling SIMD16 on Xe2.

Fixes: 96e0d979a7 ("intel/fs: Check fs_visitor instance before using it")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28191>
2024-03-15 03:01:53 +00:00
Marcin Ślusarz
2ad4d5f8dd intel/compiler/xe2: fix decoding of sampler simd mode
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28191>
2024-03-15 03:01:53 +00:00
Lionel Landwerlin
4df58ef503 intel/fs: bump max simd size of some messages for xe2
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28191>
2024-03-15 03:01:53 +00:00
Caio Oliveira
e5bc5bba7c anv: Enable VK_KHR_shader_maximal_reconvergence
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27278>
2024-03-15 02:10:21 +00:00
Yiwei Zhang
d56f65f7ca venus: ensure shmem is attached to renderer before use for guest vram
For guest vram, there's already roundtrip to protect device memory alloc
ordering. This change adds the same protection for shmem used in below
scenarios and optimize to wait for new shmem only.
- reply shmem
- indirect upload shmem
- cmd stream shmem

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28147>
2024-03-15 01:51:16 +00:00
Yiwei Zhang
72b124031b venus: minor naming cleanups
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28147>
2024-03-15 01:51:16 +00:00
Yiwei Zhang
362ba3f007 venus: roundtrip now belongs to ring
A roundtrip is to ensure a cmd via virtqueue happens on the renderer
side before a ring relies on it. Since venus is now with multi-ring, the
roundtrip submit and wait should belong to ring instead of instance, and
each ring owns its own roundtrip seqno to synchronize with virtqueue.

No behavior change.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28147>
2024-03-15 01:51:16 +00:00
Faith Ekstrand
160aa8ba48 nvk: Ignore rasterizationSamples when handling sampleShadingEnable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28192>
2024-03-15 01:31:55 +00:00
Timothy Arceri
20db9b77aa glsl: move invariant builtin validation to the nir linker
We don't attempt to recreate a nir implementation of the symbol table
instead here we simply use location to find the variables we need to
validate.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28142>
2024-03-15 00:01:34 +00:00
Yiwei Zhang
1bc25f4754 venus: optimize to further batch query records
Below is the common client pattern (app, angle, zink, etc):
- a few resets for queries to be used in this batch
  - optional, depending on EXT_host_query_reset
- a few queries
  - incremental
  - can cross query pool boundary

The HW drivers normally have faster shader path when there are too many
individual reset and copies. Without further resolving, this ends up
with linear overhead on the 2d engines. This change has largely
optimized that:
- angle: many copies => 1 copy (or 2)
- zink: many resets and copies => 1 reset and 1 copy (or 2)

and again...some more renamings around

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:44 +00:00
Yiwei Zhang
7c221e65a4 venus: add vn_queue_submission_get_resolved_query_records
This new split is for the getting the resolved query records, which is
to prepare for further query records resolving.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:44 +00:00
Yiwei Zhang
e868fc0b1e venus: refactor vn_queue_submission_add_query_feedback
Drop vn_combine_query_records_and_record_feedback to save the lines of
codes for args preparing. Also refactor to avoid the cmd stride trick,
but use indexing.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:44 +00:00
Yiwei Zhang
a6bc116f84 venus: rewrite qfb vn_feedback helpers
1. move record into alloc to simplify caller handling, which aligns
   with ffb and sfb as well
2. simplify locking to reduce lock overhead
3. remove unbalanced free from record helper
4. move reset to alloc

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:44 +00:00
Yiwei Zhang
aabb52979a venus: refactor query record recycle
Add a new free helper while renaming the alloc one as well. During query
record resolving, use a dropped list to store those records being reset.
This is to prepare for later further query record resolving.

This change also simplifies a query pool compare.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:44 +00:00