summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-10-10 01:03:06 +0200
committerGitHub <noreply@github.com>2018-10-10 01:03:06 +0200
commitbc6939beaaa2673541523d7a40965c903d0c3cbc (patch)
tree07ad72fc147c34fad9cf621c273d3231c7430ae0
parentMerge pull request #1463 from FearlessTobi/port-4310 (diff)
parentgl_shader_decompiler: Remove unused variables in TMML's implementation (diff)
downloadyuzu-bc6939beaaa2673541523d7a40965c903d0c3cbc.tar
yuzu-bc6939beaaa2673541523d7a40965c903d0c3cbc.tar.gz
yuzu-bc6939beaaa2673541523d7a40965c903d0c3cbc.tar.bz2
yuzu-bc6939beaaa2673541523d7a40965c903d0c3cbc.tar.lz
yuzu-bc6939beaaa2673541523d7a40965c903d0c3cbc.tar.xz
yuzu-bc6939beaaa2673541523d7a40965c903d0c3cbc.tar.zst
yuzu-bc6939beaaa2673541523d7a40965c903d0c3cbc.zip
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index 7e57de78a..85c668ca1 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -2299,8 +2299,7 @@ private:
ASSERT_MSG(!instr.tmml.UsesMiscMode(Tegra::Shader::TextureMiscMode::NDV),
"NDV is not implemented");
- const std::string op_a = regs.GetRegisterAsFloat(instr.gpr8);
- const std::string op_b = regs.GetRegisterAsFloat(instr.gpr8.Value() + 1);
+ const std::string x = regs.GetRegisterAsFloat(instr.gpr8);
const bool is_array = instr.tmml.array != 0;
auto texture_type = instr.tmml.texture_type.Value();
const std::string sampler =
@@ -2311,13 +2310,11 @@ private:
std::string coord;
switch (texture_type) {
case Tegra::Shader::TextureType::Texture1D: {
- std::string x = regs.GetRegisterAsFloat(instr.gpr8);
coord = "float coords = " + x + ';';
break;
}
case Tegra::Shader::TextureType::Texture2D: {
- std::string x = regs.GetRegisterAsFloat(instr.gpr8);
- std::string y = regs.GetRegisterAsFloat(instr.gpr8.Value() + 1);
+ const std::string y = regs.GetRegisterAsFloat(instr.gpr8.Value() + 1);
coord = "vec2 coords = vec2(" + x + ", " + y + ");";
break;
}
@@ -2327,8 +2324,7 @@ private:
UNREACHABLE();
// Fallback to interpreting as a 2D texture for now
- std::string x = regs.GetRegisterAsFloat(instr.gpr8);
- std::string y = regs.GetRegisterAsFloat(instr.gpr8.Value() + 1);
+ const std::string y = regs.GetRegisterAsFloat(instr.gpr8.Value() + 1);
coord = "vec2 coords = vec2(" + x + ", " + y + ");";
texture_type = Tegra::Shader::TextureType::Texture2D;
}