From 8147c4a4a58a9328a07fd358b54622de0d01c374 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 27 May 2017 01:22:25 +0200 Subject: [PATCH] radeonsi: move handling of DBG_NO_OPT_VARIANT into si_shader_selector_key MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_state_shaders.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index 5a22add0abc..55e881ca529 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -1438,6 +1438,9 @@ static inline void si_shader_selector_key(struct pipe_context *ctx, default: assert(0); } + + if (unlikely(sctx->screen->b.debug_flags & DBG_NO_OPT_VARIANT)) + memset(&key->opt, 0, sizeof(key->opt)); } static void si_build_shader_variant(void *job, int thread_index) @@ -1533,10 +1536,6 @@ static int si_shader_select_with_key(struct si_screen *sscreen, struct si_shader *current = state->current; struct si_shader *iter, *shader = NULL; - if (unlikely(sscreen->b.debug_flags & DBG_NO_OPT_VARIANT)) { - memset(&key->opt, 0, sizeof(key->opt)); - } - again: /* Check if we don't need to change anything. * This path is also used for most shaders that don't need multiple -- 2.30.2