diff options
| author | 2020-03-09 20:46:16 -0300 | |
|---|---|---|
| committer | 2020-03-13 18:33:05 -0300 | |
| commit | 4bc4851d457c6f14feca665d4d729b9df444ec05 (patch) | |
| tree | e9b0ad1afbab90e83159e68e271a54c930766466 | |
| parent | vk_shader_decompiler: Fix implicit type conversion (diff) | |
| download | yuzu-4bc4851d457c6f14feca665d4d729b9df444ec05.tar.gz yuzu-4bc4851d457c6f14feca665d4d729b9df444ec05.tar.xz yuzu-4bc4851d457c6f14feca665d4d729b9df444ec05.zip | |
gl_shader_decompiler: Fix implicit conversion errors
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 6 |
1 files 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: | |||
| 761 | } | 761 | } |
| 762 | 762 | ||
| 763 | std::optional<std::size_t> GetNumComponents(Attribute::Index index, u8 element = 0) const { | 763 | std::optional<std::size_t> GetNumComponents(Attribute::Index index, u8 element = 0) const { |
| 764 | const u8 location = static_cast<u8>(index) * 4 + element; | 764 | const u8 location = static_cast<u8>(static_cast<u32>(index) * 4 + element); |
| 765 | const auto it = transform_feedback.find(location); | 765 | const auto it = transform_feedback.find(location); |
| 766 | if (it == transform_feedback.end()) { | 766 | if (it == transform_feedback.end()) { |
| 767 | return {}; | 767 | return {}; |
| @@ -770,7 +770,7 @@ private: | |||
| 770 | } | 770 | } |
| 771 | 771 | ||
| 772 | std::string GetTransformFeedbackDecoration(Attribute::Index index, u8 element = 0) const { | 772 | std::string GetTransformFeedbackDecoration(Attribute::Index index, u8 element = 0) const { |
| 773 | const u8 location = static_cast<u8>(index) * 4 + element; | 773 | const u8 location = static_cast<u8>(static_cast<u32>(index) * 4 + element); |
| 774 | const auto it = transform_feedback.find(location); | 774 | const auto it = transform_feedback.find(location); |
| 775 | if (it == transform_feedback.end()) { | 775 | if (it == transform_feedback.end()) { |
| 776 | return {}; | 776 | return {}; |
| @@ -811,7 +811,7 @@ private: | |||
| 811 | code.AddLine("layout (location = {}, component = {}{}) out {} {};", location, element, | 811 | code.AddLine("layout (location = {}, component = {}{}) out {} {};", location, element, |
| 812 | xfb, type, description.name); | 812 | xfb, type, description.name); |
| 813 | 813 | ||
| 814 | element += static_cast<u8>(num_components); | 814 | element = static_cast<u8>(static_cast<std::size_t>(element) + num_components); |
| 815 | } | 815 | } |
| 816 | } | 816 | } |
| 817 | 817 | ||