summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-08-09 03:51:09 +0200
committerbunnei <bunneidev@gmail.com>2018-08-09 05:26:31 +0200
commit4283019aa0928f8bf564b0031c21b1231e08f8e2 (patch)
treef2ff2510af4c4f348d126afc597baefd6380088f
parentMerge pull request #982 from bunnei/stub-unk-63 (diff)
downloadyuzu-4283019aa0928f8bf564b0031c21b1231e08f8e2.tar
yuzu-4283019aa0928f8bf564b0031c21b1231e08f8e2.tar.gz
yuzu-4283019aa0928f8bf564b0031c21b1231e08f8e2.tar.bz2
yuzu-4283019aa0928f8bf564b0031c21b1231e08f8e2.tar.lz
yuzu-4283019aa0928f8bf564b0031c21b1231e08f8e2.tar.xz
yuzu-4283019aa0928f8bf564b0031c21b1231e08f8e2.tar.zst
yuzu-4283019aa0928f8bf564b0031c21b1231e08f8e2.zip
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index dd240a4ce..ea7779429 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -657,16 +657,17 @@ private:
* @param instr Instruction to generate the if condition for.
* @returns string containing the predicate condition.
*/
- std::string GetPredicateCondition(u64 index, bool negate) const {
+ std::string GetPredicateCondition(u64 index, bool negate) {
using Tegra::Shader::Pred;
std::string variable;
// Index 7 is used as an 'Always True' condition.
- if (index == static_cast<u64>(Pred::UnusedIndex))
+ if (index == static_cast<u64>(Pred::UnusedIndex)) {
variable = "true";
- else
+ } else {
variable = 'p' + std::to_string(index) + '_' + suffix;
-
+ declr_predicates.insert(variable);
+ }
if (negate) {
return "!(" + variable + ')';
}