diff options
author | Stéphane Marchesin <[email protected]> | 2011-06-03 18:57:16 -0700 |
---|---|---|
committer | Stéphane Marchesin <[email protected]> | 2011-06-06 12:36:00 -0700 |
commit | 0f091333d1ef403a67a8639ac13d9a9bbe93092a (patch) | |
tree | 35300630d50517940eade2f23a984211def1b0b5 /src/gallium/drivers/i915 | |
parent | 0ce977a66e65ce862f5b29ded6098de91464f304 (diff) |
i915g: implement TGSI_OPCODE_SEQ.
Diffstat (limited to 'src/gallium/drivers/i915')
-rw-r--r-- | src/gallium/drivers/i915/i915_fpc_translate.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/gallium/drivers/i915/i915_fpc_translate.c b/src/gallium/drivers/i915/i915_fpc_translate.c index 9f3c766cb81..695a3966bbb 100644 --- a/src/gallium/drivers/i915/i915_fpc_translate.c +++ b/src/gallium/drivers/i915/i915_fpc_translate.c @@ -852,6 +852,34 @@ i915_translate_instruction(struct i915_fp_compile *p, emit_simple_arith_swap2(p, inst, A0_SLT, 2); break; + case TGSI_OPCODE_SEQ: + /* if we're both >= and <= then we're == */ + src0 = src_vector(p, &inst->Src[0]); + src1 = src_vector(p, &inst->Src[1]); + tmp = i915_get_utemp(p); + + i915_emit_arith(p, + A0_SGE, + tmp, A0_DEST_CHANNEL_ALL, 0, + src0, + src1, 0); + + i915_emit_arith(p, + A0_SGE, + get_result_vector(p, &inst->Dst[0]), + A0_DEST_CHANNEL_ALL, 0, + src1, + src0, 0); + + i915_emit_arith(p, + A0_MUL, + get_result_vector(p, &inst->Dst[0]), + A0_DEST_CHANNEL_ALL, 0, + get_result_vector(p, &inst->Dst[0]), + tmp, 0); + + break; + case TGSI_OPCODE_SUB: src0 = src_vector(p, &inst->Src[0]); src1 = src_vector(p, &inst->Src[1]); |