Hyunjun Ko
5b2756ec2c
radv: fix assertion for the count of xfb output
...
It's an counter, not an index.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16623 >
2022-05-20 06:43:11 +00:00
Hans-Kristian Arntzen
04459c8287
radv: Fix RTPSO hashing of pGroups.
...
There are padding bytes here. Only hash relevant members.
Fixes: ca2d96db51 ("radv: Add caching for RT pipelines.")
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16582 >
2022-05-20 07:43:58 +02:00
Jason Ekstrand
a299e5efbb
radv: Use the common CmdBindVertexBuffers wrapper
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16611 >
2022-05-20 02:12:37 +00:00
Jason Ekstrand
50a00f889c
radv: Add a sqtt entrypoint for CmdBindVertexBuffers2
...
Fixes: b262284300 ("radv: add support for dynamic vertex input binding stride")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16611 >
2022-05-20 02:12:37 +00:00
Rhys Perry
1e710f7a2c
radv: validate shaders after linking passes
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5244
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12448 >
2022-05-19 13:37:20 +00:00
Rhys Perry
75c80be484
radv: add missing NIR_PASS() and switch from NIR_PASS_V()
...
Unlike NIR_PASS_V(), NIR_PASS() can skip printing the shader when
NIR_DEBUG=print.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5244
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12448 >
2022-05-19 13:37:20 +00:00
Rhys Perry
d98b7817fc
radv: call nir_metadata_preserve in various lowering passes
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12448 >
2022-05-19 13:37:20 +00:00
Marek Olšák
2443054932
amd: rename fishes to Navi21, Navi22, Navi23, Navi24, and Rembrandt
...
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16604 >
2022-05-19 11:55:50 +00:00
Samuel Pitoiset
8396df5ad9
radv: init states from pRasterizationState at only one place
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16552 >
2022-05-18 13:53:35 +00:00
Samuel Pitoiset
7f08fe0b9f
radv: init states from pViewportState at only one place
...
Except the viewport/scissor arrays to avoid useless array copies.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16552 >
2022-05-18 13:53:35 +00:00
Samuel Pitoiset
f13b30fe62
radv: init states from pTessellationState at only one place
...
It's part of the pre-rasterization state of graphics pipeline libs.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16552 >
2022-05-18 13:53:35 +00:00
Samuel Pitoiset
b014d983bb
radv: add new pipeline helpers for NIR->ASM compilation
...
It walks backwards to compile, looks cleaner to me.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16553 >
2022-05-18 07:19:20 +00:00
Samuel Pitoiset
8e1085c19a
radv: do not try to dump the NIR of the trap handler shader
...
There is no NIR at all.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16553 >
2022-05-18 07:19:20 +00:00
Samuel Pitoiset
9207d791af
radv: rename shader compile functions to spirv_to_nir/nir_to_asm
...
For better clarity.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16553 >
2022-05-18 07:19:20 +00:00
Jason Ekstrand
d9048e31a0
radv: Use vk_image_view as the base for radv_image_view
...
I've left the extent field because, even though it looks like it should
be roughly equivalent, it's weirdly different on different hardware and
I didn't want to mess with it.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16376 >
2022-05-17 18:14:55 +00:00
Jason Ekstrand
c56f3dcbaa
radv: Use vk_image as the base for radv_image
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16376 >
2022-05-17 18:14:55 +00:00
Jason Ekstrand
992690e483
radv: Only use PLANE_0 in meta when actually needed
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16376 >
2022-05-17 18:14:55 +00:00
Samuel Pitoiset
07eba9a15a
radv: do not lower loading TESS/ESGS rings using the ABI for LLVM
...
LLVM uses an implicit argument for the ring offsets and this lowering
was just broken.
This fixes tessellation and geometry on all generations with LLVM.
Fixes: 896a55f47d ("radv: Lower ABI in NIR for tess/ESGS/NGG shader arguments.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16530 >
2022-05-17 16:45:02 +00:00
Konstantin Seurer
b9f43059fc
Revert "radv: Make fill_buffer_shader non-static"
...
We do not need this any longer since
radv_acceleration_structure.c uses
radv_fill_buffer now instead.
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16517 >
2022-05-17 13:10:07 +00:00
Konstantin Seurer
405b2bb79c
radv: Use radv_fill_buffer for accel struct builds
...
It turns out, that the fuchsia sort may actually
perform clears with size < 16 which hits an assert
in radv_fill_buffer_shader. This fixes random
crashes in Control.
Fixes: be57b08 ("radv: Build accaleration structures using LBVH")
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16517 >
2022-05-17 13:10:07 +00:00
Konstantin Seurer
183c15dbb2
radv: Allow radv_fill_buffer to work with VAs only
...
Makes the bo parameter optional which is useful
for the clears performed by acceleration structure
build commands.
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16517 >
2022-05-17 13:10:07 +00:00
Marek Olšák
fcaa9f5096
radeonsi/gfx11: fix alpha-to-coverage with stencil or samplemask export
...
We can't use UINT16_ABGR for the alpha channel. Always use 32_ABGR.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16509 >
2022-05-17 10:27:04 +00:00
Samuel Pitoiset
9b4c346029
radv: more register changes on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Samuel Pitoiset
7f31917119
radv: limit CP DMA to max 32KB sizes on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Samuel Pitoiset
533df65e85
radv: apply a workaround for CB perf counters on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Bas Nieuwenhuizen
0ce2401144
radv: update the initialization of SGPR0/1 registers for HS and GS on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Samuel Pitoiset
31ec1ecc12
radv: update VRS registers on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Samuel Pitoiset
ab21ce46a6
radv: update TF_RING_size to a per-SE size on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Samuel Pitoiset
995ab9a505
radv: do not emit FLUSH_AND_INV_DB_META on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Samuel Pitoiset
2e3aec1633
radv: do not emit non-existent CP_COHER_START_DELAY on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Samuel Pitoiset
dcb324eb53
radv: configure DB_RENDER_CONTROL on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Samuel Pitoiset
66882363b3
radv: use PIXEL_PIPE_STATE_DUMP event instead of ZPASS_DONE on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Samuel Pitoiset
6026cf43b3
radv: update image descriptor registers on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Samuel Pitoiset
ef59e5b193
radv: update buffer descriptor registers on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Samuel Pitoiset
ebca4f2b3d
radv: update sampler registers on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Bas Nieuwenhuizen
670ee6023d
radv: Disable transform feedback for gfx11.
...
Until we implement it.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Bas Nieuwenhuizen
c7f5da6829
radv: Add gfx11 DCC fast clear support.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Bas Nieuwenhuizen
cc2b3f3924
radv: Adjust for new SWIZZLE_ENABLE.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Bas Nieuwenhuizen
e96a35e6db
radv: gfx11 register changes.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Bas Nieuwenhuizen
9c391fe47e
radv: Mark all formats as DCC compatible with each other on gfx11.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Bas Nieuwenhuizen
eb117a4711
radv: always enable NGG on GFX11
...
The legacy path is removed.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Samuel Pitoiset
278e533ec9
radv: update scratch buffer registers on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Samuel Pitoiset
6e4d9729cc
radv: use the new format table on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Samuel Pitoiset
2d02e210b5
radv: do not align VGPRS to 8 or 16 on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Dave Airlie
a179e1aede
aco/radv: drop radv_nir_compiler_options from aco.
...
Add a new aco input and options structs, then convert from radv
pieces on submit.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16521 >
2022-05-17 06:15:25 +00:00
Dave Airlie
8198900071
ac/radv: drop info pointer from the ac and radv shader structs
...
This was being used for one bool, just pass the bool.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16521 >
2022-05-17 06:15:25 +00:00
Yonggang Luo
e8d8a0544d
radv: fixes msvc compiling error
...
Fixes: 5d9ef0efb5 ("radv: Add the fuchsia radix sort")
../mesa/src/amd/vulkan/radix_sort/radv_radix_sort.c(148): error C2220: the following warning is treated as an error
../mesa/src/amd/vulkan/radix_sort/radv_radix_sort.c(148): warning C4098: 'vkDestroyPipeline': 'void' function returning a value
[82/1129] Compiling C++ object src/amd/compiler/libaco.a.p/aco_instruction_selection.cpp.obj
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16373 >
2022-05-16 18:57:06 +00:00
Timur Kristóf
e0bec58340
radv: Fix loading task shader ring buffer addresses.
...
I forgot to use task_ring_offsets instead of ring_offsets
when I ported this code to the new ABI.
Fixes: a8bdcf3c92
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16500 >
2022-05-16 15:28:20 +02:00
Timur Kristóf
063a61a840
radv: Fix task shader info.
...
This is in the wrong place thanks to a rebase mistake.
Fixes: 101a7321c4
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16500 >
2022-05-16 15:28:15 +02:00
Samuel Pitoiset
b9489ba7d2
radv: do not declare the scratch offset on GFX11
...
It no longer exists.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16492 >
2022-05-16 07:28:27 +00:00