radeonsi: remove KILL_PS_INF_INTERP/CLAMP_DIV_BY_ZERO, use screen::options
authorMarek Olšák <marek.olsak@amd.com>
Tue, 22 Sep 2020 06:39:09 +0000 (02:39 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 22 Sep 2020 15:58:51 +0000 (15:58 +0000)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6810>

src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/drivers/radeonsi/si_shader_llvm.c

index 0ceda62..4f72cb9 100644 (file)
@@ -68,7 +68,6 @@ static const struct debug_named_value debug_options[] = {
    {"w64ge", DBG(W64_GE), "Use Wave64 for vertex, tessellation, and geometry shaders."},
    {"w64ps", DBG(W64_PS), "Use Wave64 for pixel shaders."},
    {"w64cs", DBG(W64_CS), "Use Wave64 for computes shaders."},
-   {"noinfinterp", DBG(KILL_PS_INF_INTERP), "Kill PS with infinite interp coeff"},
 
    /* Shader compiler options (with no effect on the shader cache): */
    {"checkir", DBG(CHECK_IR), "Enable additional sanity checks on shader IR"},
@@ -1023,11 +1022,6 @@ static struct pipe_screen *radeonsi_screen_create_impl(struct radeon_winsys *ws,
 #include "si_debug_options.h"
    }
 
-   if (sscreen->options.no_infinite_interp)
-      sscreen->debug_flags |= DBG(KILL_PS_INF_INTERP);
-   if (sscreen->options.clamp_div_by_zero)
-      sscreen->debug_flags |= DBG(CLAMP_DIV_BY_ZERO);
-
    si_disk_cache_create(sscreen);
 
    /* Determine the number of shader compiler threads. */
index f7eb36d..35b39cf 100644 (file)
@@ -161,8 +161,6 @@ enum
    DBG_W64_GE,
    DBG_W64_PS,
    DBG_W64_CS,
-   DBG_KILL_PS_INF_INTERP,
-   DBG_CLAMP_DIV_BY_ZERO,
 
    /* Shader compiler options (with no effect on the shader cache): */
    DBG_CHECK_IR,
index e5f14cc..014e8a1 100644 (file)
@@ -426,7 +426,7 @@ bool si_nir_build_llvm(struct si_shader_context *ctx, struct nir_shader *nir)
          ctx->shader->key.mono.u.ps.interpolate_at_sample_force_center;
 
       ctx->abi.kill_ps_if_inf_interp =
-         (ctx->screen->debug_flags & DBG(KILL_PS_INF_INTERP)) &&
+         ctx->screen->options.no_infinite_interp &&
          (ctx->shader->selector->info.uses_persp_center ||
           ctx->shader->selector->info.uses_persp_centroid ||
           ctx->shader->selector->info.uses_persp_sample);