tgsi: add negate parameter to tgsi_transform_kill_inst()
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
This commit is contained in:
@@ -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) */
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user