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/auxiliary/draw/draw_pipe_pstipple.c | |
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/auxiliary/draw/draw_pipe_pstipple.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pipe_pstipple.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c index 808c7cdcac2..51f5a860bf9 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c +++ b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c @@ -278,7 +278,7 @@ pstip_transform_inst(struct tgsi_transform_context *ctx, /* - * Insert new MUL/TEX/KILP instructions at start of program + * Insert new MUL/TEX/KILL_IF instructions at start of program * Take gl_FragCoord, divide by 32 (stipple size), sample the * texture and kill fragment if needed. * @@ -315,9 +315,9 @@ pstip_transform_inst(struct tgsi_transform_context *ctx, newInst.Src[1].Register.Index = pctx->freeSampler; ctx->emit_instruction(ctx, &newInst); - /* KIL -texTemp; # if -texTemp < 0, KILL fragment */ + /* KILL_IF -texTemp; # if -texTemp < 0, KILL fragment */ newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_KIL; + newInst.Instruction.Opcode = TGSI_OPCODE_KILL_IF; newInst.Instruction.NumDstRegs = 0; newInst.Instruction.NumSrcRegs = 1; newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY; @@ -402,7 +402,7 @@ pstip_update_texture(struct pstip_stage *pstip) /* * Load alpha texture. * Note: 0 means keep the fragment, 255 means kill it. - * We'll negate the texel value and use KILP which kills if value + * We'll negate the texel value and use KILL_IF which kills if value * is negative. */ for (i = 0; i < 32; i++) { |