shader: use uint comparison for UCMP

Fixes a few piglit tests, such as:
spec/glsl-1.30/execution/switch/fs-default_last
macos/master
Marc-André Lureau 10 years ago committed by Dave Airlie
parent 7f050c7e5b
commit 400c7df8b5
  1. 2
      src/vrend_shader.c

@ -1718,7 +1718,7 @@ iter_instruction(struct tgsi_iterate_context *iter,
EMIT_BUF_WITH_RET(ctx, buf); EMIT_BUF_WITH_RET(ctx, buf);
break; break;
case TGSI_OPCODE_UCMP: 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); snprintf(buf, 255, "%s = mix(%s, %s, notEqual(floatBitsToUint(%s), uvec4(0.0)))%s;\n", dsts[0], srcs[2], srcs[1], srcs[0], writemask);
EMIT_BUF_WITH_RET(ctx, buf); EMIT_BUF_WITH_RET(ctx, buf);
break; break;
case TGSI_OPCODE_END: case TGSI_OPCODE_END:

Loading…
Cancel
Save