diff options
author | Brian Paul <[email protected]> | 2013-07-11 17:02:37 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-07-12 08:32:51 -0600 |
commit | 46205ab8cc03cbda6bbc0c958e277f972973ebfe (patch) | |
tree | bd5f689a9626a410237bbfa8523c59c8299181a5 /src/gallium/drivers/r600 | |
parent | f501baabdb5cd356faad0e419c64b2ac312c5756 (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/r600')
-rw-r--r-- | src/gallium/drivers/r600/r600_shader.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 3af4ed93289..dc44faee36b 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -2093,7 +2093,7 @@ static int tgsi_kill(struct r600_shader_ctx *ctx) alu.src[0].sel = V_SQ_ALU_SRC_0; - if (ctx->inst_info->tgsi_opcode == TGSI_OPCODE_KILP) { + if (ctx->inst_info->tgsi_opcode == TGSI_OPCODE_KILL) { alu.src[1].sel = V_SQ_ALU_SRC_1; alu.src[1].neg = 1; } else { @@ -5671,7 +5671,7 @@ static struct r600_shader_tgsi_instruction r600_shader_tgsi_instruction[] = { {TGSI_OPCODE_COS, 0, ALU_OP1_COS, tgsi_trig}, {TGSI_OPCODE_DDX, 0, FETCH_OP_GET_GRADIENTS_H, tgsi_tex}, {TGSI_OPCODE_DDY, 0, FETCH_OP_GET_GRADIENTS_V, tgsi_tex}, - {TGSI_OPCODE_KILP, 0, ALU_OP2_KILLGT, tgsi_kill}, /* predicated kill */ + {TGSI_OPCODE_KILL, 0, ALU_OP2_KILLGT, tgsi_kill}, /* unconditional kill */ {TGSI_OPCODE_PK2H, 0, ALU_OP0_NOP, tgsi_unsupported}, {TGSI_OPCODE_PK2US, 0, ALU_OP0_NOP, tgsi_unsupported}, {TGSI_OPCODE_PK4B, 0, ALU_OP0_NOP, tgsi_unsupported}, @@ -5753,7 +5753,7 @@ static struct r600_shader_tgsi_instruction r600_shader_tgsi_instruction[] = { /* gap */ {114, 0, ALU_OP0_NOP, tgsi_unsupported}, {TGSI_OPCODE_BREAKC, 0, ALU_OP0_NOP, tgsi_unsupported}, - {TGSI_OPCODE_KIL, 0, ALU_OP2_KILLGT, tgsi_kill}, /* conditional kill */ + {TGSI_OPCODE_KILL_IF, 0, ALU_OP2_KILLGT, tgsi_kill}, /* conditional kill */ {TGSI_OPCODE_END, 0, ALU_OP0_NOP, tgsi_end}, /* aka HALT */ /* gap */ {118, 0, ALU_OP0_NOP, tgsi_unsupported}, @@ -5864,7 +5864,7 @@ static struct r600_shader_tgsi_instruction eg_shader_tgsi_instruction[] = { {TGSI_OPCODE_COS, 0, ALU_OP1_COS, tgsi_trig}, {TGSI_OPCODE_DDX, 0, FETCH_OP_GET_GRADIENTS_H, tgsi_tex}, {TGSI_OPCODE_DDY, 0, FETCH_OP_GET_GRADIENTS_V, tgsi_tex}, - {TGSI_OPCODE_KILP, 0, ALU_OP2_KILLGT, tgsi_kill}, /* predicated kill */ + {TGSI_OPCODE_KILL, 0, ALU_OP2_KILLGT, tgsi_kill}, /* unconditional kill */ {TGSI_OPCODE_PK2H, 0, ALU_OP0_NOP, tgsi_unsupported}, {TGSI_OPCODE_PK2US, 0, ALU_OP0_NOP, tgsi_unsupported}, {TGSI_OPCODE_PK4B, 0, ALU_OP0_NOP, tgsi_unsupported}, @@ -5946,7 +5946,7 @@ static struct r600_shader_tgsi_instruction eg_shader_tgsi_instruction[] = { /* gap */ {114, 0, ALU_OP0_NOP, tgsi_unsupported}, {TGSI_OPCODE_BREAKC, 0, ALU_OP0_NOP, tgsi_unsupported}, - {TGSI_OPCODE_KIL, 0, ALU_OP2_KILLGT, tgsi_kill}, /* conditional kill */ + {TGSI_OPCODE_KILL_IF, 0, ALU_OP2_KILLGT, tgsi_kill}, /* conditional kill */ {TGSI_OPCODE_END, 0, ALU_OP0_NOP, tgsi_end}, /* aka HALT */ /* gap */ {118, 0, ALU_OP0_NOP, tgsi_unsupported}, @@ -6057,7 +6057,7 @@ static struct r600_shader_tgsi_instruction cm_shader_tgsi_instruction[] = { {TGSI_OPCODE_COS, 0, ALU_OP1_COS, cayman_trig}, {TGSI_OPCODE_DDX, 0, FETCH_OP_GET_GRADIENTS_H, tgsi_tex}, {TGSI_OPCODE_DDY, 0, FETCH_OP_GET_GRADIENTS_V, tgsi_tex}, - {TGSI_OPCODE_KILP, 0, ALU_OP2_KILLGT, tgsi_kill}, /* predicated kill */ + {TGSI_OPCODE_KILL, 0, ALU_OP2_KILLGT, tgsi_kill}, /* unconditional kill */ {TGSI_OPCODE_PK2H, 0, ALU_OP0_NOP, tgsi_unsupported}, {TGSI_OPCODE_PK2US, 0, ALU_OP0_NOP, tgsi_unsupported}, {TGSI_OPCODE_PK4B, 0, ALU_OP0_NOP, tgsi_unsupported}, @@ -6139,7 +6139,7 @@ static struct r600_shader_tgsi_instruction cm_shader_tgsi_instruction[] = { /* gap */ {114, 0, ALU_OP0_NOP, tgsi_unsupported}, {TGSI_OPCODE_BREAKC, 0, ALU_OP0_NOP, tgsi_unsupported}, - {TGSI_OPCODE_KIL, 0, ALU_OP2_KILLGT, tgsi_kill}, /* conditional kill */ + {TGSI_OPCODE_KILL_IF, 0, ALU_OP2_KILLGT, tgsi_kill}, /* conditional kill */ {TGSI_OPCODE_END, 0, ALU_OP0_NOP, tgsi_end}, /* aka HALT */ /* gap */ {118, 0, ALU_OP0_NOP, tgsi_unsupported}, |