Commit graph

172923 commits

Author SHA1 Message Date
Daniel Schürmann
971407bd2f aco/spill: keep loop-carried variables spilled at loop headers
Now, that we avoid re-spilling loop-carried variables, we can
keep them spilled at loop-headers.

Totals from 31 (0.04% of 79395) affected shaders: (GFX11)

Instrs: 1539175 -> 1538109 (-0.07%); split: -0.14%, +0.07%
CodeSize: 7877948 -> 7871916 (-0.08%); split: -0.16%, +0.08%
SpillSGPRs: 1936 -> 1523 (-21.33%)
SpillVGPRs: 160 -> 146 (-8.75%)
Scratch: 18176 -> 16896 (-7.04%)
Latency: 9439964 -> 9441197 (+0.01%); split: -0.01%, +0.02%
InvThroughput: 2406253 -> 2406700 (+0.02%); split: -0.01%, +0.03%
VClause: 38903 -> 38922 (+0.05%)
SClause: 33347 -> 33349 (+0.01%); split: -0.01%, +0.02%
Copies: 131420 -> 130974 (-0.34%); split: -0.57%, +0.23%
Branches: 53091 -> 53212 (+0.23%); split: -0.03%, +0.26%
VALU: 844372 -> 843876 (-0.06%); split: -0.12%, +0.06%
SALU: 190329 -> 189891 (-0.23%); split: -0.40%, +0.17%
VMEM: 60491 -> 60510 (+0.03%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:20 +00:00
Daniel Schürmann
e968a18652 aco/spill: avoid re-spilling loop-carried variables in add_coupling_code()
These variables only need to be spilled once at the loop-preheader.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:20 +00:00
Daniel Schürmann
7726b92707 aco/spill: avoid re-spilling loop-carried variables in process_block()
If a variable is spilled at the loop-header of the current loop,
there is no need to spill it redundantly. Instead, re-use the
spill-slot from the loop-header.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:20 +00:00
Daniel Schürmann
bb3b6a5ff3 aco/spill: add interferences with variables spilled at loop headers
We will re-use the spill slots rather than re-spilling the variables.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:20 +00:00
Daniel Schürmann
09c5414760 aco/spill: don't prefer to spill phis at merge blocks
Totals from 44 (0.06% of 79242) affected shaders: (GFX11)

Instrs: 165578 -> 165545 (-0.02%); split: -0.08%, +0.06%
CodeSize: 833528 -> 832988 (-0.06%); split: -0.11%, +0.04%
SpillSGPRs: 346 -> 329 (-4.91%)
Latency: 1176341 -> 1176231 (-0.01%); split: -0.02%, +0.01%
InvThroughput: 235771 -> 235761 (-0.00%); split: -0.01%, +0.01%
SClause: 3287 -> 3289 (+0.06%); split: -0.21%, +0.27%
Copies: 16290 -> 16299 (+0.06%); split: -0.62%, +0.68%
Branches: 3633 -> 3641 (+0.22%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:20 +00:00
Daniel Schürmann
d234f789b5 aco/spill: keep live-out variables spilled at branch blocks
There is no reason to reload early. Leave scheduling to the scheduler.

Totals from 98 (0.12% of 79242) affected shaders: (GFX11)

Instrs: 841944 -> 841995 (+0.01%); split: -0.02%, +0.03%
CodeSize: 4354332 -> 4354544 (+0.00%); split: -0.02%, +0.02%
SpillSGPRs: 2557 -> 2554 (-0.12%)
Latency: 5772080 -> 5772209 (+0.00%); split: -0.00%, +0.01%
InvThroughput: 1694834 -> 1694873 (+0.00%); split: -0.00%, +0.00%
SClause: 16036 -> 16042 (+0.04%); split: -0.07%, +0.11%
Copies: 85117 -> 85125 (+0.01%); split: -0.18%, +0.19%
Branches: 25222 -> 25219 (-0.01%); split: -0.02%, +0.00%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:20 +00:00
Daniel Schürmann
32882d647e aco/spill: refactor adding spilled vars into separate function add_to_spills()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:20 +00:00
Daniel Schürmann
a5e8f9f879 aco/spill: add spills_entry interferences only when necessary
For variables which are already spilled in previous blocks,
the interferences already exist.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:20 +00:00
Daniel Schürmann
1a1d6aef56 aco/spill: don't allocate extra spill_id for phi operands in add_coupling_code()
We can re-use the phi definition's spill_id.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:20 +00:00
Daniel Schürmann
b1468fc952 aco/spill: refactor SSA repairing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:19 +00:00
Samuel Pitoiset
585b4c5a01 radv: invalidate L2 metadata for VK_ACCESS_2_MEMORY_READ_BIT
When shaders might read metadata (DCC) this must be flushed.
VK_ACCESS_2_MEMORY_READ_BIT includes all READ bits that are relevant.

I think this issue has been uncoverd since vkd3d-proton d1425ee4
("vkd3d: Use VK_ACCESS_MEMORY_{READ,WRITE}_BIT where appropriate")
because RADV used to be missing VK_ACCESS_2_MEMORY_{READ,WRITE} in the
past and vkd3d-proton added a special workaround that has been removed.

This fixes some DCC corruption in WWE 2K24.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10774
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28332>
2024-03-25 07:27:46 +00:00
Dave Airlie
4fc2ab43c0 radv/video: fix h265 decode with unaligned w/h
This is similiar to the h264 fix done previously.

Fixes decoding with the nvpro samples app and a test video.

Fixes: db62c38091 ("radv: add vcn h265 decode.")
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28359>
2024-03-25 05:51:43 +00:00
Yusuf Khan
dcc2e596c1 nvk: remove some dead code files
Dead beef.

Fixes: 813b253939

Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28354>
2024-03-25 03:23:11 +00:00
Alan Liu
f351e4be11 radeonsi/vpe: support vpe 1.1
update radeonsi and vpelib to support vpe 1.1

Co-authored-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Peyton Lee <peytolee@amd.com>
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28239>
2024-03-25 00:59:02 +00:00
Eric Engestrom
14279087fb ci/deqp-runner: split gl & gles groups to use the correct binary
Now that these can come from different releases, with different sets of
patches backported to them, it matters that we use the correct one.

Fixes: 78ea3bb43d ("ci/deqp: use the proper gl/gles releases for deqp-gl*, deqp-gles*, deqp-egl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28343>
2024-03-24 22:14:06 +00:00
Eric Engestrom
9bbbe90f06 ci: enable MESA_VK_ABORT_ON_DEVICE_LOSS globally
This makes all vulkan drivers abort on DEVICE_LOST, which is better than
the current error in deqp-runner because deqp has added a new DeviceLost
test status but deqp-runner doesn't understand it yet (the next release
will though), breaking jobs when this happens.

Disable it on zink for now, as EGL test intentionally cause this in some
tests and we don't want them to start crashing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28320>
2024-03-24 21:20:55 +00:00
Eric Engestrom
197e3f7109 v3dv/ci: assume list of dEQP-VK.wsi.*.maintenance1.present_modes.* flakes is the same between xcb & xlib and between rpi4 & rpi5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28351>
2024-03-24 20:10:42 +00:00
Eric Engestrom
a856d30b72 v3dv/ci: add more flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28351>
2024-03-24 20:08:06 +00:00
Eric Engestrom
7156575dcb v3dv/ci: assume dEQP-VK.wsi.wayland.swapchain.simulate_oom.* have been fixed
We'll add them back if it turns out 1900617baf was not enough to fix them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28351>
2024-03-24 20:08:06 +00:00
Lucas Fryzek
912e203a53 drisw: clamp damage region to texture bounds
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28242>
2024-03-24 17:27:22 +00:00
Lucas Fryzek
85a91f461c drisw/winsys: Flip y coordinate when creating pipe boxes
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28242>
2024-03-24 17:27:21 +00:00
Lucas Fryzek
b3680c92a1 egl/wayland/sw: don't invert y wl_surface_damage_buffer
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28242>
2024-03-24 17:27:21 +00:00
Jesse Natalie
d82ff37ed0 nir_tests: Add /bigobj when compiling with MSVC
Otherwise the opt_varying tests fail to compile

Fixes: 6dbd1dcd ("nir/tests: add tests for nir_opt_varyings")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28345>
2024-03-24 15:50:18 +00:00
Paulo Zanoni
72e1e6e120 driconf/anv: set fp64_workaround_enabled to DIRT 5
Otherwise the game refuses to launch. With it, it's playable on my
DG2.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9882
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28213>
2024-03-23 17:01:17 +00:00
Paulo Zanoni
460bacc223 anv: set shaderFloat64 to true when fp64_workaround_enabled
According to 00-mesa-defaults.conf, the only game that seems to care
about fp64_workaround_enabled right now is Doom Eternal. After some
brief testing I couldn't spot any performance difference by setting
shaderFloat64 to true.

We want to set this to true so that DIRT 5 can work, as it looks at
shaderFloat64 and then refuses to launch today.

Link: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9882
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28213>
2024-03-23 17:01:17 +00:00
Ian Romanick
b835784dde intel/brw: Remove last vestiges of could_coissue
Most of the obvious bits were removed by 7ac5696157 ("intel/brw: Remove
Gfx8- code from backend passes").

No shader-db or fossil-db changes on any Intel platform.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28342>
2024-03-23 01:29:22 +00:00
Marek Olšák
60231e6d6f nir/validate: validate more fields of nir_io_semantics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28312>
2024-03-22 22:39:50 +00:00
Marek Olšák
2034cf87c5 nir/lower_io: add nir_io_semantics::interp_explicit_strict
This preserves the misnamed "per_vertex" flag in lowered IO.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28312>
2024-03-22 22:39:50 +00:00
Marek Olšák
f02678bb50 nir/validate: validate interp_mode of load_barycentric_*
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28312>
2024-03-22 22:39:50 +00:00
Marek Olšák
4ae952506d radeonsi: implement the shader debug log from ac_nir_store_debug_log_amd
This can be used to print values directly from shaders using
ac_nir_store_debug_log_amd.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27952>
2024-03-22 21:58:02 +00:00
Marek Olšák
a60b9eb17c ac/llvm: remove remnants of gfx10 NGG streamout
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27952>
2024-03-22 21:58:02 +00:00
Marek Olšák
7c25243f86 aco: add a helper printing shader asm by disassembling via LLVM
ACO uses the LLVM disassembler. It was used to verify that manually-written
inline assembly code is correct.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27952>
2024-03-22 21:58:02 +00:00
Marek Olšák
df6fe90926 aco: implement aco_is_gpu_supported using switch statement
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27952>
2024-03-22 21:58:02 +00:00
Marek Olšák
1585a5cc6d nir,amd: add nir_intrinsic_load_debug_log_desc_amd and its use
for shader debugging

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27952>
2024-03-22 21:58:02 +00:00
Marek Olšák
6773595ed0 nir: rename AMD XFB intrinsics to *_gfx11_amd
to indicate it's only for gfx11.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27952>
2024-03-22 21:58:02 +00:00
Dmitry Baryshkov
b8ffa9f956 freedreno/rnn: drop custom aprintf function
Replace custom apritnf() function with the existing asprintf(), which is
already widely used by rnn.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28193>
2024-03-22 19:30:06 +00:00
Dmitry Baryshkov
8c95eada0d freedreno/rnn: drop headergen2
The headergen2 tool is no longer used by the freedreno driver, drop it.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7978
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28193>
2024-03-22 19:30:06 +00:00
Dmitry Baryshkov
ec61c49f26 freedreno/registers: drop unsupported features from schema
Drop the features from original rules-ng schema that are not supported
by the gen_header.py script.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28193>
2024-03-22 19:30:06 +00:00
Dmitry Baryshkov
639488f924 freedreno/registers: limit the rules schema
The gen_headers.py supports only a limited set of original rules-ng.xsd
schema. At the same time it added support for additional attributes, not
covered by the original Nouveau schema. Rename the schema file.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28193>
2024-03-22 19:30:06 +00:00
Dmitry Baryshkov
12f32ff864 freedreno/registers: support processing display display headers
Add missing features to gen_headers.py script in order to support MDP /
DSI / HDMI headers. This includes nested array declarations, offsets /
doffsets attributes support and using enums for array indexing.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7978
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28193>
2024-03-22 19:30:06 +00:00
Dmitry Baryshkov
f50da71198 freedreno/registers: fix WB doffsets array in mdp5.xml
In mdp5.xml the doffsets attribute of the WB array contains one extra
comma, resulting in one empty entry in __offset_WB(). Fix that now.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28193>
2024-03-22 19:30:05 +00:00
Dmitry Baryshkov
7f2af6841b freedreno/registers: inline mdp4_csc group
The gen_headers.py script doesn't support and is not going to support
group declarations. Inline the only user of group / use-group
definitions, mdp4_csc.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28193>
2024-03-22 19:30:05 +00:00
Dmitry Baryshkov
a3d8acc875 freedreno/registers: add missing copyright imports
Import copyright into all files so that it is included into the
generated headers.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28193>
2024-03-22 19:30:05 +00:00
Dmitry Baryshkov
bf89f777f8 freedreno/registers: fix generation dependencies
The rules-ng.xsd is not a registers XML file, don't pass it to
gen_header.py. Instead declare rules-ng.xsd and freedreno_copyright.xml
as inputs to the gen_header.py, so that the headers are regenerated if
schema or copyright file changes.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28193>
2024-03-22 19:30:05 +00:00
Samuel Pitoiset
2ab3a5a0f7 zink/ci: allow RADV_PERFTEST=shader_object on NAVI31
NAVI10/VANGOGH are waiting for another fix related to NGG culling
for passing CI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28338>
2024-03-22 19:05:41 +00:00
Yonggang Luo
1d18aba016 meson: Remove the non-used -DDEBUG manually
And also remove the workarounds for LLVM and bellagio

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28092>
2024-03-22 18:22:34 +00:00
Yonggang Luo
1ac1c0843f treewide: Replace usage of macro DEBUG with MESA_DEBUG when possible
This is achieved by the following steps:

#ifndef DEBUG => #if !MESA_DEBUG
defined(DEBUG) => MESA_DEBUG
#ifdef DEBUG => #if MESA_DEBUG

This is done by replace in vscode

excludes
docs,*.rs,addrlib,src/imgui,*.sh,src/intel/vulkan/grl/gpu

These are safe because those files should keep DEBUG macro is already excluded;
and not directly replace DEBUG, as we have some symbols around it.

Use debug or NDEBUG instead of DEBUG in comments when proper

This for reduce the usage of DEBUG,
so it's easier migrating to MESA_DEBUG

These are found when migrating DEBUG to MESA_DEBUG,
these are all comment update, so it's safe

Replace comment /* DEBUG */ and /* !DEBUG */ with proper /* MESA_DEBUG */ or /* !MESA_DEBUG */ manually

DEBUG || !NDEBUG -> MESA_DEBUG || !NDEBUG
!DEBUG && NDEBUG -> !(MESA_DEBUG || !NDEBUG)

Replace the DEBUG present in comment with proper new MESA_DEBUG manually

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28092>
2024-03-22 18:22:34 +00:00
Matthew Waters
cf8f894921 teximage: allow glCopyTex{Sub}Image[123]D into R/RG textures with OpenGL ES 2.0
This is explicitly allowed in the GL_EXT_texture_rg extension.

Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28313>
2024-03-22 17:04:55 +00:00
Jesse Natalie
63366781aa wgl: Check for null before dereferencing ctx in swap
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28211>
2024-03-22 16:40:08 +00:00
Jesse Natalie
df638c023d wgl: Delete unused context param to swap
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28211>
2024-03-22 16:40:08 +00:00