From 4bc4851d457c6f14feca665d4d729b9df444ec05 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Mon, 9 Mar 2020 20:46:16 -0300 Subject: gl_shader_decompiler: Fix implicit conversion errors --- src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 6 +++--- 1 file changed, 3 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 175145cc1..973d3fd11 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -761,7 +761,7 @@ private: } std::optional GetNumComponents(Attribute::Index index, u8 element = 0) const { - const u8 location = static_cast(index) * 4 + element; + const u8 location = static_cast(static_cast(index) * 4 + element); const auto it = transform_feedback.find(location); if (it == transform_feedback.end()) { return {}; @@ -770,7 +770,7 @@ private: } std::string GetTransformFeedbackDecoration(Attribute::Index index, u8 element = 0) const { - const u8 location = static_cast(index) * 4 + element; + const u8 location = static_cast(static_cast(index) * 4 + element); const auto it = transform_feedback.find(location); if (it == transform_feedback.end()) { return {}; @@ -811,7 +811,7 @@ private: code.AddLine("layout (location = {}, component = {}{}) out {} {};", location, element, xfb, type, description.name); - element += static_cast(num_components); + element = static_cast(static_cast(element) + num_components); } } -- cgit v1.2.3