summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorStéphane Marchesin <[email protected]>2011-12-15 12:31:36 -0800
committerStéphane Marchesin <[email protected]>2011-12-19 18:24:39 -0800
commitc661843ab6adc97b54debaccfb29b897b12ab76d (patch)
tree5dc6d6df768ddf3c4f9c9a229d2f8818ab83ab5f /src/gallium/drivers
parent3c01aefe5f9b8ffb31bbdd9ed5b200e830478a81 (diff)
i915g: Implement KILP.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/i915/i915_fpc_translate.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/gallium/drivers/i915/i915_fpc_translate.c b/src/gallium/drivers/i915/i915_fpc_translate.c
index 887721574fa..beb0e0d6390 100644
--- a/src/gallium/drivers/i915/i915_fpc_translate.c
+++ b/src/gallium/drivers/i915/i915_fpc_translate.c
@@ -510,9 +510,9 @@ i915_translate_instruction(struct i915_fp_compile *p,
src0 = src_vector(p, &inst->Src[0], fs);
src1 = src_vector(p, &inst->Src[1], fs);
src2 = src_vector(p, &inst->Src[2], fs);
- i915_emit_arith(p, A0_CMP,
+ i915_emit_arith(p, A0_CMP,
get_result_vector(p, &inst->Dst[0]),
- get_result_flags(inst),
+ get_result_flags(inst),
0, src0, src2, src1); /* NOTE: order of src2, src1 */
break;
@@ -655,7 +655,16 @@ i915_translate_instruction(struct i915_fp_compile *p,
break;
case TGSI_OPCODE_KILP:
- assert(0); /* not tested yet */
+ /* We emit an unconditional kill; we may want to revisit
+ * if we ever implement conditionals.
+ */
+ i915_emit_texld(p,
+ tmp, /* dest reg: a dummy reg */
+ A0_DEST_CHANNEL_ALL, /* dest writemask */
+ 0, /* sampler */
+ negate(swizzle(0, ONE, ONE, ONE, ONE), 1, 1, 1, 1), /* coord */
+ T0_TEXKILL, /* opcode */
+ 1); /* num_coord */
break;
case TGSI_OPCODE_LG2: