summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2012-05-05 14:36:40 +0200
committerChristoph Bumiller <[email protected]>2012-05-09 17:09:30 +0200
commit6ae12bac596ce3a6aa8e09f638ad2cb4a7c18e5c (patch)
treeb38186d6df4facf35098bdfaab267788547c55e4 /src/gallium/drivers/i915
parent8c98635d4fc7437b05debe337aef2377df685c0c (diff)
gallium/drivers: handle TGSI_OPCODE_CEIL
Diffstat (limited to 'src/gallium/drivers/i915')
-rw-r--r--src/gallium/drivers/i915/i915_fpc_translate.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/drivers/i915/i915_fpc_translate.c b/src/gallium/drivers/i915/i915_fpc_translate.c
index 94c0c69fcae..def9a03d377 100644
--- a/src/gallium/drivers/i915/i915_fpc_translate.c
+++ b/src/gallium/drivers/i915/i915_fpc_translate.c
@@ -512,6 +512,22 @@ i915_translate_instruction(struct i915_fp_compile *p,
emit_simple_arith(p, inst, A0_ADD, 2, fs);
break;
+ case TGSI_OPCODE_CEIL:
+ src0 = src_vector(p, &inst->Src[0], fs);
+ tmp = i915_get_utemp(p);
+ flags = get_result_flags(inst);
+ i915_emit_arith(p,
+ A0_FLR,
+ tmp,
+ flags & A0_DEST_CHANNEL_ALL, 0,
+ negate(src0, 1, 1, 1, 1), 0, 0);
+ i915_emit_arith(p,
+ A0_MOV,
+ get_result_vector(p, &inst->Dst[0]),
+ flags, 0,
+ negate(tmp, 1, 1, 1, 1), 0, 0);
+ break;
+
case TGSI_OPCODE_CMP:
src0 = src_vector(p, &inst->Src[0], fs);
src1 = src_vector(p, &inst->Src[1], fs);