shader: restore the original CMP

e4880f6b broke the original CMP translation that looks correct
macos/master
Marc-André Lureau 10 years ago committed by Dave Airlie
parent 002354dd91
commit 7f050c7e5b
  1. 3
      src/vrend_shader.c

@ -1714,6 +1714,9 @@ iter_instruction(struct tgsi_iterate_context *iter,
EMIT_BUF_WITH_RET(ctx, buf);
break;
case TGSI_OPCODE_CMP:
snprintf(buf, 255, "%s = mix(%s, %s, greaterThanEqual(%s, vec4(0.0)))%s;\n", dsts[0], srcs[1], srcs[2], srcs[0], writemask);
EMIT_BUF_WITH_RET(ctx, buf);
break;
case TGSI_OPCODE_UCMP:
snprintf(buf, 255, "%s = mix(%s, %s, notEqual(%s, vec4(0.0)))%s;\n", dsts[0], srcs[2], srcs[1], srcs[0], writemask);
EMIT_BUF_WITH_RET(ctx, buf);

Loading…
Cancel
Save