summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga
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/svga
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/svga')
-rw-r--r--src/gallium/drivers/svga/svga_tgsi_insn.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c
index 3add4c03d09..c30613d802d 100644
--- a/src/gallium/drivers/svga/svga_tgsi_insn.c
+++ b/src/gallium/drivers/svga/svga_tgsi_insn.c
@@ -1382,8 +1382,8 @@ emit_sub(struct svga_shader_emitter *emit,
static boolean
-emit_kil(struct svga_shader_emitter *emit,
- const struct tgsi_full_instruction *insn)
+emit_kill_if(struct svga_shader_emitter *emit,
+ const struct tgsi_full_instruction *insn)
{
const struct tgsi_full_src_register *reg = &insn->Src[0];
struct src_register src0, srcIn;
@@ -1439,10 +1439,10 @@ emit_kil(struct svga_shader_emitter *emit,
/**
- * mesa state tracker always emits kilp as an unconditional kil
+ * unconditional kill
*/
static boolean
-emit_kilp(struct svga_shader_emitter *emit,
+emit_kill(struct svga_shader_emitter *emit,
const struct tgsi_full_instruction *insn)
{
SVGA3dShaderDestToken temp;
@@ -2843,8 +2843,8 @@ svga_emit_instruction(struct svga_shader_emitter *emit,
/* TGSI always finishes the main func with an END */
return emit_end( emit );
- case TGSI_OPCODE_KIL:
- return emit_kil( emit, insn );
+ case TGSI_OPCODE_KILL_IF:
+ return emit_kill_if( emit, insn );
/* Selection opcodes. The underlying language is fairly
* non-orthogonal about these.
@@ -2929,8 +2929,8 @@ svga_emit_instruction(struct svga_shader_emitter *emit,
case TGSI_OPCODE_XPD:
return emit_xpd( emit, insn );
- case TGSI_OPCODE_KILP:
- return emit_kilp( emit, insn );
+ case TGSI_OPCODE_KILL:
+ return emit_kill( emit, insn );
case TGSI_OPCODE_DST:
return emit_dst_insn( emit, insn );
@@ -3420,7 +3420,7 @@ needs_to_create_zero( struct svga_shader_emitter *emit )
emit->info.opcode_count[TGSI_OPCODE_EXP] >= 1 ||
emit->info.opcode_count[TGSI_OPCODE_LOG] >= 1 ||
emit->info.opcode_count[TGSI_OPCODE_XPD] >= 1 ||
- emit->info.opcode_count[TGSI_OPCODE_KILP] >= 1)
+ emit->info.opcode_count[TGSI_OPCODE_KILL] >= 1)
return TRUE;
return FALSE;