summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/compiler
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/r300/compiler
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/r300/compiler')
-rw-r--r--src/gallium/drivers/r300/compiler/r3xx_fragprog.c2
-rw-r--r--src/gallium/drivers/r300/compiler/radeon_program_alu.c12
-rw-r--r--src/gallium/drivers/r300/compiler/radeon_program_alu.h2
3 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/drivers/r300/compiler/r3xx_fragprog.c b/src/gallium/drivers/r300/compiler/r3xx_fragprog.c
index 7c9a3521162..d03462c52c8 100644
--- a/src/gallium/drivers/r300/compiler/r3xx_fragprog.c
+++ b/src/gallium/drivers/r300/compiler/r3xx_fragprog.c
@@ -119,7 +119,7 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
{"rewrite depth out", 1, 1, rc_rewrite_depth_out, NULL},
/* This transformation needs to be done before any of the IF
* instructions are modified. */
- {"transform KILP", 1, 1, rc_transform_KILP, NULL},
+ {"transform KILP", 1, 1, rc_transform_KILL, NULL},
{"unroll loops", 1, is_r500, rc_unroll_loops, NULL},
{"transform loops", 1, !is_r500, rc_transform_loops, NULL},
{"emulate branches", 1, !is_r500, rc_emulate_branches, NULL},
diff --git a/src/gallium/drivers/r300/compiler/radeon_program_alu.c b/src/gallium/drivers/r300/compiler/radeon_program_alu.c
index 4dc4250699e..c8aabc255d0 100644
--- a/src/gallium/drivers/r300/compiler/radeon_program_alu.c
+++ b/src/gallium/drivers/r300/compiler/radeon_program_alu.c
@@ -1209,14 +1209,14 @@ int radeonTransformDeriv(struct radeon_compiler* c,
/**
* IF Temp[0].x -> IF Temp[0].x
* ... -> ...
- * KILP -> KIL -abs(Temp[0].x)
+ * KILL -> KIL -abs(Temp[0].x)
* ... -> ...
* ENDIF -> ENDIF
*
* === OR ===
*
* IF Temp[0].x -\
- * KILP - > KIL -abs(Temp[0].x)
+ * KILL - > KIL -abs(Temp[0].x)
* ENDIF -/
*
* === OR ===
@@ -1225,18 +1225,18 @@ int radeonTransformDeriv(struct radeon_compiler* c,
* ... -> ...
* ELSE -> ELSE
* ... -> ...
- * KILP -> KIL -abs(Temp[0].x)
+ * KILL -> KIL -abs(Temp[0].x)
* ... -> ...
* ENDIF -> ENDIF
*
* === OR ===
*
- * KILP -> KIL -none.1111
+ * KILL -> KIL -none.1111
*
* This needs to be done in its own pass, because it might modify the
- * instructions before and after KILP.
+ * instructions before and after KILL.
*/
-void rc_transform_KILP(struct radeon_compiler * c, void *user)
+void rc_transform_KILL(struct radeon_compiler * c, void *user)
{
struct rc_instruction * inst;
for (inst = c->Program.Instructions.Next;
diff --git a/src/gallium/drivers/r300/compiler/radeon_program_alu.h b/src/gallium/drivers/r300/compiler/radeon_program_alu.h
index 8f8dc70d52e..d1006827616 100644
--- a/src/gallium/drivers/r300/compiler/radeon_program_alu.h
+++ b/src/gallium/drivers/r300/compiler/radeon_program_alu.h
@@ -60,7 +60,7 @@ int radeonTransformDeriv(
struct rc_instruction * inst,
void*);
-void rc_transform_KILP(struct radeon_compiler * c,
+void rc_transform_KILL(struct radeon_compiler * c,
void *user);
int rc_force_output_alpha_to_one(struct radeon_compiler *c,