Marek Olšák
70fd817278
st/mesa: skip a few NIR passes that don't work with lowered IO
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819 >
2024-03-15 19:55:46 +00:00
Marek Olšák
b48188e46c
st/mesa: lower sysvals slightly sooner
...
This will make a later commit simpler. No change in behavior.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819 >
2024-03-15 19:55:46 +00:00
Marek Olšák
a3de3a5c32
st/mesa: get dual slot input info from NIR if IO is lowered
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819 >
2024-03-15 19:55:46 +00:00
Marek Olšák
f28f8bba9f
radeonsi: add test failures due to incorrect tests for nir_opt_varyings
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819 >
2024-03-15 19:55:46 +00:00
Marek Olšák
abf0de57ab
radeonsi: enable uniform propagation for varyings except VP/Energy
...
It regresses performance of VP/Energy.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819 >
2024-03-15 19:55:46 +00:00
Marek Olšák
db5cf460d7
radeonsi: set trivial NIR options for nir_opt_varyings
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819 >
2024-03-15 19:55:46 +00:00
Marek Olšák
5bbb279e7d
radeonsi: set the lower_mediump_io callback for GLSL
...
It will be called by the GLSL linker before nir_opt_varyings.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819 >
2024-03-15 19:55:46 +00:00
Marek Olšák
6dbd1dcd93
nir/tests: add tests for nir_opt_varyings
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819 >
2024-03-15 19:55:46 +00:00
Marek Olšák
c66967b5cb
nir: add nir_opt_varyings, new pass optimizing and compacting varyings
...
Highlights:
- all shader stages and all input/output types are handled, including
inputs and outputs with multiple vertices
- the optimizations performed are: unused input/output removal, constant
and uniform propagation, output deduplication, inter-shader code motion,
and compaction
- constant and uniform propagation and output deduplication work even
if a shader contains multiple stores of the same output, e.g. in GS
- the same optimizations are also performed between output stores and
output loads (for TCS)
- FS inputs are packed agressively. Only flat, interp FP32, and interp
FP16 can't be in the same vec4. Also, if an output value is
non-divergent within a primitive, the corresponding FS input is
opportunistically promoted to flat.
The big comment at the beginning of nir_opt_varyings.c has a detailed
explanation, which is the same as:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/8841
dEQP and GLCTS have incorrect tests that fail with this, see:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/10361
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819 >
2024-03-15 19:55:46 +00:00
Marek Olšák
ba54099dce
nir: add a utility computing post-dominance of SSA uses
...
The massive comment explains it.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819 >
2024-03-15 19:55:46 +00:00
Yogesh Mohan Marimuthu
9d76ba37e8
winsys/amdgpu: add more comments for winsys create in header file
...
v2: add data diagram (Pierre-Eric)
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
f93f7f8f3a
winsys/amdgpu: remove tab space
...
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
efbd602b63
winsys/amdgpu: use _destroy_locked() for failure to create 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
5b6c0fdc97
winsys/amdgpu: aws instead of ws for amdgpu_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
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