summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-12-08 11:57:15 -0800
committerEric Anholt <[email protected]>2014-12-08 16:08:13 -0800
commit5045d8ca421168a8ba2eb861298fc67be4f1eb03 (patch)
tree313bb67d10ae05be1dc72afff6836730cfb7d2cd
parentc16436149c1ca78f86ba992977fe6083b732bc1d (diff)
vc4: Add support for TGSI_OPCODE_UCMP.
This is being emitted now from st_glsl_to_tgsi.cpp.
-rw-r--r--src/gallium/drivers/vc4/vc4_program.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index 5fab1deb6bf..d21522fdcd6 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -569,6 +569,17 @@ tgsi_to_qir_cmp(struct vc4_compile *c,
}
static struct qreg
+tgsi_to_qir_ucmp(struct vc4_compile *c,
+ struct tgsi_full_instruction *tgsi_inst,
+ enum qop op, struct qreg *src, int i)
+{
+ qir_SF(c, src[0 * 4 + i]);
+ return qir_SEL_X_Y_ZC(c,
+ src[1 * 4 + i],
+ src[2 * 4 + i]);
+}
+
+static struct qreg
tgsi_to_qir_mad(struct vc4_compile *c,
struct tgsi_full_instruction *tgsi_inst,
enum qop op, struct qreg *src, int i)
@@ -1292,6 +1303,7 @@ emit_tgsi_instruction(struct vc4_compile *c,
[TGSI_OPCODE_ISLT] = { 0, tgsi_to_qir_islt },
[TGSI_OPCODE_CMP] = { 0, tgsi_to_qir_cmp },
+ [TGSI_OPCODE_UCMP] = { 0, tgsi_to_qir_ucmp },
[TGSI_OPCODE_MAD] = { 0, tgsi_to_qir_mad },
[TGSI_OPCODE_RCP] = { QOP_RCP, tgsi_to_qir_rcp },
[TGSI_OPCODE_RSQ] = { QOP_RSQ, tgsi_to_qir_rsq },