summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-07-07 16:41:20 -0700
committerEric Anholt <[email protected]>2011-07-11 08:58:37 -0700
commite3ea5bc08e32119d05bce543c07c61ce93869e60 (patch)
treedb081984e54722b41b81d235d5f6df0a15f6df8c /src/mesa
parentbe039d296d2deeb6dbdc4cdb85c203051488482c (diff)
i965: Fix fp-lit-src-equals-dst.
We were stomping over the source for the body of the LIT instruction when doing the MOV of 1.0 to the uninteresting channels. Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_fp.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_fp.c b/src/mesa/drivers/dri/i965/brw_wm_fp.c
index 59dcda7b414..87eabf1fba1 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_fp.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_fp.c
@@ -611,7 +611,17 @@ static void precalc_lit( struct brw_wm_compile *c,
{
struct prog_src_register src0 = inst->SrcReg[0];
struct prog_dst_register dst = inst->DstReg;
-
+
+ if (dst.WriteMask & WRITEMASK_YZ) {
+ emit_op(c,
+ OPCODE_LIT,
+ dst_mask(dst, WRITEMASK_YZ),
+ inst->SaturateMode,
+ src0,
+ src_undef(),
+ src_undef());
+ }
+
if (dst.WriteMask & WRITEMASK_XW) {
struct prog_instruction *swz;
@@ -627,16 +637,6 @@ static void precalc_lit( struct brw_wm_compile *c,
/* Avoid letting the negation flag of src0 affect our 1 constant. */
swz->SrcReg[0].Negate = NEGATE_NONE;
}
-
- if (dst.WriteMask & WRITEMASK_YZ) {
- emit_op(c,
- OPCODE_LIT,
- dst_mask(dst, WRITEMASK_YZ),
- inst->SaturateMode,
- src0,
- src_undef(),
- src_undef());
- }
}