radeonsi: add workaround for issue 2647

Graphics / Mesa 3D Graphics Library / Mesa - Pierre-Eric Pelloux-Prayer [amd.com] - 5 May 2020 09:41 UTC

For unknown reasons pixel shaders in KSP game get executed with infinite interpolation coefficients and this causes an infinite loop in the shader.

This commit adds a hacky workaround that kills pixel shaders if invalid interp coeffs are detected and enables it for KSP.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2174 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2647

64662dd5bae radeonsi: add workaround for issue 2647
src/amd/llvm/ac_nir_to_llvm.c | 26 ++++++++++++++++++++++---
src/amd/llvm/ac_shader_abi.h | 3 +++
src/gallium/drivers/radeonsi/si_debug_options.h | 1 +
src/gallium/drivers/radeonsi/si_pipe.c | 7 ++++++-
src/gallium/drivers/radeonsi/si_pipe.h | 1 +
src/gallium/drivers/radeonsi/si_shader_llvm.c | 7 +++++++
src/util/00-mesa-defaults.conf | 4 ++++
7 files changed, 45 insertions(+), 4 deletions(-)

Upstream: cgit.freedesktop.org


  • Share