shader: Simplify condition for the first pass of convert_shader

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 <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/730>
macos/master
Corentin Noël 3 years ago committed by Marge Bot
parent 9c0e1f153f
commit b547cd692a
  1. 4
      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)

Loading…
Cancel
Save