From b547cd692a661c69917a7412ef008a488396f2f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20No=C3=ABl?= Date: Tue, 8 Mar 2022 15:38:40 +0100 Subject: [PATCH] shader: Simplify condition for the first pass of convert_shader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ctx variable is set to 0 on the line before so ctx.prog_type is always 0 which is TGSI_PROCESSOR_FRAGMENT. Signed-off-by: Corentin Noël Part-of: --- src/vrend_shader.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/vrend_shader.c b/src/vrend_shader.c index 1557986..11a7975 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -7295,9 +7295,7 @@ bool vrend_convert_shader(const struct vrend_context *rctx, memset(&ctx, 0, sizeof(struct dump_ctx)); /* First pass to deal with edge cases. */ - if (ctx.prog_type == TGSI_PROCESSOR_FRAGMENT || - ctx.prog_type == TGSI_PROCESSOR_VERTEX) - ctx.iter.iterate_declaration = iter_decls; + ctx.iter.iterate_declaration = iter_decls; ctx.iter.iterate_instruction = analyze_instruction; bret = tgsi_iterate_shader(tokens, &ctx.iter); if (bret == false)