diff options
author | bunnei <bunneidev@gmail.com> | 2018-10-23 04:49:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-23 04:49:49 +0200 |
commit | 4cccfb4190ed62a056314043071c45452b98a443 (patch) | |
tree | 063e1b28f0dc09201a5193ba96514c298588bd17 | |
parent | Merge pull request #1545 from DarkLordZach/psm (diff) | |
parent | gl_shader_decompiler: Allow std::move to function in SetPredicate (diff) | |
download | yuzu-4cccfb4190ed62a056314043071c45452b98a443.tar yuzu-4cccfb4190ed62a056314043071c45452b98a443.tar.gz yuzu-4cccfb4190ed62a056314043071c45452b98a443.tar.bz2 yuzu-4cccfb4190ed62a056314043071c45452b98a443.tar.lz yuzu-4cccfb4190ed62a056314043071c45452b98a443.tar.xz yuzu-4cccfb4190ed62a056314043071c45452b98a443.tar.zst yuzu-4cccfb4190ed62a056314043071c45452b98a443.zip |
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index b0eb879cc..09db58ab6 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -378,8 +378,8 @@ public: * @param reg The destination register to use. * @param elem The element to use for the operation. * @param value The code representing the value to assign. Type has to be half float. - * @param type Half float kind of assignment. - * @param dest_num_components Number of components in the destionation. + * @param merge Half float kind of assignment. + * @param dest_num_components Number of components in the destination. * @param value_num_components Number of components in the value. * @param is_saturated Optional, when True, saturates the provided value. * @param dest_elem Optional, the destination element to use for the operation. @@ -422,6 +422,7 @@ public: * @param reg The destination register to use. * @param elem The element to use for the operation. * @param attribute The input attribute to use as the source value. + * @param input_mode The input mode. * @param vertex The register that decides which vertex to read from (used in GS). */ void SetRegisterToInputAttibute(const Register& reg, u64 elem, Attribute::Index attribute, @@ -951,7 +952,7 @@ private: // Can't assign to the constant predicate. ASSERT(pred != static_cast<u64>(Pred::UnusedIndex)); - const std::string variable = 'p' + std::to_string(pred) + '_' + suffix; + std::string variable = 'p' + std::to_string(pred) + '_' + suffix; shader.AddLine(variable + " = " + value + ';'); declr_predicates.insert(std::move(variable)); } @@ -1058,7 +1059,7 @@ private: /* * Transforms the input string GLSL operand into an unpacked half float pair. * @note This function returns a float type pair instead of a half float pair. This is because - * real half floats are not standarized in GLSL but unpackHalf2x16 (which returns a vec2) is. + * real half floats are not standardized in GLSL but unpackHalf2x16 (which returns a vec2) is. * @param operand Input operand. It has to be an unsigned integer. * @param type How to unpack the unsigned integer to a half float pair. * @param abs Get the absolute value of unpacked half floats. @@ -3291,8 +3292,8 @@ private: Tegra::Shader::VmadType type, u64 byte_height) { const std::string value = [&]() { if (!is_chunk) { - const auto offset = static_cast<u32>(byte_height * 8); - return "((" + op + " >> " + std::to_string(offset) + ") & 0xff)"; + const auto shift = static_cast<u32>(byte_height * 8); + return "((" + op + " >> " + std::to_string(shift) + ") & 0xff)"; } const std::string zero = "0"; |