summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRodolfo Bogado <rodolfoosvaldobogado@gmail.com>2018-12-12 04:54:21 +0100
committerRodolfo Bogado <rodolfoosvaldobogado@gmail.com>2018-12-22 23:19:18 +0100
commitbbf8d6bf01b7eb745e47143ec3e01dc19e9f05bd (patch)
tree73c6dff76a3e7ce95df64e7ef849b71466f6585e /src
parentHandle RZ cases evaluating the expression instead of the register value. (diff)
downloadyuzu-bbf8d6bf01b7eb745e47143ec3e01dc19e9f05bd.tar
yuzu-bbf8d6bf01b7eb745e47143ec3e01dc19e9f05bd.tar.gz
yuzu-bbf8d6bf01b7eb745e47143ec3e01dc19e9f05bd.tar.bz2
yuzu-bbf8d6bf01b7eb745e47143ec3e01dc19e9f05bd.tar.lz
yuzu-bbf8d6bf01b7eb745e47143ec3e01dc19e9f05bd.tar.xz
yuzu-bbf8d6bf01b7eb745e47143ec3e01dc19e9f05bd.tar.zst
yuzu-bbf8d6bf01b7eb745e47143ec3e01dc19e9f05bd.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index 7a16dccc9..c7812d377 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -416,12 +416,13 @@ public:
u64 dest_num_components, u64 value_num_components,
bool is_saturated = false, bool sets_cc = false, u64 dest_elem = 0,
bool precise = false) {
-
- SetRegister(reg, elem, is_saturated ? "clamp(" + value + ", 0.0, 1.0)" : value,
+ const const std::string clamped_value =
+ is_saturated ? "clamp(" + value + ", 0.0, 1.0)" : value;
+ SetRegister(reg, elem, clamped_value,
dest_num_components, value_num_components, dest_elem, precise);
if (sets_cc) {
if (reg == Register::ZeroIndex) {
- SetConditionalCodesFromExpression(value);
+ SetConditionalCodesFromExpression(clamped_value);
} else {
SetConditionalCodesFromRegister(reg, dest_elem);
}