summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-09-01 16:29:17 -0600
committerBrian Paul <[email protected]>2015-09-01 16:29:17 -0600
commitbd883c90708207c6848b7f7b263ce1ef4e6a475b (patch)
treeff14d805acb9d6f78728beb7de13ecc16afe6c0d /src
parent56852e925e262c9a10454ed59a42ce12fb9c801c (diff)
tgsi: add negate parameter to tgsi_transform_kill_inst()
Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_aapoint.c3
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_pstipple.c3
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_transform.h5
-rw-r--r--src/gallium/auxiliary/util/u_pstipple.c2
4 files changed, 8 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
index 3918923296d..063e36828d7 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
@@ -240,7 +240,8 @@ aa_transform_prolog(struct tgsi_transform_context *ctx)
TGSI_FILE_INPUT, texInput, TGSI_SWIZZLE_W);
/* KILL_IF -tmp0.yyyy; # if -tmp0.y < 0, KILL */
- tgsi_transform_kill_inst(ctx, TGSI_FILE_TEMPORARY, tmp0, TGSI_SWIZZLE_Y);
+ tgsi_transform_kill_inst(ctx, TGSI_FILE_TEMPORARY, tmp0,
+ TGSI_SWIZZLE_Y, TRUE);
/* compute coverage factor = (1-d)/(1-k) */
diff --git a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
index 186b4cb4935..a51e91fe931 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
@@ -280,7 +280,8 @@ pstip_transform_prolog(struct tgsi_transform_context *ctx)
/* KILL_IF -texTemp.wwww; # if -texTemp < 0, KILL fragment */
tgsi_transform_kill_inst(ctx,
- TGSI_FILE_TEMPORARY, pctx->texTemp, TGSI_SWIZZLE_W);
+ TGSI_FILE_TEMPORARY, pctx->texTemp,
+ TGSI_SWIZZLE_W, TRUE);
}
diff --git a/src/gallium/auxiliary/tgsi/tgsi_transform.h b/src/gallium/auxiliary/tgsi/tgsi_transform.h
index ceb7c2e0f46..9b68f6a5feb 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_transform.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_transform.h
@@ -399,7 +399,8 @@ static inline void
tgsi_transform_kill_inst(struct tgsi_transform_context *ctx,
unsigned src_file,
unsigned src_index,
- unsigned src_swizzle)
+ unsigned src_swizzle,
+ boolean negate)
{
struct tgsi_full_instruction inst;
@@ -413,7 +414,7 @@ tgsi_transform_kill_inst(struct tgsi_transform_context *ctx,
inst.Src[0].Register.SwizzleY =
inst.Src[0].Register.SwizzleZ =
inst.Src[0].Register.SwizzleW = src_swizzle;
- inst.Src[0].Register.Negate = 1;
+ inst.Src[0].Register.Negate = negate;
ctx->emit_instruction(ctx, &inst);
}
diff --git a/src/gallium/auxiliary/util/u_pstipple.c b/src/gallium/auxiliary/util/u_pstipple.c
index 1f65672221f..0bb46ff8dd1 100644
--- a/src/gallium/auxiliary/util/u_pstipple.c
+++ b/src/gallium/auxiliary/util/u_pstipple.c
@@ -339,7 +339,7 @@ pstip_transform_prolog(struct tgsi_transform_context *ctx)
/* KILL_IF -texTemp; # if -texTemp < 0, kill fragment */
tgsi_transform_kill_inst(ctx,
TGSI_FILE_TEMPORARY, texTemp,
- TGSI_SWIZZLE_W);
+ TGSI_SWIZZLE_W, TRUE);
}