diff options
| author | 2015-05-05 22:06:46 -0400 | |
|---|---|---|
| committer | 2015-05-09 22:12:34 -0400 | |
| commit | f935130a0f2dc0e0a3a298eec3076f6b1fb743c2 (patch) | |
| tree | b68f156bb5517575ce738cc87253b325176a89de | |
| parent | Merge pull request #736 from yuriks/remove-BIT (diff) | |
| download | yuzu-f935130a0f2dc0e0a3a298eec3076f6b1fb743c2.tar.gz yuzu-f935130a0f2dc0e0a3a298eec3076f6b1fb743c2.tar.xz yuzu-f935130a0f2dc0e0a3a298eec3076f6b1fb743c2.zip | |
vertex_shader: Implement MADI instruction.
nihstro: Update submodule to latest upstream/master to support MADI instruction decoding.
| m--------- | externals/nihstro | 0 | ||||
| -rw-r--r-- | src/video_core/vertex_shader.cpp | 11 |
2 files changed, 7 insertions, 4 deletions
diff --git a/externals/nihstro b/externals/nihstro | |||
| Subproject 4a78588b308564f7ebae193e0ae00d9a0d5741d | Subproject 81f1804a43f625e3a1a20752c0db70a41341038 | ||
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); |