diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-10-09 12:36:56 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-10-09 12:36:56 -0600 |
commit | 9509afe97cd7d9f58c9b344242171952990abfc8 (patch) | |
tree | 4a842e34ff97b362fc19297cfc7a569d1828e400 /src/mesa/drivers/dri/r300 | |
parent | 2dbd905ab0265b520efccce24ce9de66b6fc5fb0 (diff) | |
parent | 4599683b480d295e407725e0fe99c357a0086092 (diff) |
Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa
Diffstat (limited to 'src/mesa/drivers/dri/r300')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_fragprog.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c index cce8e68586..78ed44b09c 100644 --- a/src/mesa/drivers/dri/r300/r300_fragprog.c +++ b/src/mesa/drivers/dri/r300/r300_fragprog.c @@ -951,6 +951,10 @@ static void emit_tex(struct r300_fragment_program *fp, if (REG_GET_TYPE(dest) == REG_TYPE_OUTPUT) { rdest = dest; dest = get_temp_reg_tex(fp); + } else if (fpi->DstReg.WriteMask != WRITEMASK_XYZW) { + /* in case write mask isn't XYZW */ + rdest = dest; + dest = get_temp_reg_tex(fp); } hwdest = t_hw_dst(fp, dest, GL_TRUE, @@ -1016,7 +1020,7 @@ static void emit_tex(struct r300_fragment_program *fp, /* Copy from temp to output if needed */ if (REG_GET_VALID(rdest)) { - emit_arith(fp, PFS_OP_MAD, rdest, WRITEMASK_XYZW, dest, + emit_arith(fp, PFS_OP_MAD, rdest, fpi->DstReg.WriteMask, dest, pfs_one, pfs_zero, 0); free_temp(fp, dest); } |