diff options
Diffstat (limited to 'src/mesa')
3 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c b/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c index 301b4446693..2f8d6e4d04b 100644 --- a/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c +++ b/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c @@ -259,7 +259,8 @@ static void emit_paired(struct r300_fragment_program_compiler *c, struct rc_pair } code->inst[ip].inst0 |= R500_INST_TEX_SEM_WAIT; - code->inst[ip].inst0 |= (inst->RGB.WriteMask << 11) | (inst->Alpha.WriteMask << 14); + code->inst[ip].inst0 |= (inst->RGB.WriteMask << 11); + code->inst[ip].inst0 |= inst->Alpha.WriteMask ? 1 << 14 : 0; code->inst[ip].inst0 |= (inst->RGB.OutputWriteMask << 15) | (inst->Alpha.OutputWriteMask << 18); if (inst->Nop) { code->inst[ip].inst0 |= R500_INST_NOP; diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_pair_translate.c b/src/mesa/drivers/dri/r300/compiler/radeon_pair_translate.c index 9e03eb1aca8..fed3a3f7642 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_pair_translate.c +++ b/src/mesa/drivers/dri/r300/compiler/radeon_pair_translate.c @@ -289,7 +289,7 @@ static void set_pair_instruction(struct r300_fragment_program_compiler *c, } if (needalpha) { - pair->Alpha.WriteMask |= GET_BIT(inst->DstReg.WriteMask, 3); + pair->Alpha.WriteMask |= (GET_BIT(inst->DstReg.WriteMask, 3) << 3); if (pair->Alpha.WriteMask) { pair->Alpha.DestIndex = inst->DstReg.Index; } diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h index 6708b16d29a..d1a435fc530 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h +++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h @@ -71,7 +71,7 @@ struct rc_pair_instruction_arg { struct rc_pair_sub_instruction { unsigned int Opcode:8; unsigned int DestIndex:RC_REGISTER_INDEX_BITS; - unsigned int WriteMask:3; + unsigned int WriteMask:4; unsigned int Target:2; unsigned int OutputWriteMask:3; unsigned int DepthWriteMask:1; |