From fb971411312cb7362c093564c7631dc6fb3cacc8 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 6 Feb 2024 08:43:13 -0500 Subject: [PATCH] zink: always enable glsl_correct_derivatives_after_discard this matches radeonsi behavior and eliminates the driconf handling Part-of: --- src/gallium/drivers/zink/zink_compiler.c | 4 +--- src/gallium/drivers/zink/zink_screen.c | 1 - src/gallium/drivers/zink/zink_types.h | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/gallium/drivers/zink/zink_compiler.c b/src/gallium/drivers/zink/zink_compiler.c index 303c7a22e86..fcfa4c1c1ee 100644 --- a/src/gallium/drivers/zink/zink_compiler.c +++ b/src/gallium/drivers/zink/zink_compiler.c @@ -5493,9 +5493,7 @@ zink_shader_create(struct zink_screen *screen, struct nir_shader *nir) NIR_PASS_V(nir, nir_lower_frexp); /* TODO: Use the spirv instructions for this. */ if (screen->info.have_EXT_shader_demote_to_helper_invocation) { - NIR_PASS_V(nir, nir_lower_discard_or_demote, - screen->driconf.glsl_correct_derivatives_after_discard || - nir->info.use_legacy_math_rules); + NIR_PASS_V(nir, nir_lower_discard_or_demote, true); } if (screen->need_2D_zs) diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 26e61d381c4..09ce0dc4b4a 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -3179,7 +3179,6 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev driParseConfigFiles(config->options, config->options_info, 0, "zink", NULL, NULL, NULL, 0, NULL, 0); screen->driconf.dual_color_blend_by_location = driQueryOptionb(config->options, "dual_color_blend_by_location"); - screen->driconf.glsl_correct_derivatives_after_discard = driQueryOptionb(config->options, "glsl_correct_derivatives_after_discard"); //screen->driconf.inline_uniforms = driQueryOptionb(config->options, "radeonsi_inline_uniforms"); screen->driconf.emulate_point_smooth = driQueryOptionb(config->options, "zink_emulate_point_smooth"); screen->driconf.zink_shader_object_enable = driQueryOptionb(config->options, "zink_shader_object_enable"); diff --git a/src/gallium/drivers/zink/zink_types.h b/src/gallium/drivers/zink/zink_types.h index 6dd95746a0c..a68050ddd2d 100644 --- a/src/gallium/drivers/zink/zink_types.h +++ b/src/gallium/drivers/zink/zink_types.h @@ -1530,7 +1530,6 @@ struct zink_screen { struct { bool dual_color_blend_by_location; - bool glsl_correct_derivatives_after_discard; bool inline_uniforms; bool emulate_point_smooth; bool zink_shader_object_enable;