radv: use the trap handler to detect faulty shaders/instructions It should reliably report the faulty shader but the faulty instruction is inacurate, especially for memory violations because it's reported when the addr is processed. It will be improved by emitting more wait-states. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6384>
radv: add initial trap handler support with RADV_TRAP_HANDLER=1 A trap handler is used to handle shader exceptions like memory violations, divide by zero etc. The trap handler shader code will help to identify the faulty shader/instruction and to report more information for better debugging. This has only been tested on GFX8, though it should work on GFX6-GFX7. It seems we need a different implemenation for GFX9+. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6384>
radv: Add forcecompress debug flag. Enables DCC/HTILE/CMASK/FMASK when supported, not just when we think it is beneficial. This is helpful to detect compression bugs with CTS. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6252>
radv: use bitshifts for debug enum values Explicit values are getting out of hand. Signed-off-by: Simon Ser <contact@emersion.fr> 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/5735>
radv: enable VK_AMD_shader_ballot on GFX6-7 with both compiler backends It gives +1-2 FPS with Doom Eternal on Pitcairn. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5659>
radv: remove the load/store workaround for Monster Hunter World with LLVM Now that ACO is default, this is pointless. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5658>
radv: remove the shader ballot workaround for Youngblood with LLVM Now that ACO is default, this is now pointless. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5658>
radv: enable ACO by default No more dragons have been seen, caution is still required... Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5445>
radv: introduce RADV_DEBUG=llvm option This option enables the LLVM compiler backend to be used for shader compilation Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5445>
radv: update internal reference Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4630>
radv: use nir_lower_discard_to_demote to work around game bugs Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4047>
radv: implement a dummy winsys for creating devices without AMDGPU To allow developers to test the compiler backends without having any AMD GPUs. To create a null device, set eg. RADV_FORCE_FAMILY=polaris10 in your environment. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3872> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3872>
radv: remove unnecessary RADV_DEBUG=nobatchchain option It was used in the past but nowadays chained submissions work fine. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3791> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3791>
radv: remove RADV_DEBUG=nosisched and RADV_PERFTEST=sisched They are no longer useful. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3789>
radv: make sure to not submit any IBs when RADV_FORCE_FAMILY is set To prevent GPU hangs. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3654>
radv: remove useless RADV_DEBUG=unsafemath debug option This option is useless and shouldn't be used at all. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
radv: add a note about perftest/debug options Now that all environment variables are documented, it would be appreciated if we can keep this up-to-date. [skip ci] Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
radv: fix perftest options RADV_PERFTEST=outooforder has been removed a while ago. This fixes dumping the options into hang reports. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
radv: fix dumping SPIR-V into hang reports Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
radv: add debug option to turn off in memory cache This can be usefull for debugging the on disk cache, but is also useful in the following patch for secure compiles which will be used to compile huge pipeline collections. These pipeline collections can be multiple GBs and the in memory cache grows to multiple GBs very quickly when they are compiled so we want to be able to turn off the in memory cache. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>