summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp13
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:
378 * @param reg The destination register to use. 378 * @param reg The destination register to use.
379 * @param elem The element to use for the operation. 379 * @param elem The element to use for the operation.
380 * @param value The code representing the value to assign. Type has to be half float. 380 * @param value The code representing the value to assign. Type has to be half float.
381 * @param type Half float kind of assignment. 381 * @param merge Half float kind of assignment.
382 * @param dest_num_components Number of components in the destionation. 382 * @param dest_num_components Number of components in the destination.
383 * @param value_num_components Number of components in the value. 383 * @param value_num_components Number of components in the value.
384 * @param is_saturated Optional, when True, saturates the provided value. 384 * @param is_saturated Optional, when True, saturates the provided value.
385 * @param dest_elem Optional, the destination element to use for the operation. 385 * @param dest_elem Optional, the destination element to use for the operation.
@@ -422,6 +422,7 @@ public:
422 * @param reg The destination register to use. 422 * @param reg The destination register to use.
423 * @param elem The element to use for the operation. 423 * @param elem The element to use for the operation.
424 * @param attribute The input attribute to use as the source value. 424 * @param attribute The input attribute to use as the source value.
425 * @param input_mode The input mode.
425 * @param vertex The register that decides which vertex to read from (used in GS). 426 * @param vertex The register that decides which vertex to read from (used in GS).
426 */ 427 */
427 void SetRegisterToInputAttibute(const Register& reg, u64 elem, Attribute::Index attribute, 428 void SetRegisterToInputAttibute(const Register& reg, u64 elem, Attribute::Index attribute,
@@ -951,7 +952,7 @@ private:
951 // Can't assign to the constant predicate. 952 // Can't assign to the constant predicate.
952 ASSERT(pred != static_cast<u64>(Pred::UnusedIndex)); 953 ASSERT(pred != static_cast<u64>(Pred::UnusedIndex));
953 954
954 const std::string variable = 'p' + std::to_string(pred) + '_' + suffix; 955 std::string variable = 'p' + std::to_string(pred) + '_' + suffix;
955 shader.AddLine(variable + " = " + value + ';'); 956 shader.AddLine(variable + " = " + value + ';');
956 declr_predicates.insert(std::move(variable)); 957 declr_predicates.insert(std::move(variable));
957 } 958 }
@@ -1058,7 +1059,7 @@ private:
1058 /* 1059 /*
1059 * Transforms the input string GLSL operand into an unpacked half float pair. 1060 * Transforms the input string GLSL operand into an unpacked half float pair.
1060 * @note This function returns a float type pair instead of a half float pair. This is because 1061 * @note This function returns a float type pair instead of a half float pair. This is because
1061 * real half floats are not standarized in GLSL but unpackHalf2x16 (which returns a vec2) is. 1062 * real half floats are not standardized in GLSL but unpackHalf2x16 (which returns a vec2) is.
1062 * @param operand Input operand. It has to be an unsigned integer. 1063 * @param operand Input operand. It has to be an unsigned integer.
1063 * @param type How to unpack the unsigned integer to a half float pair. 1064 * @param type How to unpack the unsigned integer to a half float pair.
1064 * @param abs Get the absolute value of unpacked half floats. 1065 * @param abs Get the absolute value of unpacked half floats.
@@ -3291,8 +3292,8 @@ private:
3291 Tegra::Shader::VmadType type, u64 byte_height) { 3292 Tegra::Shader::VmadType type, u64 byte_height) {
3292 const std::string value = [&]() { 3293 const std::string value = [&]() {
3293 if (!is_chunk) { 3294 if (!is_chunk) {
3294 const auto offset = static_cast<u32>(byte_height * 8); 3295 const auto shift = static_cast<u32>(byte_height * 8);
3295 return "((" + op + " >> " + std::to_string(offset) + ") & 0xff)"; 3296 return "((" + op + " >> " + std::to_string(shift) + ") & 0xff)";
3296 } 3297 }
3297 const std::string zero = "0"; 3298 const std::string zero = "0";
3298 3299