vrend: Fix TGSI UIF/IF behavior.

It is specified in the tgsi.rst docs (and tgsi_exec.c matches) to only
look at the .x channel.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
Eric Anholt 4 years ago
parent 4455b3fd7a
commit d5cced1e82
  1. 2
      src/vrend_shader.c

@ -4893,7 +4893,7 @@ iter_instruction(struct tgsi_iterate_context *iter,
break; break;
case TGSI_OPCODE_IF: case TGSI_OPCODE_IF:
case TGSI_OPCODE_UIF: case TGSI_OPCODE_UIF:
emit_buff(&ctx->glsl_strbufs, "if (any(bvec4(%s))) {\n", srcs[0]); emit_buff(&ctx->glsl_strbufs, "if (bool(%s.x)) {\n", srcs[0]);
indent_buf(&ctx->glsl_strbufs); indent_buf(&ctx->glsl_strbufs);
break; break;
case TGSI_OPCODE_ELSE: case TGSI_OPCODE_ELSE:

Loading…
Cancel
Save