diff options
author | Dave Airlie <airlied@redhat.com> | 2016-01-19 04:19:29 +0000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-02-19 11:19:05 +1000 |
commit | a21e2c3c9819688b20ed8eeb29000cb3ca9d854d (patch) | |
tree | 097b8b36391cf0ed2edaf388ccd0673978d23ae4 | |
parent | b210d8d7d32b84c00b312fd3c3b3c8673b0d9a2d (diff) |
hack some more double opcodes
-rw-r--r-- | src/vrend_shader.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/vrend_shader.c b/src/vrend_shader.c index 1f23ca3..9a0e29b 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -2060,6 +2060,7 @@ iter_instruction(struct tgsi_iterate_context *iter, EMIT_BUF_WITH_RET(ctx, buf); break; case TGSI_OPCODE_FRC: + case TGSI_OPCODE_DFRAC: emit_op1("fract"); EMIT_BUF_WITH_RET(ctx, buf); break; @@ -2128,11 +2129,11 @@ iter_instruction(struct tgsi_iterate_context *iter, EMIT_BUF_WITH_RET(ctx, buf); break; case TGSI_OPCODE_MAD: - case TGSI_OPCODE_DMAD: snprintf(buf, 255, "%s = %s((%s * %s + %s)%s);\n", dsts[0], dstconv, srcs[0], srcs[1], srcs[2], writemask); EMIT_BUF_WITH_RET(ctx, buf); break; case TGSI_OPCODE_UMAD: + case TGSI_OPCODE_DMAD: snprintf(buf, 255, "%s = %s(%s((%s * %s + %s)%s));\n", dsts[0], dstconv, dtypeprefix, srcs[0], srcs[1], srcs[2], writemask); EMIT_BUF_WITH_RET(ctx, buf); break; @@ -2172,6 +2173,10 @@ iter_instruction(struct tgsi_iterate_context *iter, snprintf(buf, 255, "%s = %s(ivec4(%s));\n", dsts[0], dstconv, srcs[0]); EMIT_BUF_WITH_RET(ctx, buf); break; + case TGSI_OPCODE_I2D: + snprintf(buf, 255, "%s = %s(ivec4(%s));\n", dsts[0], dstconv, srcs[0]); + EMIT_BUF_WITH_RET(ctx, buf); + break; case TGSI_OPCODE_D2F: snprintf(buf, 255, "%s = %s(%s);\n", dsts[0], dstconv, srcs[0]); EMIT_BUF_WITH_RET(ctx, buf); @@ -2180,14 +2185,30 @@ iter_instruction(struct tgsi_iterate_context *iter, snprintf(buf, 255, "%s = %s(uvec4(%s));\n", dsts[0], dstconv, srcs[0]); EMIT_BUF_WITH_RET(ctx, buf); break; + case TGSI_OPCODE_U2D: + snprintf(buf, 255, "%s = %s(uvec4(%s));\n", dsts[0], dstconv, srcs[0]); + EMIT_BUF_WITH_RET(ctx, buf); + break; case TGSI_OPCODE_F2I: snprintf(buf, 255, "%s = %s(%s(ivec4(%s)));\n", dsts[0], dstconv, dtypeprefix, srcs[0]); EMIT_BUF_WITH_RET(ctx, buf); break; + case TGSI_OPCODE_D2I: + snprintf(buf, 255, "%s = %s(%s(ivec4(%s)));\n", dsts[0], dstconv, dtypeprefix, srcs[0]); + EMIT_BUF_WITH_RET(ctx, buf); + break; case TGSI_OPCODE_F2U: snprintf(buf, 255, "%s = %s(%s(uvec4(%s)));\n", dsts[0], dstconv, dtypeprefix, srcs[0]); EMIT_BUF_WITH_RET(ctx, buf); break; + case TGSI_OPCODE_D2U: + snprintf(buf, 255, "%s = %s(%s(uvec4(%s)));\n", dsts[0], dstconv, dtypeprefix, srcs[0]); + EMIT_BUF_WITH_RET(ctx, buf); + break; + case TGSI_OPCODE_F2D: + snprintf(buf, 255, "%s = %s(%s(uvec4(%s)));\n", dsts[0], dstconv, dtypeprefix, srcs[0]); + EMIT_BUF_WITH_RET(ctx, buf); + break; case TGSI_OPCODE_NOT: snprintf(buf, 255, "%s = %s(uintBitsToFloat(~(uvec4(%s))));\n", dsts[0], dstconv, srcs[0]); EMIT_BUF_WITH_RET(ctx, buf); @@ -2206,6 +2227,7 @@ iter_instruction(struct tgsi_iterate_context *iter, break; case TGSI_OPCODE_USEQ: case TGSI_OPCODE_FSEQ: + case TGSI_OPCODE_DSEQ: emit_ucompare("equal"); EMIT_BUF_WITH_RET(ctx, buf); break; |