summaryrefslogtreecommitdiffstats
path: root/src/video_core/vertex_shader.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-05-24 16:27:31 +0200
committerbunnei <bunneidev@gmail.com>2015-05-31 07:52:40 +0200
commit1574c44586e46607bb951f898956c6240bc92596 (patch)
tree036599929ebed248678bfc522dedc5543c8e767e /src/video_core/vertex_shader.cpp
parentPica: Implement command buffer execution registers. (diff)
downloadyuzu-1574c44586e46607bb951f898956c6240bc92596.tar
yuzu-1574c44586e46607bb951f898956c6240bc92596.tar.gz
yuzu-1574c44586e46607bb951f898956c6240bc92596.tar.bz2
yuzu-1574c44586e46607bb951f898956c6240bc92596.tar.lz
yuzu-1574c44586e46607bb951f898956c6240bc92596.tar.xz
yuzu-1574c44586e46607bb951f898956c6240bc92596.tar.zst
yuzu-1574c44586e46607bb951f898956c6240bc92596.zip
Diffstat (limited to 'src/video_core/vertex_shader.cpp')
-rw-r--r--src/video_core/vertex_shader.cpp6
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) {
switch (instr.opcode.Value().GetInfo().type) {
case OpCode::Type::Arithmetic:
{
- bool is_inverted = 0 != (instr.opcode.Value().GetInfo().subtype & OpCode::Info::SrcInversed);
+ const bool is_inverted = (0 != (instr.opcode.Value().GetInfo().subtype & OpCode::Info::SrcInversed));
const int address_offset = (instr.common.address_register_index == 0)
? 0 : state.address_registers[instr.common.address_register_index - 1];
- const float24* src1_ = LookupSourceRegister(instr.common.GetSrc1(is_inverted) + address_offset);
- const float24* src2_ = LookupSourceRegister(instr.common.GetSrc2(is_inverted));
+ const float24* src1_ = LookupSourceRegister(instr.common.GetSrc1(is_inverted) + (!is_inverted * address_offset));
+ const float24* src2_ = LookupSourceRegister(instr.common.GetSrc2(is_inverted) + ( is_inverted * address_offset));
const bool negate_src1 = ((bool)swizzle.negate_src1 != false);
const bool negate_src2 = ((bool)swizzle.negate_src2 != false);