diff options
Diffstat (limited to 'src/video_core/vertex_shader.cpp')
| -rw-r--r-- | src/video_core/vertex_shader.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/video_core/vertex_shader.cpp b/src/video_core/vertex_shader.cpp index 51f4e58bf..89d663a15 100644 --- a/src/video_core/vertex_shader.cpp +++ b/src/video_core/vertex_shader.cpp | |||
| @@ -366,12 +366,15 @@ static void ProcessShaderCode(VertexShaderState& state) { | |||
| 366 | 366 | ||
| 367 | case OpCode::Type::MultiplyAdd: | 367 | case OpCode::Type::MultiplyAdd: |
| 368 | { | 368 | { |
| 369 | if (instr.opcode.Value().EffectiveOpCode() == OpCode::Id::MAD) { | 369 | if ((instr.opcode.Value().EffectiveOpCode() == OpCode::Id::MAD) || |
| 370 | (instr.opcode.Value().EffectiveOpCode() == OpCode::Id::MADI)) { | ||
| 370 | const SwizzlePattern& swizzle = *(SwizzlePattern*)&swizzle_data[instr.mad.operand_desc_id]; | 371 | const SwizzlePattern& swizzle = *(SwizzlePattern*)&swizzle_data[instr.mad.operand_desc_id]; |
| 371 | 372 | ||
| 372 | const float24* src1_ = LookupSourceRegister(instr.mad.src1); | 373 | bool is_inverted = (instr.opcode.Value().EffectiveOpCode() == OpCode::Id::MADI); |
| 373 | const float24* src2_ = LookupSourceRegister(instr.mad.src2); | 374 | |
| 374 | const float24* src3_ = LookupSourceRegister(instr.mad.src3); | 375 | const float24* src1_ = LookupSourceRegister(instr.mad.GetSrc1(is_inverted)); |
| 376 | const float24* src2_ = LookupSourceRegister(instr.mad.GetSrc2(is_inverted)); | ||
| 377 | const float24* src3_ = LookupSourceRegister(instr.mad.GetSrc3(is_inverted)); | ||
| 375 | 378 | ||
| 376 | const bool negate_src1 = ((bool)swizzle.negate_src1 != false); | 379 | const bool negate_src1 = ((bool)swizzle.negate_src1 != false); |
| 377 | const bool negate_src2 = ((bool)swizzle.negate_src2 != false); | 380 | const bool negate_src2 = ((bool)swizzle.negate_src2 != false); |