Fix relative constant fetch on second source operand of shader instruction

The sense for this test was backwards, causing AppendSrcReg to read the wrong
const_n_rel_abs flag if the first operand was not a constant fetch.
This commit is contained in:
Dan Weatherford 2015-11-11 17:05:51 -06:00
parent 6c95ca1cdb
commit 2fda17cf3c
1 changed files with 2 additions and 2 deletions

View File

@ -174,13 +174,13 @@ void GL4ShaderTranslator::AppendSrcReg(const ucode::instr_alu_t& op, int i) {
break;
}
case 2: {
int const_slot = op.src1_sel ? 1 : 0;
int const_slot = op.src1_sel ? 0 : 1;
AppendSrcReg(op, op.src2_reg, op.src2_sel, op.src2_swiz,
op.src2_reg_negate, const_slot);
break;
}
case 3: {
int const_slot = (op.src1_sel || op.src2_sel) ? 1 : 0;
int const_slot = (op.src1_sel && op.src2_sel) ? 0 : 1;
AppendSrcReg(op, op.src3_reg, op.src3_sel, op.src3_swiz,
op.src3_reg_negate, const_slot);
break;