Samuel Pitoiset
fbe4e16db2
Revert "radv: disable DCC with signedness reinterpretation on GFX11"
...
This was affecting Cyberpunk and A Plague Tale Requiem but both issues
should be fixed now. The issue with A Plague Tale Requiem was because
of a game bug and vkd3d-proton now has a workaround.
This reverts commit e6735409ee .
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25664 >
2024-01-08 08:02:58 +00:00
Konstantin Seurer
ba7b08e324
radv/rt: Repurpose radv_ray_tracing_stage_is_compiled
...
Replace it with radv_ray_tracing_stage_is_always_inlined and use it inside
radv_rt_compile_shaders.
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25224 >
2024-01-07 21:28:32 +01:00
Konstantin Seurer
73cc952870
radv/sqtt: Avoid duplicate stage check
...
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25224 >
2024-01-07 21:28:26 +01:00
Konstantin Seurer
77b9a6f9e2
radv/rt: Use radv_shader for compiled shaders
...
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25224 >
2024-01-07 21:28:19 +01:00
Konstantin Seurer
59d490b8aa
radv/rt: Remove useless assert
...
If it's NULL, the code will segfault anyways.
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25224 >
2024-01-07 21:28:11 +01:00
Konstantin Seurer
8198805e1f
radv: Skip compiling chit and miss shaders
...
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25224 >
2024-01-07 21:28:06 +01:00
Konstantin Seurer
0f87d406b5
radv/rt: Skip compiling a traversal shader
...
If we don't need one, we don't compile one.
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25224 >
2024-01-07 21:28:02 +01:00
Konstantin Seurer
aaa64217ca
radv: Add more ray tracing data to the cache
...
This makes the cache more flexible when it comes to missing stages. This
will be used to skip compiling unused ray tracing stages.
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25224 >
2024-01-07 21:27:56 +01:00
Konstantin Seurer
a784477269
radv: Don't store library stack sizes
...
They are already imported in radv_rt_fill_stage_info.
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25224 >
2024-01-07 21:27:53 +01:00
Konstantin Seurer
92a951db6a
radv: Make pipeline cache object data generic
...
Pipeline cache objects can hold some generic data. Anything concerning
that should not be handled in "common" code paths.
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25224 >
2024-01-07 21:27:27 +01:00
Daniel Schürmann
023e78b4d7
aco: add new post-RA scheduler for ILP
...
Totals from 77247 (97.37% of 79330) affected shaders: (GFX11)
Instrs: 44371374 -> 43215723 (-2.60%); split: -2.64%, +0.03%
CodeSize: 227819532 -> 223188224 (-2.03%); split: -2.06%, +0.03%
Latency: 301016823 -> 290147626 (-3.61%); split: -3.70%, +0.09%
InvThroughput: 48551749 -> 47646212 (-1.87%); split: -1.88%, +0.01%
VClause: 870581 -> 834655 (-4.13%); split: -4.13%, +0.00%
SClause: 1487061 -> 1340851 (-9.83%); split: -9.83%, +0.00%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25676 >
2024-01-06 11:30:42 +00:00
Daniel Schürmann
72a5c659d4
aco: form clauses for LDS instructions
...
No fossil-db changes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25676 >
2024-01-06 11:30:42 +00:00
Daniel Schürmann
8f16745821
aco: fix should_form_clause() for memory instructions without operands
...
In particular, this applies to s_memtime and s_memrealtime.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25676 >
2024-01-06 11:30:41 +00:00
Vinson Lee
568f61787a
ac/rgp: Fix single-bit-bitfield-constant-conversion warning
...
../src/amd/common/ac_rgp.c:119:48: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
119 | header->flags.is_semaphore_queue_timing_etw = 1;
| ^ ~
Fixes: ed0c852243 ("radv: add initial SQTT files generation support")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26839 >
2024-01-05 22:42:58 -08:00
Yonggang Luo
d6c258d9ee
util: Add align_uintptr and use it treewide to replace ALIGN that works on size_t and uintptr_t
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26866 >
2024-01-05 21:54:35 +00:00
Rhys Perry
ae54cbeb3f
nir: remove sad_u8x4
...
All uses of this can be replaced with msad_4x8.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26907 >
2024-01-05 18:55:22 +00:00
Rhys Perry
5fd747a502
radv: enable msad_4x8
...
This helps some FSR3 shaders.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26907 >
2024-01-05 18:55:22 +00:00
Rhys Perry
a339699b5c
ac/llvm: implement msad_4x8
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26907 >
2024-01-05 18:55:22 +00:00
Rhys Perry
1410735a62
aco: implement msad_4x8
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26907 >
2024-01-05 18:55:22 +00:00
Konstantin Seurer
c511b8968a
radv: Implement VK_KHR_ray_tracing_position_fetch
...
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26895 >
2024-01-05 18:20:20 +00:00
Rhys Perry
24ef827f71
radv: remove radv_shader_info's cs.subgroup_size
...
This is the same as wave_size.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26894 >
2024-01-05 17:35:48 +00:00
Rhys Perry
59dbe633e3
radv: use CS wave selection for task shaders
...
This uses wave32 for small workgroups and wave64 when certain subgroup
operations are used.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26894 >
2024-01-05 17:35:48 +00:00
Rhys Perry
3009dcd102
aco: correctly set min/max_subgroup_size for wave32-as-wave64
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26894 >
2024-01-05 17:35:48 +00:00
Friedrich Vock
1e3541728b
radv,aco: Convert 1D ray launches to 2D
...
Because we use unaligned dispatches, 1D launches only use 8 threads per
wave. Converting to 2D and fixing up launch IDs in the prolog
significantly increases occupancy.
Gives ~30% uplift in Ghostwire Tokyo.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26105 >
2024-01-05 17:08:05 +00:00
Georg Lehmann
71edf4de5e
aco/gfx12: implement broadcast dmask shrink behavior
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26897 >
2024-01-05 12:03:54 +00:00
Georg Lehmann
4a6ee2c483
aco: shrink buffer stores with undef/zero components
...
Buffer stores store 0 like image stores for unspecified components.
Foz-DB Navi21:
Totals from 91 (0.11% of 79330) affected shaders:
Instrs: 63327 -> 63121 (-0.33%)
CodeSize: 315312 -> 314440 (-0.28%); split: -0.28%, +0.00%
VGPRs: 3144 -> 3120 (-0.76%)
Latency: 441424 -> 441300 (-0.03%); split: -0.03%, +0.00%
InvThroughput: 65501 -> 65130 (-0.57%)
Copies: 6197 -> 5999 (-3.20%)
PreVGPRs: 2197 -> 2182 (-0.68%)
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26897 >
2024-01-05 12:03:54 +00:00
Friedrich Vock
34cc765172
radv/rt: Free traversal NIR after compilation
...
Could lead to OOM in games that compile RTPSOs often,
like Ghostwire Tokyo.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26892 >
2024-01-04 14:48:28 +00:00
Samuel Pitoiset
395dee0d89
radv: drop si_ prefix from all functions
...
Most of these functions were copied from RadeonSI but they should be
prefixed with radv_ instead.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26854 >
2024-01-04 08:40:37 +00:00
Samuel Pitoiset
89947eb151
radv: remove radv_write_scissors()
...
This function is useless.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26854 >
2024-01-04 08:40:36 +00:00
Samuel Pitoiset
dd64293104
radv: rename si_make_texture_descriptor() to gfx6_make_texture_descriptor()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26854 >
2024-01-04 08:40:36 +00:00
Samuel Pitoiset
887ac765bb
radv: remove duplicated si_tile_mode_index() function
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26854 >
2024-01-04 08:40:36 +00:00
Samuel Pitoiset
aa1eb54b3b
radv: constify a variable in radv_emit_depth_control()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26847 >
2024-01-04 07:54:41 +00:00
Samuel Pitoiset
8b7b5be98b
radv: disable stencil test without a stencil attachment
...
Implementations are supposed to do that per the Vulkan spec.
This fixes the following new VKCTS tests
dEQP-VK.pipeline.*.stencil.no_stencil_att.*
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26847 >
2024-01-04 07:54:40 +00:00
Yonggang Luo
19fca131b1
amd: Use align64 instead of ALIGN for 64 bit value parameter
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26869 >
2024-01-03 22:02:17 +00:00
Daniel Schürmann
bdbf873b0f
nir: remove redundant passes from nir_opt_if()
...
These are now covered by nir_opt_loop():
- opt_if_loop_last_continue()
- opt_merge_breaks()
- opt_if_loop_terminator()
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24940 >
2024-01-03 20:48:05 +00:00
Daniel Schürmann
a3ed36da1a
treewide: replace calls to nir_opt_trivial_continues() with nir_opt_loop()
...
Totals from 850 (1.11% of 76636) affected shaders: (RADV, GFX11)
MaxWaves: 18134 -> 18130 (-0.02%)
Instrs: 3011298 -> 3008585 (-0.09%); split: -0.17%, +0.08%
CodeSize: 15836804 -> 15841972 (+0.03%); split: -0.09%, +0.12%
VGPRs: 63580 -> 63604 (+0.04%)
SpillSGPRs: 966 -> 1148 (+18.84%); split: -0.83%, +19.67%
Latency: 36102291 -> 30186144 (-16.39%); split: -16.41%, +0.02%
InvThroughput: 9058100 -> 7011821 (-22.59%); split: -22.61%, +0.02%
VClause: 65369 -> 65364 (-0.01%); split: -0.03%, +0.02%
SClause: 100309 -> 100305 (-0.00%); split: -0.04%, +0.04%
Copies: 335658 -> 336472 (+0.24%); split: -0.70%, +0.94%
Branches: 110806 -> 108945 (-1.68%); split: -1.94%, +0.26%
PreSGPRs: 73476 -> 73934 (+0.62%); split: -0.25%, +0.87%
PreVGPRs: 58809 -> 58840 (+0.05%); split: -0.01%, +0.06%
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24940 >
2024-01-03 20:48:04 +00:00
Samuel Pitoiset
7ea48145a1
radv: stop clearing CMASK to 0xcc when FMASK is present on GFX9
...
This is incorrect because clearing CMASK to 0xCC should only happen
for fast clears with DCC and FMASK/CMASK.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26634 >
2024-01-03 13:58:06 +00:00
Samuel Pitoiset
1714f7aff4
radv: disable FMASK for MSAA images with layers on GFX9
...
It seems that FMASK can be interleaved and RADV doesn't support this
properly, so let's disable it.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26634 >
2024-01-03 13:58:06 +00:00
Rhys Perry
cad2c0915d
aco/tests: use more raw strings
...
Python 3.12 started giving a SyntaxWarning for unrecognized escapes such
as "\w". This might become a SyntaxError in a future python version.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26850 >
2024-01-03 13:33:52 +00:00
Samuel Pitoiset
10ce61e16c
radv: advertise VK_KHR_maintenance6
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26757 >
2024-01-03 11:24:27 +00:00
Samuel Pitoiset
db9816fd66
radv: add support for NULL index buffer
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26757 >
2024-01-03 11:24:27 +00:00
Samuel Pitoiset
744cb98bc6
radv: add support for version 2 of all descriptor binding commands
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26757 >
2024-01-03 11:24:27 +00:00
Samuel Pitoiset
5f63624701
radv: rename RADV_GRAPHICS_STAGES to RADV_GRAPHICS_STAGE_BITS
...
For consistency with RADV_RT_STAGE_BITS.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26757 >
2024-01-03 11:24:27 +00:00
Samuel Pitoiset
17081334ab
radv: add support for VkBindMemoryStatusKHR
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26757 >
2024-01-03 11:24:27 +00:00
Samuel Pitoiset
845a666e0f
radv: move radv_BindImageMemory2() to radv_image.c
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26757 >
2024-01-03 11:24:27 +00:00
Samuel Pitoiset
f30fa9dec8
radv: move radv_rt_{common,shader} files to nir/
...
These files contains NIR lowering code for RT.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26851 >
2024-01-03 09:40:29 +00:00
Samuel Pitoiset
02c5365ffa
radv: make a couple of NIR RT functions as static
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26851 >
2024-01-03 09:40:29 +00:00
Samuel Pitoiset
685c4b6337
radv: move radv_{emulate,enable}_rt() to radv_physical_device.c
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26851 >
2024-01-03 09:40:29 +00:00
David Heidelberg
9017852de4
ci/radeonsi: disable VA-API testing on raven
...
Fails and freezes after Collabora farm outage.
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26820 >
2024-01-02 21:33:51 +00:00
Pierre-Eric Pelloux-Prayer
115b61e51f
ac/surface: don't oversize surf_size
...
Yet another iteration on the same YUV surfaces.
The change from 87ecfdfbf0 has 2 odd things:
* it's using MAX2(original value, new value) but the point of updating
surf_slice_size / surf_size is to make it correct relative to the new
value of surf_pitch
* it's multiplying surf_pitch (= number of elements per row) by height (ok)
by surf->bpe (= number of bytes per element) by surf->blk_w (= number of
"horizontal" pixels in an element) so the end unit doesn't make sense.
Fix this by computing a reasonnable value based on unit: the surf_slice_size
is the number of elements per row (surf_pitch) x number of bytes per element
(bpe) x number of rows.
This makes the expected size correct and thus fixes users of eglCreateImageKHR,
like the issue #6131 .
I tested a bunch of gst pipelines and ffmpeg scripts on various files I have
and didn't notice any issues (on gfx10.3 and gfx9).
Fixes: 87ecfdfbf0 ("ac/surface: adapt surf_size when modifying surf_pitch")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6131
Acked-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26693 >
2024-01-02 14:32:05 +01:00