shader: do not leak prefix from previous loop iteration

This fixes rendering in Minecraft (Java Edition), where we would
otherwise incorrectly mark a fog-inputs as flat.

While we're at it, fix a similar issue for auxprefix.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Erik Faye-Lund 6 years ago committed by Jakob Bornecrantz
parent c63635dcc8
commit bf233d91b6
  1. 2
      src/vrend_shader.c

@ -4587,6 +4587,8 @@ static char *emit_ios(struct dump_ctx *ctx, char *glsl_hdr)
snprintf(buf, 255, "layout(location=%d) ", ctx->inputs[i].first);
STRCAT_WITH_RET(glsl_hdr, buf);
}
prefix = "";
auxprefix = "";
if (ctx->prog_type == TGSI_PROCESSOR_TESS_EVAL && ctx->inputs[i].name == TGSI_SEMANTIC_PATCH)
prefix = "patch ";
else if (ctx->prog_type == TGSI_PROCESSOR_FRAGMENT &&

Loading…
Cancel
Save