summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-09-09 22:52:52 -0400
committerRob Clark <[email protected]>2014-09-12 16:25:47 -0400
commit572ffca050ff646bd9cdd031a44ec97966741745 (patch)
treef0425df245427abac759b0223e50e2f6005d5c78 /src/gallium
parent80058c0f08ea94d3de96909027a792e397fa9262 (diff)
freedreno/ir3: fix FSLT/etc handling to return 0/-1 instead of 0/1.0
Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_compiler.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
index 25211feb024..48cdcb774e0 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
@@ -1411,21 +1411,25 @@ trans_cmp(const struct instr_translater *t,
switch (t->tgsi_opc) {
case TGSI_OPCODE_SEQ:
- case TGSI_OPCODE_FSEQ:
case TGSI_OPCODE_SGE:
- case TGSI_OPCODE_FSGE:
case TGSI_OPCODE_SLE:
case TGSI_OPCODE_SNE:
- case TGSI_OPCODE_FSNE:
case TGSI_OPCODE_SGT:
case TGSI_OPCODE_SLT:
- case TGSI_OPCODE_FSLT:
/* cov.u16f16 dst, tmp0 */
instr = instr_create(ctx, 1, 0);
instr->cat1.src_type = get_utype(ctx);
instr->cat1.dst_type = get_ftype(ctx);
vectorize(ctx, instr, dst, 1, tmp_src, 0);
break;
+ case TGSI_OPCODE_FSEQ:
+ case TGSI_OPCODE_FSGE:
+ case TGSI_OPCODE_FSNE:
+ case TGSI_OPCODE_FSLT:
+ /* absneg.s dst, (neg)tmp0 */
+ instr = instr_create(ctx, 2, OPC_ABSNEG_S);
+ vectorize(ctx, instr, dst, 1, tmp_src, IR3_REG_NEGATE);
+ break;
case TGSI_OPCODE_CMP:
a1 = &inst->Src[1].Register;
a2 = &inst->Src[2].Register;