Mesa (master): freedreno/ir3: trans_kill cleanup

Rob Clark robclark at kemper.freedesktop.org
Sat Dec 20 17:09:27 UTC 2014


Module: Mesa
Branch: master
Commit: f20a0acd433acc6fe747bd6bf0179e0fd9e8e157
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f20a0acd433acc6fe747bd6bf0179e0fd9e8e157

Author: Rob Clark <robclark at freedesktop.org>
Date:   Sat Dec 20 11:46:43 2014 -0500

freedreno/ir3: trans_kill cleanup

trans_kill() only handles the single opcode.  Drop the remnant of a time
when both KILL and KILL_IF were handled by the same fxn.

Signed-off-by: Rob Clark <robclark at freedesktop.org>

---

 src/gallium/drivers/freedreno/ir3/ir3_compiler.c |   19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
index 896f043..9477d54 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
@@ -2008,18 +2008,13 @@ trans_kill(const struct instr_translater *t,
 	struct ir3_instruction *instr, *immed, *cond = NULL;
 	bool inv = false;
 
-	switch (t->tgsi_opc) {
-	case TGSI_OPCODE_KILL:
-		/* unconditional kill, use enclosing if condition: */
-		if (ctx->branch_count > 0) {
-			unsigned int idx = ctx->branch_count - 1;
-			cond = ctx->branch[idx].cond;
-			inv = ctx->branch[idx].inv;
-		} else {
-			cond = create_immed(ctx, 1.0);
-		}
-
-		break;
+	/* unconditional kill, use enclosing if condition: */
+	if (ctx->branch_count > 0) {
+		unsigned int idx = ctx->branch_count - 1;
+		cond = ctx->branch[idx].cond;
+		inv = ctx->branch[idx].inv;
+	} else {
+		cond = create_immed(ctx, 1.0);
 	}
 
 	compile_assert(ctx, cond);




More information about the mesa-commit mailing list