diff options
| author | 2018-12-19 12:52:32 +1100 | |
|---|---|---|
| committer | 2018-12-19 12:52:32 +1100 | |
| commit | fdd649e2ef56ea473e253511d35fe6c10e0fb241 (patch) | |
| tree | 82bf8e6a7cd1dd344c9bb0b3a728fc17c38de629 /src/video_core/engines | |
| parent | Merge pull request #1913 from MerryMage/default-fpcr (diff) | |
| download | yuzu-fdd649e2ef56ea473e253511d35fe6c10e0fb241.tar.gz yuzu-fdd649e2ef56ea473e253511d35fe6c10e0fb241.tar.xz yuzu-fdd649e2ef56ea473e253511d35fe6c10e0fb241.zip | |
Fixed uninitialized memory due to missing returns in canary
Functions which are suppose to crash on non canary builds usually don't return anything which lead to uninitialized memory being used.
Diffstat (limited to 'src/video_core/engines')
| -rw-r--r-- | src/video_core/engines/maxwell_3d.h | 2 | ||||
| -rw-r--r-- | src/video_core/engines/shader_bytecode.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index 25bb7604a..0faff6fdf 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h | |||
| @@ -164,6 +164,7 @@ public: | |||
| 164 | return 3; | 164 | return 3; |
| 165 | default: | 165 | default: |
| 166 | UNREACHABLE(); | 166 | UNREACHABLE(); |
| 167 | return 1; | ||
| 167 | } | 168 | } |
| 168 | } | 169 | } |
| 169 | 170 | ||
| @@ -871,6 +872,7 @@ public: | |||
| 871 | return 4; | 872 | return 4; |
| 872 | } | 873 | } |
| 873 | UNREACHABLE(); | 874 | UNREACHABLE(); |
| 875 | return 1; | ||
| 874 | } | 876 | } |
| 875 | 877 | ||
| 876 | GPUVAddr StartAddress() const { | 878 | GPUVAddr StartAddress() const { |
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index 2efeb6e1a..eb703bb5a 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h | |||
| @@ -1065,6 +1065,7 @@ union Instruction { | |||
| 1065 | LOG_CRITICAL(HW_GPU, "Unhandled texture_info: {}", | 1065 | LOG_CRITICAL(HW_GPU, "Unhandled texture_info: {}", |
| 1066 | static_cast<u32>(texture_info.Value())); | 1066 | static_cast<u32>(texture_info.Value())); |
| 1067 | UNREACHABLE(); | 1067 | UNREACHABLE(); |
| 1068 | return TextureType::Texture1D; | ||
| 1068 | } | 1069 | } |
| 1069 | 1070 | ||
| 1070 | TextureProcessMode GetTextureProcessMode() const { | 1071 | TextureProcessMode GetTextureProcessMode() const { |
| @@ -1145,6 +1146,7 @@ union Instruction { | |||
| 1145 | LOG_CRITICAL(HW_GPU, "Unhandled texture_info: {}", | 1146 | LOG_CRITICAL(HW_GPU, "Unhandled texture_info: {}", |
| 1146 | static_cast<u32>(texture_info.Value())); | 1147 | static_cast<u32>(texture_info.Value())); |
| 1147 | UNREACHABLE(); | 1148 | UNREACHABLE(); |
| 1149 | return TextureType::Texture1D; | ||
| 1148 | } | 1150 | } |
| 1149 | 1151 | ||
| 1150 | TextureProcessMode GetTextureProcessMode() const { | 1152 | TextureProcessMode GetTextureProcessMode() const { |