summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-07-11 17:02:37 -0600
committerBrian Paul <[email protected]>2013-07-12 08:32:51 -0600
commit46205ab8cc03cbda6bbc0c958e277f972973ebfe (patch)
treebd5f689a9626a410237bbfa8523c59c8299181a5 /src/gallium/drivers/i915
parentf501baabdb5cd356faad0e419c64b2ac312c5756 (diff)
tgsi: rename the TGSI fragment kill opcodes
TGSI_OPCODE_KIL and KILP had confusing names. The former was conditional kill (if any src component < 0). The later was unconditional kill. At one time KILP was supposed to work with NV-style condition codes/predicates but we never had that in TGSI. This patch renames both opcodes: TGSI_OPCODE_KIL -> KILL_IF (kill if src.xyzw < 0) TGSI_OPCODE_KILP -> KILL (unconditional kill) Note: I didn't just transpose the opcode names to help ensure that I didn't miss updating any code anywhere. I believe I've updated all the relevant code and comments but I'm not 100% sure that some drivers had this right in the first place. For example, the radeon driver might have llvm.AMDGPU.kill and llvm.AMDGPU.kilp mixed up. Driver authors should review their code. Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/i915')
-rw-r--r--src/gallium/drivers/i915/i915_fpc_optimize.c4
-rw-r--r--src/gallium/drivers/i915/i915_fpc_translate.c8
2 files changed, 5 insertions, 7 deletions
diff --git a/src/gallium/drivers/i915/i915_fpc_optimize.c b/src/gallium/drivers/i915/i915_fpc_optimize.c
index ce1c5f98301..ff27d5066b6 100644
--- a/src/gallium/drivers/i915/i915_fpc_optimize.c
+++ b/src/gallium/drivers/i915/i915_fpc_optimize.c
@@ -65,8 +65,8 @@ static boolean same_src_reg(struct i915_full_src_register* d1, struct i915_full_
static boolean has_destination(unsigned opcode)
{
return (opcode != TGSI_OPCODE_NOP &&
- opcode != TGSI_OPCODE_KIL &&
- opcode != TGSI_OPCODE_KILP &&
+ opcode != TGSI_OPCODE_KILL_IF &&
+ opcode != TGSI_OPCODE_KILL &&
opcode != TGSI_OPCODE_END &&
opcode != TGSI_OPCODE_RET);
}
diff --git a/src/gallium/drivers/i915/i915_fpc_translate.c b/src/gallium/drivers/i915/i915_fpc_translate.c
index def9a03d377..765a1012c90 100644
--- a/src/gallium/drivers/i915/i915_fpc_translate.c
+++ b/src/gallium/drivers/i915/i915_fpc_translate.c
@@ -662,7 +662,7 @@ i915_translate_instruction(struct i915_fp_compile *p,
emit_simple_arith(p, inst, A0_FRC, 1, fs);
break;
- case TGSI_OPCODE_KIL:
+ case TGSI_OPCODE_KILL_IF:
/* kill if src[0].x < 0 || src[0].y < 0 ... */
src0 = src_vector(p, &inst->Src[0], fs);
tmp = i915_get_utemp(p);
@@ -676,10 +676,8 @@ i915_translate_instruction(struct i915_fp_compile *p,
1); /* num_coord */
break;
- case TGSI_OPCODE_KILP:
- /* We emit an unconditional kill; we may want to revisit
- * if we ever implement conditionals.
- */
+ case TGSI_OPCODE_KILL:
+ /* unconditional kill */
tmp = i915_get_utemp(p);
i915_emit_texld(p,