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/ilo | |
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/ilo')
-rw-r--r-- | src/gallium/drivers/ilo/shader/ilo_shader_fs.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/ilo/shader/toy_tgsi.c | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/gallium/drivers/ilo/shader/ilo_shader_fs.c b/src/gallium/drivers/ilo/shader/ilo_shader_fs.c index bea2c097e14..36a308744c6 100644 --- a/src/gallium/drivers/ilo/shader/ilo_shader_fs.c +++ b/src/gallium/drivers/ilo/shader/ilo_shader_fs.c @@ -1191,7 +1191,7 @@ fs_lower_opcode_kil(struct toy_compiler *tc, struct toy_inst *inst) f0 = tsrc_rect(tsrc_uw(tsrc(TOY_FILE_ARF, BRW_ARF_FLAG, 0)), TOY_RECT_010); - /* KILP or KIL */ + /* KILL or KILL_IF */ if (tsrc_is_null(inst->src[0])) { struct toy_src dummy = tsrc_uw(tsrc(TOY_FILE_GRF, 0, 0)); struct toy_dst f0_dst = tdst_uw(tdst(TOY_FILE_ARF, BRW_ARF_FLAG, 0)); diff --git a/src/gallium/drivers/ilo/shader/toy_tgsi.c b/src/gallium/drivers/ilo/shader/toy_tgsi.c index bf61cbbf537..d5a3f2fe5af 100644 --- a/src/gallium/drivers/ilo/shader/toy_tgsi.c +++ b/src/gallium/drivers/ilo/shader/toy_tgsi.c @@ -61,7 +61,7 @@ static const struct { [TGSI_OPCODE_ABS] = { BRW_OPCODE_MOV, 1, 1 }, [TGSI_OPCODE_DPH] = { BRW_OPCODE_DPH, 1, 2 }, [TGSI_OPCODE_COS] = { TOY_OPCODE_COS, 1, 1 }, - [TGSI_OPCODE_KILP] = { TOY_OPCODE_KIL, 0, 0 }, + [TGSI_OPCODE_KILL] = { TOY_OPCODE_KIL, 0, 0 }, [TGSI_OPCODE_SIN] = { TOY_OPCODE_SIN, 1, 1 }, [TGSI_OPCODE_ARR] = { BRW_OPCODE_RNDZ, 1, 1 }, [TGSI_OPCODE_DP2] = { BRW_OPCODE_DP2, 1, 2 }, @@ -80,7 +80,7 @@ static const struct { [TGSI_OPCODE_EMIT] = { TOY_OPCODE_EMIT, 0, 0 }, [TGSI_OPCODE_ENDPRIM] = { TOY_OPCODE_ENDPRIM, 0, 0 }, [TGSI_OPCODE_NOP] = { BRW_OPCODE_NOP, 0, 0 }, - [TGSI_OPCODE_KIL] = { TOY_OPCODE_KIL, 0, 1 }, + [TGSI_OPCODE_KILL_IF] = { TOY_OPCODE_KIL, 0, 1 }, [TGSI_OPCODE_END] = { BRW_OPCODE_NOP, 0, 0 }, [TGSI_OPCODE_F2I] = { BRW_OPCODE_MOV, 1, 1 }, [TGSI_OPCODE_IDIV] = { TOY_OPCODE_INT_DIV_QUOTIENT, 1, 2 }, @@ -866,7 +866,7 @@ static const toy_tgsi_translate aos_translate_table[TGSI_OPCODE_LAST] = { [TGSI_OPCODE_COS] = aos_simple, [TGSI_OPCODE_DDX] = aos_unsupported, [TGSI_OPCODE_DDY] = aos_unsupported, - [TGSI_OPCODE_KILP] = aos_simple, + [TGSI_OPCODE_KILL] = aos_simple, [TGSI_OPCODE_PK2H] = aos_PK2H, [TGSI_OPCODE_PK2US] = aos_unsupported, [TGSI_OPCODE_PK4B] = aos_unsupported, @@ -942,7 +942,7 @@ static const toy_tgsi_translate aos_translate_table[TGSI_OPCODE_LAST] = { [TGSI_OPCODE_NRM4] = aos_NRM4, [TGSI_OPCODE_CALLNZ] = aos_unsupported, [TGSI_OPCODE_BREAKC] = aos_unsupported, - [TGSI_OPCODE_KIL] = aos_simple, + [TGSI_OPCODE_KILL_IF] = aos_simple, [TGSI_OPCODE_END] = aos_simple, [118] = aos_unsupported, [TGSI_OPCODE_F2I] = aos_simple, @@ -1482,7 +1482,7 @@ static const toy_tgsi_translate soa_translate_table[TGSI_OPCODE_LAST] = { [TGSI_OPCODE_COS] = soa_scalar_replicate, [TGSI_OPCODE_DDX] = soa_partial_derivative, [TGSI_OPCODE_DDY] = soa_partial_derivative, - [TGSI_OPCODE_KILP] = soa_passthrough, + [TGSI_OPCODE_KILL] = soa_passthrough, [TGSI_OPCODE_PK2H] = soa_PK2H, [TGSI_OPCODE_PK2US] = soa_unsupported, [TGSI_OPCODE_PK4B] = soa_unsupported, @@ -1558,7 +1558,7 @@ static const toy_tgsi_translate soa_translate_table[TGSI_OPCODE_LAST] = { [TGSI_OPCODE_NRM4] = soa_NRM4, [TGSI_OPCODE_CALLNZ] = soa_unsupported, [TGSI_OPCODE_BREAKC] = soa_unsupported, - [TGSI_OPCODE_KIL] = soa_passthrough, + [TGSI_OPCODE_KILL_IF] = soa_passthrough, [TGSI_OPCODE_END] = soa_passthrough, [118] = soa_unsupported, [TGSI_OPCODE_F2I] = soa_per_channel, @@ -2238,8 +2238,8 @@ parse_instruction(struct toy_tgsi *tgsi, } switch (tgsi_inst->Instruction.Opcode) { - case TGSI_OPCODE_KIL: - case TGSI_OPCODE_KILP: + case TGSI_OPCODE_KILL_IF: + case TGSI_OPCODE_KILL: tgsi->uses_kill = true; break; } |