diff options
| author | 2015-05-24 10:27:31 -0400 | |
|---|---|---|
| committer | 2015-05-31 01:52:40 -0400 | |
| commit | 1574c44586e46607bb951f898956c6240bc92596 (patch) | |
| tree | 036599929ebed248678bfc522dedc5543c8e767e /src | |
| parent | Pica: Implement command buffer execution registers. (diff) | |
| download | yuzu-1574c44586e46607bb951f898956c6240bc92596.tar.gz yuzu-1574c44586e46607bb951f898956c6240bc92596.tar.xz yuzu-1574c44586e46607bb951f898956c6240bc92596.zip | |
vertex_shader: Use address offset on src2 in inverted mode.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/vertex_shader.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/vertex_shader.cpp b/src/video_core/vertex_shader.cpp index ac4483659..87006a832 100644 --- a/src/video_core/vertex_shader.cpp +++ b/src/video_core/vertex_shader.cpp | |||
| @@ -119,13 +119,13 @@ static void ProcessShaderCode(VertexShaderState& state) { | |||
| 119 | switch (instr.opcode.Value().GetInfo().type) { | 119 | switch (instr.opcode.Value().GetInfo().type) { |
| 120 | case OpCode::Type::Arithmetic: | 120 | case OpCode::Type::Arithmetic: |
| 121 | { | 121 | { |
| 122 | bool is_inverted = 0 != (instr.opcode.Value().GetInfo().subtype & OpCode::Info::SrcInversed); | 122 | const bool is_inverted = (0 != (instr.opcode.Value().GetInfo().subtype & OpCode::Info::SrcInversed)); |
| 123 | 123 | ||
| 124 | const int address_offset = (instr.common.address_register_index == 0) | 124 | const int address_offset = (instr.common.address_register_index == 0) |
| 125 | ? 0 : state.address_registers[instr.common.address_register_index - 1]; | 125 | ? 0 : state.address_registers[instr.common.address_register_index - 1]; |
| 126 | 126 | ||
| 127 | const float24* src1_ = LookupSourceRegister(instr.common.GetSrc1(is_inverted) + address_offset); | 127 | const float24* src1_ = LookupSourceRegister(instr.common.GetSrc1(is_inverted) + (!is_inverted * address_offset)); |
| 128 | const float24* src2_ = LookupSourceRegister(instr.common.GetSrc2(is_inverted)); | 128 | const float24* src2_ = LookupSourceRegister(instr.common.GetSrc2(is_inverted) + ( is_inverted * address_offset)); |
| 129 | 129 | ||
| 130 | const bool negate_src1 = ((bool)swizzle.negate_src1 != false); | 130 | const bool negate_src1 = ((bool)swizzle.negate_src1 != false); |
| 131 | const bool negate_src2 = ((bool)swizzle.negate_src2 != false); | 131 | const bool negate_src2 = ((bool)swizzle.negate_src2 != false); |