diff options
| author | 2022-06-07 17:02:29 -0400 | |
|---|---|---|
| committer | 2022-06-13 20:09:00 -0400 | |
| commit | 084d7d6b014443be7625fb9d8f1ddd309a22f6f4 (patch) | |
| tree | ea48c7b1d22a0b282846ba28a9b62c988e38bd29 /src | |
| parent | Merge pull request #8458 from lat9nq/no-constexpr-flow-block (diff) | |
| download | yuzu-084d7d6b014443be7625fb9d8f1ddd309a22f6f4.tar.gz yuzu-084d7d6b014443be7625fb9d8f1ddd309a22f6f4.tar.xz yuzu-084d7d6b014443be7625fb9d8f1ddd309a22f6f4.zip | |
common: Change semantics of UNREACHABLE to unconditionally crash
Diffstat (limited to 'src')
72 files changed, 182 insertions, 173 deletions
diff --git a/src/audio_core/command_generator.cpp b/src/audio_core/command_generator.cpp index ff20ed00f..f97520820 100644 --- a/src/audio_core/command_generator.cpp +++ b/src/audio_core/command_generator.cpp | |||
| @@ -429,7 +429,7 @@ void CommandGenerator::GenerateDataSourceCommand(ServerVoiceInfo& voice_info, Vo | |||
| 429 | in_params.node_id); | 429 | in_params.node_id); |
| 430 | break; | 430 | break; |
| 431 | default: | 431 | default: |
| 432 | UNREACHABLE_MSG("Unimplemented sample format={}", in_params.sample_format); | 432 | ASSERT_MSG(false, "Unimplemented sample format={}", in_params.sample_format); |
| 433 | } | 433 | } |
| 434 | } | 434 | } |
| 435 | } | 435 | } |
| @@ -1312,7 +1312,7 @@ void CommandGenerator::DecodeFromWaveBuffers(ServerVoiceInfo& voice_info, std::s | |||
| 1312 | samples_to_read - samples_read, channel, temp_mix_offset); | 1312 | samples_to_read - samples_read, channel, temp_mix_offset); |
| 1313 | break; | 1313 | break; |
| 1314 | default: | 1314 | default: |
| 1315 | UNREACHABLE_MSG("Unimplemented sample format={}", in_params.sample_format); | 1315 | ASSERT_MSG(false, "Unimplemented sample format={}", in_params.sample_format); |
| 1316 | } | 1316 | } |
| 1317 | 1317 | ||
| 1318 | temp_mix_offset += samples_decoded; | 1318 | temp_mix_offset += samples_decoded; |
diff --git a/src/audio_core/effect_context.cpp b/src/audio_core/effect_context.cpp index 51059580e..79bcd1192 100644 --- a/src/audio_core/effect_context.cpp +++ b/src/audio_core/effect_context.cpp | |||
| @@ -50,7 +50,7 @@ EffectBase* EffectContext::RetargetEffect(std::size_t i, EffectType effect) { | |||
| 50 | effects[i] = std::make_unique<EffectBiquadFilter>(); | 50 | effects[i] = std::make_unique<EffectBiquadFilter>(); |
| 51 | break; | 51 | break; |
| 52 | default: | 52 | default: |
| 53 | UNREACHABLE_MSG("Unimplemented effect {}", effect); | 53 | ASSERT_MSG(false, "Unimplemented effect {}", effect); |
| 54 | effects[i] = std::make_unique<EffectStubbed>(); | 54 | effects[i] = std::make_unique<EffectStubbed>(); |
| 55 | } | 55 | } |
| 56 | return GetInfo(i); | 56 | return GetInfo(i); |
| @@ -104,7 +104,7 @@ void EffectI3dl2Reverb::Update(EffectInfo::InParams& in_params) { | |||
| 104 | auto& params = GetParams(); | 104 | auto& params = GetParams(); |
| 105 | const auto* reverb_params = reinterpret_cast<I3dl2ReverbParams*>(in_params.raw.data()); | 105 | const auto* reverb_params = reinterpret_cast<I3dl2ReverbParams*>(in_params.raw.data()); |
| 106 | if (!ValidChannelCountForEffect(reverb_params->max_channels)) { | 106 | if (!ValidChannelCountForEffect(reverb_params->max_channels)) { |
| 107 | UNREACHABLE_MSG("Invalid reverb max channel count {}", reverb_params->max_channels); | 107 | ASSERT_MSG(false, "Invalid reverb max channel count {}", reverb_params->max_channels); |
| 108 | return; | 108 | return; |
| 109 | } | 109 | } |
| 110 | 110 | ||
diff --git a/src/audio_core/splitter_context.cpp b/src/audio_core/splitter_context.cpp index 1751d0212..10646dc05 100644 --- a/src/audio_core/splitter_context.cpp +++ b/src/audio_core/splitter_context.cpp | |||
| @@ -483,7 +483,7 @@ bool NodeStates::DepthFirstSearch(EdgeMatrix& edge_matrix) { | |||
| 483 | // Add more work | 483 | // Add more work |
| 484 | index_stack.push(j); | 484 | index_stack.push(j); |
| 485 | } else if (node_state == NodeStates::State::InFound) { | 485 | } else if (node_state == NodeStates::State::InFound) { |
| 486 | UNREACHABLE_MSG("Node start marked as found"); | 486 | ASSERT_MSG(false, "Node start marked as found"); |
| 487 | ResetState(); | 487 | ResetState(); |
| 488 | return false; | 488 | return false; |
| 489 | } | 489 | } |
diff --git a/src/audio_core/voice_context.cpp b/src/audio_core/voice_context.cpp index c8e4a6caf..f58a5c754 100644 --- a/src/audio_core/voice_context.cpp +++ b/src/audio_core/voice_context.cpp | |||
| @@ -114,7 +114,7 @@ void ServerVoiceInfo::UpdateParameters(const VoiceInfo::InParams& voice_in, | |||
| 114 | in_params.current_playstate = ServerPlayState::Play; | 114 | in_params.current_playstate = ServerPlayState::Play; |
| 115 | break; | 115 | break; |
| 116 | default: | 116 | default: |
| 117 | UNREACHABLE_MSG("Unknown playstate {}", voice_in.play_state); | 117 | ASSERT_MSG(false, "Unknown playstate {}", voice_in.play_state); |
| 118 | break; | 118 | break; |
| 119 | } | 119 | } |
| 120 | 120 | ||
| @@ -410,7 +410,7 @@ bool ServerVoiceInfo::UpdateParametersForCommandGeneration( | |||
| 410 | return in_params.should_depop; | 410 | return in_params.should_depop; |
| 411 | } | 411 | } |
| 412 | default: | 412 | default: |
| 413 | UNREACHABLE_MSG("Invalid playstate {}", in_params.current_playstate); | 413 | ASSERT_MSG(false, "Invalid playstate {}", in_params.current_playstate); |
| 414 | } | 414 | } |
| 415 | 415 | ||
| 416 | return false; | 416 | return false; |
diff --git a/src/common/assert.cpp b/src/common/assert.cpp index b44570528..a27a025ae 100644 --- a/src/common/assert.cpp +++ b/src/common/assert.cpp | |||
| @@ -11,3 +11,8 @@ void assert_handle_failure() { | |||
| 11 | Crash(); | 11 | Crash(); |
| 12 | } | 12 | } |
| 13 | } | 13 | } |
| 14 | |||
| 15 | [[noreturn]] void unreachable_impl() { | ||
| 16 | Crash(); | ||
| 17 | throw std::runtime_error("Unreachable code"); | ||
| 18 | } | ||
diff --git a/src/common/assert.h b/src/common/assert.h index dbfd8abaf..478bfa856 100644 --- a/src/common/assert.h +++ b/src/common/assert.h | |||
| @@ -11,6 +11,8 @@ | |||
| 11 | // everywhere. So let's just move the handling of the failed assert to a single cpp file. | 11 | // everywhere. So let's just move the handling of the failed assert to a single cpp file. |
| 12 | void assert_handle_failure(); | 12 | void assert_handle_failure(); |
| 13 | 13 | ||
| 14 | [[noreturn]] void unreachable_impl(); | ||
| 15 | |||
| 14 | // For asserts we'd like to keep all the junk executed when an assert happens away from the | 16 | // For asserts we'd like to keep all the junk executed when an assert happens away from the |
| 15 | // important code in the function. One way of doing this is to put all the relevant code inside a | 17 | // important code in the function. One way of doing this is to put all the relevant code inside a |
| 16 | // lambda and force the compiler to not inline it. Unfortunately, MSVC seems to have no syntax to | 18 | // lambda and force the compiler to not inline it. Unfortunately, MSVC seems to have no syntax to |
| @@ -44,9 +46,17 @@ assert_noinline_call(const Fn& fn) { | |||
| 44 | } \ | 46 | } \ |
| 45 | while (0) | 47 | while (0) |
| 46 | 48 | ||
| 47 | #define UNREACHABLE() assert_noinline_call([] { LOG_CRITICAL(Debug, "Unreachable code!"); }) | 49 | #define UNREACHABLE() \ |
| 50 | do { \ | ||
| 51 | assert_noinline_call([] { LOG_CRITICAL(Debug, "Unreachable code!"); }); \ | ||
| 52 | unreachable_impl(); \ | ||
| 53 | } while (0) | ||
| 54 | |||
| 48 | #define UNREACHABLE_MSG(...) \ | 55 | #define UNREACHABLE_MSG(...) \ |
| 49 | assert_noinline_call([&] { LOG_CRITICAL(Debug, "Unreachable code!\n" __VA_ARGS__); }) | 56 | do { \ |
| 57 | assert_noinline_call([&] { LOG_CRITICAL(Debug, "Unreachable code!\n" __VA_ARGS__); }); \ | ||
| 58 | unreachable_impl(); \ | ||
| 59 | } while (0) | ||
| 50 | 60 | ||
| 51 | #ifdef _DEBUG | 61 | #ifdef _DEBUG |
| 52 | #define DEBUG_ASSERT(_a_) ASSERT(_a_) | 62 | #define DEBUG_ASSERT(_a_) ASSERT(_a_) |
diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 6ffab63af..751549583 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp | |||
| @@ -147,7 +147,7 @@ void UpdateRescalingInfo() { | |||
| 147 | info.down_shift = 0; | 147 | info.down_shift = 0; |
| 148 | break; | 148 | break; |
| 149 | default: | 149 | default: |
| 150 | UNREACHABLE(); | 150 | ASSERT(false); |
| 151 | info.up_scale = 1; | 151 | info.up_scale = 1; |
| 152 | info.down_shift = 0; | 152 | info.down_shift = 0; |
| 153 | } | 153 | } |
diff --git a/src/core/crypto/key_manager.cpp b/src/core/crypto/key_manager.cpp index e3c4f80eb..443323390 100644 --- a/src/core/crypto/key_manager.cpp +++ b/src/core/crypto/key_manager.cpp | |||
| @@ -140,7 +140,6 @@ u64 GetSignatureTypeDataSize(SignatureType type) { | |||
| 140 | return 0x3C; | 140 | return 0x3C; |
| 141 | } | 141 | } |
| 142 | UNREACHABLE(); | 142 | UNREACHABLE(); |
| 143 | return 0; | ||
| 144 | } | 143 | } |
| 145 | 144 | ||
| 146 | u64 GetSignatureTypePaddingSize(SignatureType type) { | 145 | u64 GetSignatureTypePaddingSize(SignatureType type) { |
| @@ -155,7 +154,6 @@ u64 GetSignatureTypePaddingSize(SignatureType type) { | |||
| 155 | return 0x40; | 154 | return 0x40; |
| 156 | } | 155 | } |
| 157 | UNREACHABLE(); | 156 | UNREACHABLE(); |
| 158 | return 0; | ||
| 159 | } | 157 | } |
| 160 | 158 | ||
| 161 | SignatureType Ticket::GetSignatureType() const { | 159 | SignatureType Ticket::GetSignatureType() const { |
diff --git a/src/core/file_sys/nca_patch.cpp b/src/core/file_sys/nca_patch.cpp index d4c0a974a..2735d053b 100644 --- a/src/core/file_sys/nca_patch.cpp +++ b/src/core/file_sys/nca_patch.cpp | |||
| @@ -50,7 +50,7 @@ std::pair<std::size_t, std::size_t> SearchBucketEntry(u64 offset, const BlockTyp | |||
| 50 | low = mid + 1; | 50 | low = mid + 1; |
| 51 | } | 51 | } |
| 52 | } | 52 | } |
| 53 | UNREACHABLE_MSG("Offset could not be found in BKTR block."); | 53 | ASSERT_MSG(false, "Offset could not be found in BKTR block."); |
| 54 | return {0, 0}; | 54 | return {0, 0}; |
| 55 | } | 55 | } |
| 56 | } // Anonymous namespace | 56 | } // Anonymous namespace |
diff --git a/src/core/file_sys/registered_cache.cpp b/src/core/file_sys/registered_cache.cpp index 2eaac73ef..878d832c2 100644 --- a/src/core/file_sys/registered_cache.cpp +++ b/src/core/file_sys/registered_cache.cpp | |||
| @@ -108,7 +108,7 @@ ContentRecordType GetCRTypeFromNCAType(NCAContentType type) { | |||
| 108 | // TODO(DarkLordZach): Peek at NCA contents to differentiate Manual and Legal. | 108 | // TODO(DarkLordZach): Peek at NCA contents to differentiate Manual and Legal. |
| 109 | return ContentRecordType::HtmlDocument; | 109 | return ContentRecordType::HtmlDocument; |
| 110 | default: | 110 | default: |
| 111 | UNREACHABLE_MSG("Invalid NCAContentType={:02X}", type); | 111 | ASSERT_MSG(false, "Invalid NCAContentType={:02X}", type); |
| 112 | return ContentRecordType{}; | 112 | return ContentRecordType{}; |
| 113 | } | 113 | } |
| 114 | } | 114 | } |
diff --git a/src/core/file_sys/vfs_real.cpp b/src/core/file_sys/vfs_real.cpp index e42d7c9f6..cc0076238 100644 --- a/src/core/file_sys/vfs_real.cpp +++ b/src/core/file_sys/vfs_real.cpp | |||
| @@ -144,7 +144,7 @@ VirtualFile RealVfsFilesystem::MoveFile(std::string_view old_path_, std::string_ | |||
| 144 | LOG_ERROR(Service_FS, "Failed to open path {} in order to re-cache it", new_path); | 144 | LOG_ERROR(Service_FS, "Failed to open path {} in order to re-cache it", new_path); |
| 145 | } | 145 | } |
| 146 | } else { | 146 | } else { |
| 147 | UNREACHABLE(); | 147 | ASSERT(false); |
| 148 | return nullptr; | 148 | return nullptr; |
| 149 | } | 149 | } |
| 150 | 150 | ||
diff --git a/src/core/frontend/applets/controller.cpp b/src/core/frontend/applets/controller.cpp index 0ff2a338e..6c230f619 100644 --- a/src/core/frontend/applets/controller.cpp +++ b/src/core/frontend/applets/controller.cpp | |||
| @@ -65,7 +65,7 @@ void DefaultControllerApplet::ReconfigureControllers(std::function<void()> callb | |||
| 65 | controller->SetNpadStyleIndex(Core::HID::NpadStyleIndex::Handheld); | 65 | controller->SetNpadStyleIndex(Core::HID::NpadStyleIndex::Handheld); |
| 66 | controller->Connect(true); | 66 | controller->Connect(true); |
| 67 | } else { | 67 | } else { |
| 68 | UNREACHABLE_MSG("Unable to add a new controller based on the given parameters!"); | 68 | ASSERT_MSG(false, "Unable to add a new controller based on the given parameters!"); |
| 69 | } | 69 | } |
| 70 | } | 70 | } |
| 71 | 71 | ||
diff --git a/src/core/hid/hid_core.cpp b/src/core/hid/hid_core.cpp index 7eed52593..7d6373414 100644 --- a/src/core/hid/hid_core.cpp +++ b/src/core/hid/hid_core.cpp | |||
| @@ -48,7 +48,7 @@ EmulatedController* HIDCore::GetEmulatedController(NpadIdType npad_id_type) { | |||
| 48 | return handheld.get(); | 48 | return handheld.get(); |
| 49 | case NpadIdType::Invalid: | 49 | case NpadIdType::Invalid: |
| 50 | default: | 50 | default: |
| 51 | UNREACHABLE_MSG("Invalid NpadIdType={}", npad_id_type); | 51 | ASSERT_MSG(false, "Invalid NpadIdType={}", npad_id_type); |
| 52 | return nullptr; | 52 | return nullptr; |
| 53 | } | 53 | } |
| 54 | } | 54 | } |
| @@ -77,7 +77,7 @@ const EmulatedController* HIDCore::GetEmulatedController(NpadIdType npad_id_type | |||
| 77 | return handheld.get(); | 77 | return handheld.get(); |
| 78 | case NpadIdType::Invalid: | 78 | case NpadIdType::Invalid: |
| 79 | default: | 79 | default: |
| 80 | UNREACHABLE_MSG("Invalid NpadIdType={}", npad_id_type); | 80 | ASSERT_MSG(false, "Invalid NpadIdType={}", npad_id_type); |
| 81 | return nullptr; | 81 | return nullptr; |
| 82 | } | 82 | } |
| 83 | } | 83 | } |
diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h index a427cbc93..0ddc8df9e 100644 --- a/src/core/hle/kernel/hle_ipc.h +++ b/src/core/hle/kernel/hle_ipc.h | |||
| @@ -141,7 +141,7 @@ public: | |||
| 141 | if (index < DomainHandlerCount()) { | 141 | if (index < DomainHandlerCount()) { |
| 142 | domain_handlers[index] = nullptr; | 142 | domain_handlers[index] = nullptr; |
| 143 | } else { | 143 | } else { |
| 144 | UNREACHABLE_MSG("Unexpected handler index {}", index); | 144 | ASSERT_MSG(false, "Unexpected handler index {}", index); |
| 145 | } | 145 | } |
| 146 | } | 146 | } |
| 147 | 147 | ||
diff --git a/src/core/hle/kernel/init/init_slab_setup.cpp b/src/core/hle/kernel/init/init_slab_setup.cpp index 34a8be052..9b6b284d0 100644 --- a/src/core/hle/kernel/init/init_slab_setup.cpp +++ b/src/core/hle/kernel/init/init_slab_setup.cpp | |||
| @@ -244,7 +244,7 @@ void InitializeSlabHeaps(Core::System& system, KMemoryLayout& memory_layout) { | |||
| 244 | FOREACH_SLAB_TYPE(INITIALIZE_SLAB_HEAP) | 244 | FOREACH_SLAB_TYPE(INITIALIZE_SLAB_HEAP) |
| 245 | // If we somehow get an invalid type, abort. | 245 | // If we somehow get an invalid type, abort. |
| 246 | default: | 246 | default: |
| 247 | UNREACHABLE_MSG("Unknown slab type: {}", slab_types[i]); | 247 | ASSERT_MSG(false, "Unknown slab type: {}", slab_types[i]); |
| 248 | } | 248 | } |
| 249 | 249 | ||
| 250 | // If we've hit the end of a gap, free it. | 250 | // If we've hit the end of a gap, free it. |
diff --git a/src/core/hle/kernel/k_address_arbiter.h b/src/core/hle/kernel/k_address_arbiter.h index e46e0d848..5fa19d386 100644 --- a/src/core/hle/kernel/k_address_arbiter.h +++ b/src/core/hle/kernel/k_address_arbiter.h | |||
| @@ -35,7 +35,7 @@ public: | |||
| 35 | case Svc::SignalType::SignalAndModifyByWaitingCountIfEqual: | 35 | case Svc::SignalType::SignalAndModifyByWaitingCountIfEqual: |
| 36 | return SignalAndModifyByWaitingCountIfEqual(addr, value, count); | 36 | return SignalAndModifyByWaitingCountIfEqual(addr, value, count); |
| 37 | } | 37 | } |
| 38 | UNREACHABLE(); | 38 | ASSERT(false); |
| 39 | return ResultUnknown; | 39 | return ResultUnknown; |
| 40 | } | 40 | } |
| 41 | 41 | ||
| @@ -49,7 +49,7 @@ public: | |||
| 49 | case Svc::ArbitrationType::WaitIfEqual: | 49 | case Svc::ArbitrationType::WaitIfEqual: |
| 50 | return WaitIfEqual(addr, value, timeout); | 50 | return WaitIfEqual(addr, value, timeout); |
| 51 | } | 51 | } |
| 52 | UNREACHABLE(); | 52 | ASSERT(false); |
| 53 | return ResultUnknown; | 53 | return ResultUnknown; |
| 54 | } | 54 | } |
| 55 | 55 | ||
diff --git a/src/core/hle/kernel/k_address_space_info.cpp b/src/core/hle/kernel/k_address_space_info.cpp index bc37cadda..3e612a207 100644 --- a/src/core/hle/kernel/k_address_space_info.cpp +++ b/src/core/hle/kernel/k_address_space_info.cpp | |||
| @@ -84,7 +84,7 @@ u64 KAddressSpaceInfo::GetAddressSpaceStart(std::size_t width, Type type) { | |||
| 84 | ASSERT(IsAllowedIndexForAddress(AddressSpaceIndices39Bit[index])); | 84 | ASSERT(IsAllowedIndexForAddress(AddressSpaceIndices39Bit[index])); |
| 85 | return AddressSpaceInfos[AddressSpaceIndices39Bit[index]].address; | 85 | return AddressSpaceInfos[AddressSpaceIndices39Bit[index]].address; |
| 86 | } | 86 | } |
| 87 | UNREACHABLE(); | 87 | ASSERT(false); |
| 88 | return 0; | 88 | return 0; |
| 89 | } | 89 | } |
| 90 | 90 | ||
| @@ -101,7 +101,7 @@ std::size_t KAddressSpaceInfo::GetAddressSpaceSize(std::size_t width, Type type) | |||
| 101 | ASSERT(IsAllowed39BitType(type)); | 101 | ASSERT(IsAllowed39BitType(type)); |
| 102 | return AddressSpaceInfos[AddressSpaceIndices39Bit[index]].size; | 102 | return AddressSpaceInfos[AddressSpaceIndices39Bit[index]].size; |
| 103 | } | 103 | } |
| 104 | UNREACHABLE(); | 104 | ASSERT(false); |
| 105 | return 0; | 105 | return 0; |
| 106 | } | 106 | } |
| 107 | 107 | ||
diff --git a/src/core/hle/kernel/k_memory_manager.cpp b/src/core/hle/kernel/k_memory_manager.cpp index a55db3088..58e540f31 100644 --- a/src/core/hle/kernel/k_memory_manager.cpp +++ b/src/core/hle/kernel/k_memory_manager.cpp | |||
| @@ -29,7 +29,7 @@ constexpr KMemoryManager::Pool GetPoolFromMemoryRegionType(u32 type) { | |||
| 29 | } else if ((type | KMemoryRegionType_DramSystemNonSecurePool) == type) { | 29 | } else if ((type | KMemoryRegionType_DramSystemNonSecurePool) == type) { |
| 30 | return KMemoryManager::Pool::SystemNonSecure; | 30 | return KMemoryManager::Pool::SystemNonSecure; |
| 31 | } else { | 31 | } else { |
| 32 | UNREACHABLE_MSG("InvalidMemoryRegionType for conversion to Pool"); | 32 | ASSERT_MSG(false, "InvalidMemoryRegionType for conversion to Pool"); |
| 33 | return {}; | 33 | return {}; |
| 34 | } | 34 | } |
| 35 | } | 35 | } |
diff --git a/src/core/hle/kernel/k_page_table.cpp b/src/core/hle/kernel/k_page_table.cpp index 68867a2bb..504e22cb9 100644 --- a/src/core/hle/kernel/k_page_table.cpp +++ b/src/core/hle/kernel/k_page_table.cpp | |||
| @@ -35,7 +35,7 @@ constexpr std::size_t GetAddressSpaceWidthFromType(FileSys::ProgramAddressSpaceT | |||
| 35 | case FileSys::ProgramAddressSpaceType::Is39Bit: | 35 | case FileSys::ProgramAddressSpaceType::Is39Bit: |
| 36 | return 39; | 36 | return 39; |
| 37 | default: | 37 | default: |
| 38 | UNREACHABLE(); | 38 | ASSERT(false); |
| 39 | return {}; | 39 | return {}; |
| 40 | } | 40 | } |
| 41 | } | 41 | } |
| @@ -128,7 +128,7 @@ ResultCode KPageTable::InitializeForProcess(FileSys::ProgramAddressSpaceType as_ | |||
| 128 | const std::size_t needed_size{ | 128 | const std::size_t needed_size{ |
| 129 | (alias_region_size + heap_region_size + stack_region_size + kernel_map_region_size)}; | 129 | (alias_region_size + heap_region_size + stack_region_size + kernel_map_region_size)}; |
| 130 | if (alloc_size < needed_size) { | 130 | if (alloc_size < needed_size) { |
| 131 | UNREACHABLE(); | 131 | ASSERT(false); |
| 132 | return ResultOutOfMemory; | 132 | return ResultOutOfMemory; |
| 133 | } | 133 | } |
| 134 | 134 | ||
| @@ -1430,7 +1430,7 @@ ResultCode KPageTable::SetProcessMemoryPermission(VAddr addr, std::size_t size, | |||
| 1430 | new_state = KMemoryState::AliasCodeData; | 1430 | new_state = KMemoryState::AliasCodeData; |
| 1431 | break; | 1431 | break; |
| 1432 | default: | 1432 | default: |
| 1433 | UNREACHABLE(); | 1433 | ASSERT(false); |
| 1434 | } | 1434 | } |
| 1435 | } | 1435 | } |
| 1436 | 1436 | ||
| @@ -1823,9 +1823,7 @@ void KPageTable::AddRegionToPages(VAddr start, std::size_t num_pages, | |||
| 1823 | VAddr addr{start}; | 1823 | VAddr addr{start}; |
| 1824 | while (addr < start + (num_pages * PageSize)) { | 1824 | while (addr < start + (num_pages * PageSize)) { |
| 1825 | const PAddr paddr{GetPhysicalAddr(addr)}; | 1825 | const PAddr paddr{GetPhysicalAddr(addr)}; |
| 1826 | if (!paddr) { | 1826 | ASSERT(paddr != 0); |
| 1827 | UNREACHABLE(); | ||
| 1828 | } | ||
| 1829 | page_linked_list.AddBlock(paddr, 1); | 1827 | page_linked_list.AddBlock(paddr, 1); |
| 1830 | addr += PageSize; | 1828 | addr += PageSize; |
| 1831 | } | 1829 | } |
| @@ -1856,7 +1854,7 @@ ResultCode KPageTable::Operate(VAddr addr, std::size_t num_pages, const KPageLin | |||
| 1856 | system.Memory().MapMemoryRegion(page_table_impl, addr, size, node.GetAddress()); | 1854 | system.Memory().MapMemoryRegion(page_table_impl, addr, size, node.GetAddress()); |
| 1857 | break; | 1855 | break; |
| 1858 | default: | 1856 | default: |
| 1859 | UNREACHABLE(); | 1857 | ASSERT(false); |
| 1860 | } | 1858 | } |
| 1861 | 1859 | ||
| 1862 | addr += size; | 1860 | addr += size; |
| @@ -1887,7 +1885,7 @@ ResultCode KPageTable::Operate(VAddr addr, std::size_t num_pages, KMemoryPermiss | |||
| 1887 | case OperationType::ChangePermissionsAndRefresh: | 1885 | case OperationType::ChangePermissionsAndRefresh: |
| 1888 | break; | 1886 | break; |
| 1889 | default: | 1887 | default: |
| 1890 | UNREACHABLE(); | 1888 | ASSERT(false); |
| 1891 | } | 1889 | } |
| 1892 | return ResultSuccess; | 1890 | return ResultSuccess; |
| 1893 | } | 1891 | } |
| @@ -1924,7 +1922,6 @@ VAddr KPageTable::GetRegionAddress(KMemoryState state) const { | |||
| 1924 | return code_region_start; | 1922 | return code_region_start; |
| 1925 | default: | 1923 | default: |
| 1926 | UNREACHABLE(); | 1924 | UNREACHABLE(); |
| 1927 | return {}; | ||
| 1928 | } | 1925 | } |
| 1929 | } | 1926 | } |
| 1930 | 1927 | ||
| @@ -1960,7 +1957,6 @@ std::size_t KPageTable::GetRegionSize(KMemoryState state) const { | |||
| 1960 | return code_region_end - code_region_start; | 1957 | return code_region_end - code_region_start; |
| 1961 | default: | 1958 | default: |
| 1962 | UNREACHABLE(); | 1959 | UNREACHABLE(); |
| 1963 | return {}; | ||
| 1964 | } | 1960 | } |
| 1965 | } | 1961 | } |
| 1966 | 1962 | ||
diff --git a/src/core/hle/kernel/k_port.cpp b/src/core/hle/kernel/k_port.cpp index a31861cdb..51c2cd1ef 100644 --- a/src/core/hle/kernel/k_port.cpp +++ b/src/core/hle/kernel/k_port.cpp | |||
| @@ -60,7 +60,7 @@ ResultCode KPort::EnqueueSession(KServerSession* session) { | |||
| 60 | if (auto session_ptr = server.GetSessionRequestHandler().lock()) { | 60 | if (auto session_ptr = server.GetSessionRequestHandler().lock()) { |
| 61 | session_ptr->ClientConnected(server.AcceptSession()); | 61 | session_ptr->ClientConnected(server.AcceptSession()); |
| 62 | } else { | 62 | } else { |
| 63 | UNREACHABLE(); | 63 | ASSERT(false); |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | return ResultSuccess; | 66 | return ResultSuccess; |
diff --git a/src/core/hle/kernel/k_process.cpp b/src/core/hle/kernel/k_process.cpp index dcfeacccd..8c79b4f0f 100644 --- a/src/core/hle/kernel/k_process.cpp +++ b/src/core/hle/kernel/k_process.cpp | |||
| @@ -350,7 +350,7 @@ ResultCode KProcess::LoadFromMetadata(const FileSys::ProgramMetadata& metadata, | |||
| 350 | break; | 350 | break; |
| 351 | 351 | ||
| 352 | default: | 352 | default: |
| 353 | UNREACHABLE(); | 353 | ASSERT(false); |
| 354 | } | 354 | } |
| 355 | 355 | ||
| 356 | // Create TLS region | 356 | // Create TLS region |
diff --git a/src/core/hle/kernel/k_server_session.cpp b/src/core/hle/kernel/k_server_session.cpp index 7e39f6d50..60f8ed470 100644 --- a/src/core/hle/kernel/k_server_session.cpp +++ b/src/core/hle/kernel/k_server_session.cpp | |||
| @@ -97,13 +97,13 @@ ResultCode KServerSession::HandleDomainSyncRequest(Kernel::HLERequestContext& co | |||
| 97 | "object_id {} is too big! This probably means a recent service call " | 97 | "object_id {} is too big! This probably means a recent service call " |
| 98 | "to {} needed to return a new interface!", | 98 | "to {} needed to return a new interface!", |
| 99 | object_id, name); | 99 | object_id, name); |
| 100 | UNREACHABLE(); | 100 | ASSERT(false); |
| 101 | return ResultSuccess; // Ignore error if asserts are off | 101 | return ResultSuccess; // Ignore error if asserts are off |
| 102 | } | 102 | } |
| 103 | if (auto strong_ptr = manager->DomainHandler(object_id - 1).lock()) { | 103 | if (auto strong_ptr = manager->DomainHandler(object_id - 1).lock()) { |
| 104 | return strong_ptr->HandleSyncRequest(*this, context); | 104 | return strong_ptr->HandleSyncRequest(*this, context); |
| 105 | } else { | 105 | } else { |
| 106 | UNREACHABLE(); | 106 | ASSERT(false); |
| 107 | return ResultSuccess; | 107 | return ResultSuccess; |
| 108 | } | 108 | } |
| 109 | 109 | ||
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp index 940334f59..ea2160099 100644 --- a/src/core/hle/kernel/k_thread.cpp +++ b/src/core/hle/kernel/k_thread.cpp | |||
| @@ -133,7 +133,7 @@ ResultCode KThread::Initialize(KThreadFunction func, uintptr_t arg, VAddr user_s | |||
| 133 | UNIMPLEMENTED(); | 133 | UNIMPLEMENTED(); |
| 134 | break; | 134 | break; |
| 135 | default: | 135 | default: |
| 136 | UNREACHABLE_MSG("KThread::Initialize: Unknown ThreadType {}", static_cast<u32>(type)); | 136 | ASSERT_MSG(false, "KThread::Initialize: Unknown ThreadType {}", static_cast<u32>(type)); |
| 137 | break; | 137 | break; |
| 138 | } | 138 | } |
| 139 | thread_type = type; | 139 | thread_type = type; |
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 66e0ce2d0..584fa5b1c 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -1876,7 +1876,7 @@ static void SleepThread(Core::System& system, s64 nanoseconds) { | |||
| 1876 | KScheduler::YieldToAnyThread(kernel); | 1876 | KScheduler::YieldToAnyThread(kernel); |
| 1877 | } else { | 1877 | } else { |
| 1878 | // Nintendo does nothing at all if an otherwise invalid value is passed. | 1878 | // Nintendo does nothing at all if an otherwise invalid value is passed. |
| 1879 | UNREACHABLE_MSG("Unimplemented sleep yield type '{:016X}'!", nanoseconds); | 1879 | ASSERT_MSG(false, "Unimplemented sleep yield type '{:016X}'!", nanoseconds); |
| 1880 | } | 1880 | } |
| 1881 | } | 1881 | } |
| 1882 | 1882 | ||
diff --git a/src/core/hle/service/am/applets/applet_controller.cpp b/src/core/hle/service/am/applets/applet_controller.cpp index 655f2e936..0a5603d18 100644 --- a/src/core/hle/service/am/applets/applet_controller.cpp +++ b/src/core/hle/service/am/applets/applet_controller.cpp | |||
| @@ -178,7 +178,7 @@ ResultCode Controller::GetStatus() const { | |||
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | void Controller::ExecuteInteractive() { | 180 | void Controller::ExecuteInteractive() { |
| 181 | UNREACHABLE_MSG("Attempted to call interactive execution on non-interactive applet."); | 181 | ASSERT_MSG(false, "Attempted to call interactive execution on non-interactive applet."); |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | void Controller::Execute() { | 184 | void Controller::Execute() { |
diff --git a/src/core/hle/service/am/applets/applet_error.cpp b/src/core/hle/service/am/applets/applet_error.cpp index 911b2c229..0b87c60b9 100644 --- a/src/core/hle/service/am/applets/applet_error.cpp +++ b/src/core/hle/service/am/applets/applet_error.cpp | |||
| @@ -156,7 +156,7 @@ ResultCode Error::GetStatus() const { | |||
| 156 | } | 156 | } |
| 157 | 157 | ||
| 158 | void Error::ExecuteInteractive() { | 158 | void Error::ExecuteInteractive() { |
| 159 | UNREACHABLE_MSG("Unexpected interactive applet data!"); | 159 | ASSERT_MSG(false, "Unexpected interactive applet data!"); |
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | void Error::Execute() { | 162 | void Error::Execute() { |
diff --git a/src/core/hle/service/am/applets/applet_general_backend.cpp b/src/core/hle/service/am/applets/applet_general_backend.cpp index 3fe1a390a..41c002ef2 100644 --- a/src/core/hle/service/am/applets/applet_general_backend.cpp +++ b/src/core/hle/service/am/applets/applet_general_backend.cpp | |||
| @@ -76,7 +76,7 @@ ResultCode Auth::GetStatus() const { | |||
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | void Auth::ExecuteInteractive() { | 78 | void Auth::ExecuteInteractive() { |
| 79 | UNREACHABLE_MSG("Unexpected interactive applet data."); | 79 | ASSERT_MSG(false, "Unexpected interactive applet data."); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | void Auth::Execute() { | 82 | void Auth::Execute() { |
| @@ -175,7 +175,7 @@ ResultCode PhotoViewer::GetStatus() const { | |||
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | void PhotoViewer::ExecuteInteractive() { | 177 | void PhotoViewer::ExecuteInteractive() { |
| 178 | UNREACHABLE_MSG("Unexpected interactive applet data."); | 178 | ASSERT_MSG(false, "Unexpected interactive applet data."); |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | void PhotoViewer::Execute() { | 181 | void PhotoViewer::Execute() { |
diff --git a/src/core/hle/service/am/applets/applet_mii_edit.cpp b/src/core/hle/service/am/applets/applet_mii_edit.cpp index 3acde1630..8d847c3f6 100644 --- a/src/core/hle/service/am/applets/applet_mii_edit.cpp +++ b/src/core/hle/service/am/applets/applet_mii_edit.cpp | |||
| @@ -67,7 +67,7 @@ ResultCode MiiEdit::GetStatus() const { | |||
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | void MiiEdit::ExecuteInteractive() { | 69 | void MiiEdit::ExecuteInteractive() { |
| 70 | UNREACHABLE_MSG("Attempted to call interactive execution on non-interactive applet."); | 70 | ASSERT_MSG(false, "Attempted to call interactive execution on non-interactive applet."); |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | void MiiEdit::Execute() { | 73 | void MiiEdit::Execute() { |
diff --git a/src/core/hle/service/am/applets/applet_profile_select.cpp b/src/core/hle/service/am/applets/applet_profile_select.cpp index fd16f2e49..02049fd9f 100644 --- a/src/core/hle/service/am/applets/applet_profile_select.cpp +++ b/src/core/hle/service/am/applets/applet_profile_select.cpp | |||
| @@ -44,7 +44,7 @@ ResultCode ProfileSelect::GetStatus() const { | |||
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | void ProfileSelect::ExecuteInteractive() { | 46 | void ProfileSelect::ExecuteInteractive() { |
| 47 | UNREACHABLE_MSG("Attempted to call interactive execution on non-interactive applet."); | 47 | ASSERT_MSG(false, "Attempted to call interactive execution on non-interactive applet."); |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | void ProfileSelect::Execute() { | 50 | void ProfileSelect::Execute() { |
diff --git a/src/core/hle/service/am/applets/applet_software_keyboard.cpp b/src/core/hle/service/am/applets/applet_software_keyboard.cpp index 7c21365e4..4116fbaa7 100644 --- a/src/core/hle/service/am/applets/applet_software_keyboard.cpp +++ b/src/core/hle/service/am/applets/applet_software_keyboard.cpp | |||
| @@ -71,7 +71,7 @@ void SoftwareKeyboard::Initialize() { | |||
| 71 | InitializeBackground(applet_mode); | 71 | InitializeBackground(applet_mode); |
| 72 | break; | 72 | break; |
| 73 | default: | 73 | default: |
| 74 | UNREACHABLE_MSG("Invalid LibraryAppletMode={}", applet_mode); | 74 | ASSERT_MSG(false, "Invalid LibraryAppletMode={}", applet_mode); |
| 75 | break; | 75 | break; |
| 76 | } | 76 | } |
| 77 | } | 77 | } |
diff --git a/src/core/hle/service/am/applets/applet_web_browser.cpp b/src/core/hle/service/am/applets/applet_web_browser.cpp index 2aa4a00ad..7b3f77a51 100644 --- a/src/core/hle/service/am/applets/applet_web_browser.cpp +++ b/src/core/hle/service/am/applets/applet_web_browser.cpp | |||
| @@ -279,7 +279,7 @@ void WebBrowser::Initialize() { | |||
| 279 | InitializeLobby(); | 279 | InitializeLobby(); |
| 280 | break; | 280 | break; |
| 281 | default: | 281 | default: |
| 282 | UNREACHABLE_MSG("Invalid ShimKind={}", web_arg_header.shim_kind); | 282 | ASSERT_MSG(false, "Invalid ShimKind={}", web_arg_header.shim_kind); |
| 283 | break; | 283 | break; |
| 284 | } | 284 | } |
| 285 | } | 285 | } |
| @@ -320,7 +320,7 @@ void WebBrowser::Execute() { | |||
| 320 | ExecuteLobby(); | 320 | ExecuteLobby(); |
| 321 | break; | 321 | break; |
| 322 | default: | 322 | default: |
| 323 | UNREACHABLE_MSG("Invalid ShimKind={}", web_arg_header.shim_kind); | 323 | ASSERT_MSG(false, "Invalid ShimKind={}", web_arg_header.shim_kind); |
| 324 | WebBrowserExit(WebExitReason::EndButtonPressed); | 324 | WebBrowserExit(WebExitReason::EndButtonPressed); |
| 325 | break; | 325 | break; |
| 326 | } | 326 | } |
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index ddfcba0f1..fae6e5aff 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp | |||
| @@ -899,7 +899,7 @@ void FSP_SRV::OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx) { | |||
| 899 | case FileSys::SaveDataSpaceId::TemporaryStorage: | 899 | case FileSys::SaveDataSpaceId::TemporaryStorage: |
| 900 | case FileSys::SaveDataSpaceId::ProperSystem: | 900 | case FileSys::SaveDataSpaceId::ProperSystem: |
| 901 | case FileSys::SaveDataSpaceId::SafeMode: | 901 | case FileSys::SaveDataSpaceId::SafeMode: |
| 902 | UNREACHABLE(); | 902 | ASSERT(false); |
| 903 | } | 903 | } |
| 904 | 904 | ||
| 905 | auto filesystem = std::make_shared<IFileSystem>(system, std::move(dir.Unwrap()), | 905 | auto filesystem = std::make_shared<IFileSystem>(system, std::move(dir.Unwrap()), |
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp index 1e04ee3f2..ac5c38cc6 100644 --- a/src/core/hle/service/hid/controllers/npad.cpp +++ b/src/core/hle/service/hid/controllers/npad.cpp | |||
| @@ -160,7 +160,7 @@ void Controller_NPad::InitNewlyAddedController(Core::HID::NpadIdType npad_id) { | |||
| 160 | shared_memory->system_properties.raw = 0; | 160 | shared_memory->system_properties.raw = 0; |
| 161 | switch (controller_type) { | 161 | switch (controller_type) { |
| 162 | case Core::HID::NpadStyleIndex::None: | 162 | case Core::HID::NpadStyleIndex::None: |
| 163 | UNREACHABLE(); | 163 | ASSERT(false); |
| 164 | break; | 164 | break; |
| 165 | case Core::HID::NpadStyleIndex::ProController: | 165 | case Core::HID::NpadStyleIndex::ProController: |
| 166 | shared_memory->style_tag.fullkey.Assign(1); | 166 | shared_memory->style_tag.fullkey.Assign(1); |
| @@ -422,7 +422,7 @@ void Controller_NPad::OnUpdate(const Core::Timing::CoreTiming& core_timing) { | |||
| 422 | libnx_state.connection_status.is_connected.Assign(1); | 422 | libnx_state.connection_status.is_connected.Assign(1); |
| 423 | switch (controller_type) { | 423 | switch (controller_type) { |
| 424 | case Core::HID::NpadStyleIndex::None: | 424 | case Core::HID::NpadStyleIndex::None: |
| 425 | UNREACHABLE(); | 425 | ASSERT(false); |
| 426 | break; | 426 | break; |
| 427 | case Core::HID::NpadStyleIndex::ProController: | 427 | case Core::HID::NpadStyleIndex::ProController: |
| 428 | case Core::HID::NpadStyleIndex::NES: | 428 | case Core::HID::NpadStyleIndex::NES: |
| @@ -597,7 +597,7 @@ void Controller_NPad::OnMotionUpdate(const Core::Timing::CoreTiming& core_timing | |||
| 597 | 597 | ||
| 598 | switch (controller_type) { | 598 | switch (controller_type) { |
| 599 | case Core::HID::NpadStyleIndex::None: | 599 | case Core::HID::NpadStyleIndex::None: |
| 600 | UNREACHABLE(); | 600 | ASSERT(false); |
| 601 | break; | 601 | break; |
| 602 | case Core::HID::NpadStyleIndex::ProController: | 602 | case Core::HID::NpadStyleIndex::ProController: |
| 603 | case Core::HID::NpadStyleIndex::Pokeball: | 603 | case Core::HID::NpadStyleIndex::Pokeball: |
| @@ -856,7 +856,7 @@ void Controller_NPad::VibrateController( | |||
| 856 | } | 856 | } |
| 857 | 857 | ||
| 858 | if (vibration_device_handle.device_index == Core::HID::DeviceIndex::None) { | 858 | if (vibration_device_handle.device_index == Core::HID::DeviceIndex::None) { |
| 859 | UNREACHABLE_MSG("DeviceIndex should never be None!"); | 859 | ASSERT_MSG(false, "DeviceIndex should never be None!"); |
| 860 | return; | 860 | return; |
| 861 | } | 861 | } |
| 862 | 862 | ||
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 8a496c38c..dc5d0366d 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp | |||
| @@ -1441,7 +1441,7 @@ void Hid::GetVibrationDeviceInfo(Kernel::HLERequestContext& ctx) { | |||
| 1441 | break; | 1441 | break; |
| 1442 | case Core::HID::DeviceIndex::None: | 1442 | case Core::HID::DeviceIndex::None: |
| 1443 | default: | 1443 | default: |
| 1444 | UNREACHABLE_MSG("DeviceIndex should never be None!"); | 1444 | ASSERT_MSG(false, "DeviceIndex should never be None!"); |
| 1445 | vibration_device_info.position = Core::HID::VibrationDevicePosition::None; | 1445 | vibration_device_info.position = Core::HID::VibrationDevicePosition::None; |
| 1446 | break; | 1446 | break; |
| 1447 | } | 1447 | } |
diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp index fa72fcba9..72e4902cb 100644 --- a/src/core/hle/service/ldr/ldr.cpp +++ b/src/core/hle/service/ldr/ldr.cpp | |||
| @@ -347,7 +347,7 @@ public: | |||
| 347 | } | 347 | } |
| 348 | 348 | ||
| 349 | if (!succeeded) { | 349 | if (!succeeded) { |
| 350 | UNREACHABLE_MSG("Out of address space!"); | 350 | ASSERT_MSG(false, "Out of address space!"); |
| 351 | return Kernel::ResultOutOfMemory; | 351 | return Kernel::ResultOutOfMemory; |
| 352 | } | 352 | } |
| 353 | 353 | ||
diff --git a/src/core/hle/service/mii/mii_manager.cpp b/src/core/hle/service/mii/mii_manager.cpp index 4964539f9..08300a1a6 100644 --- a/src/core/hle/service/mii/mii_manager.cpp +++ b/src/core/hle/service/mii/mii_manager.cpp | |||
| @@ -290,7 +290,7 @@ MiiStoreData BuildRandomStoreData(Age age, Gender gender, Race race, const Commo | |||
| 290 | u8 glasses_type{}; | 290 | u8 glasses_type{}; |
| 291 | while (glasses_type_start < glasses_type_info.values[glasses_type]) { | 291 | while (glasses_type_start < glasses_type_info.values[glasses_type]) { |
| 292 | if (++glasses_type >= glasses_type_info.values_count) { | 292 | if (++glasses_type >= glasses_type_info.values_count) { |
| 293 | UNREACHABLE(); | 293 | ASSERT(false); |
| 294 | break; | 294 | break; |
| 295 | } | 295 | } |
| 296 | } | 296 | } |
diff --git a/src/core/hle/service/nvdrv/syncpoint_manager.cpp b/src/core/hle/service/nvdrv/syncpoint_manager.cpp index f77f0df27..a6fa943e8 100644 --- a/src/core/hle/service/nvdrv/syncpoint_manager.cpp +++ b/src/core/hle/service/nvdrv/syncpoint_manager.cpp | |||
| @@ -23,7 +23,7 @@ u32 SyncpointManager::AllocateSyncpoint() { | |||
| 23 | return syncpoint_id; | 23 | return syncpoint_id; |
| 24 | } | 24 | } |
| 25 | } | 25 | } |
| 26 | UNREACHABLE_MSG("No more available syncpoints!"); | 26 | ASSERT_MSG(false, "No more available syncpoints!"); |
| 27 | return {}; | 27 | return {}; |
| 28 | } | 28 | } |
| 29 | 29 | ||
diff --git a/src/core/hle/service/nvflinger/buffer_queue_producer.cpp b/src/core/hle/service/nvflinger/buffer_queue_producer.cpp index fe95d1b73..337431488 100644 --- a/src/core/hle/service/nvflinger/buffer_queue_producer.cpp +++ b/src/core/hle/service/nvflinger/buffer_queue_producer.cpp | |||
| @@ -659,7 +659,7 @@ Status BufferQueueProducer::Query(NativeWindow what, s32* out_value) { | |||
| 659 | value = core->consumer_usage_bit; | 659 | value = core->consumer_usage_bit; |
| 660 | break; | 660 | break; |
| 661 | default: | 661 | default: |
| 662 | UNREACHABLE(); | 662 | ASSERT(false); |
| 663 | return Status::BadValue; | 663 | return Status::BadValue; |
| 664 | } | 664 | } |
| 665 | 665 | ||
diff --git a/src/core/hle/service/time/standard_user_system_clock_core.cpp b/src/core/hle/service/time/standard_user_system_clock_core.cpp index f0cc9a155..508091dc2 100644 --- a/src/core/hle/service/time/standard_user_system_clock_core.cpp +++ b/src/core/hle/service/time/standard_user_system_clock_core.cpp | |||
| @@ -48,12 +48,12 @@ ResultCode StandardUserSystemClockCore::GetClockContext(Core::System& system, | |||
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | ResultCode StandardUserSystemClockCore::Flush(const SystemClockContext&) { | 50 | ResultCode StandardUserSystemClockCore::Flush(const SystemClockContext&) { |
| 51 | UNREACHABLE(); | 51 | UNIMPLEMENTED(); |
| 52 | return ERROR_NOT_IMPLEMENTED; | 52 | return ERROR_NOT_IMPLEMENTED; |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | ResultCode StandardUserSystemClockCore::SetClockContext(const SystemClockContext&) { | 55 | ResultCode StandardUserSystemClockCore::SetClockContext(const SystemClockContext&) { |
| 56 | UNREACHABLE(); | 56 | UNIMPLEMENTED(); |
| 57 | return ERROR_NOT_IMPLEMENTED; | 57 | return ERROR_NOT_IMPLEMENTED; |
| 58 | } | 58 | } |
| 59 | 59 | ||
diff --git a/src/core/hle/service/time/time_manager.cpp b/src/core/hle/service/time/time_manager.cpp index acc038dbf..28667710e 100644 --- a/src/core/hle/service/time/time_manager.cpp +++ b/src/core/hle/service/time/time_manager.cpp | |||
| @@ -111,7 +111,7 @@ struct TimeManager::Impl final { | |||
| 111 | FileSys::VirtualFile& vfs_file) { | 111 | FileSys::VirtualFile& vfs_file) { |
| 112 | if (time_zone_content_manager.GetTimeZoneManager().SetDeviceLocationNameWithTimeZoneRule( | 112 | if (time_zone_content_manager.GetTimeZoneManager().SetDeviceLocationNameWithTimeZoneRule( |
| 113 | location_name, vfs_file) != ResultSuccess) { | 113 | location_name, vfs_file) != ResultSuccess) { |
| 114 | UNREACHABLE(); | 114 | ASSERT(false); |
| 115 | return; | 115 | return; |
| 116 | } | 116 | } |
| 117 | 117 | ||
| @@ -155,7 +155,7 @@ struct TimeManager::Impl final { | |||
| 155 | } else { | 155 | } else { |
| 156 | if (standard_local_system_clock_core.SetCurrentTime(system_, posix_time) != | 156 | if (standard_local_system_clock_core.SetCurrentTime(system_, posix_time) != |
| 157 | ResultSuccess) { | 157 | ResultSuccess) { |
| 158 | UNREACHABLE(); | 158 | ASSERT(false); |
| 159 | return; | 159 | return; |
| 160 | } | 160 | } |
| 161 | } | 161 | } |
| @@ -170,7 +170,7 @@ struct TimeManager::Impl final { | |||
| 170 | 170 | ||
| 171 | if (standard_network_system_clock_core.SetSystemClockContext(clock_context) != | 171 | if (standard_network_system_clock_core.SetSystemClockContext(clock_context) != |
| 172 | ResultSuccess) { | 172 | ResultSuccess) { |
| 173 | UNREACHABLE(); | 173 | ASSERT(false); |
| 174 | return; | 174 | return; |
| 175 | } | 175 | } |
| 176 | 176 | ||
| @@ -183,7 +183,7 @@ struct TimeManager::Impl final { | |||
| 183 | Clock::SteadyClockTimePoint steady_clock_time_point) { | 183 | Clock::SteadyClockTimePoint steady_clock_time_point) { |
| 184 | if (standard_user_system_clock_core.SetAutomaticCorrectionEnabled( | 184 | if (standard_user_system_clock_core.SetAutomaticCorrectionEnabled( |
| 185 | system_, is_automatic_correction_enabled) != ResultSuccess) { | 185 | system_, is_automatic_correction_enabled) != ResultSuccess) { |
| 186 | UNREACHABLE(); | 186 | ASSERT(false); |
| 187 | return; | 187 | return; |
| 188 | } | 188 | } |
| 189 | 189 | ||
| @@ -203,7 +203,7 @@ struct TimeManager::Impl final { | |||
| 203 | if (GetStandardLocalSystemClockCore() | 203 | if (GetStandardLocalSystemClockCore() |
| 204 | .SetCurrentTime(system_, timespan.ToSeconds()) | 204 | .SetCurrentTime(system_, timespan.ToSeconds()) |
| 205 | .IsError()) { | 205 | .IsError()) { |
| 206 | UNREACHABLE(); | 206 | ASSERT(false); |
| 207 | return; | 207 | return; |
| 208 | } | 208 | } |
| 209 | } | 209 | } |
diff --git a/src/core/hle/service/time/time_zone_manager.cpp b/src/core/hle/service/time/time_zone_manager.cpp index eeec34436..fee05ec7a 100644 --- a/src/core/hle/service/time/time_zone_manager.cpp +++ b/src/core/hle/service/time/time_zone_manager.cpp | |||
| @@ -279,7 +279,7 @@ static constexpr int TransitionTime(int year, Rule rule, int offset) { | |||
| 279 | break; | 279 | break; |
| 280 | } | 280 | } |
| 281 | default: | 281 | default: |
| 282 | UNREACHABLE(); | 282 | ASSERT(false); |
| 283 | } | 283 | } |
| 284 | return value + rule.transition_time + offset; | 284 | return value + rule.transition_time + offset; |
| 285 | } | 285 | } |
diff --git a/src/core/tools/freezer.cpp b/src/core/tools/freezer.cpp index 7a0b73eca..5cc99fbe4 100644 --- a/src/core/tools/freezer.cpp +++ b/src/core/tools/freezer.cpp | |||
| @@ -25,7 +25,6 @@ u64 MemoryReadWidth(Core::Memory::Memory& memory, u32 width, VAddr addr) { | |||
| 25 | return memory.Read64(addr); | 25 | return memory.Read64(addr); |
| 26 | default: | 26 | default: |
| 27 | UNREACHABLE(); | 27 | UNREACHABLE(); |
| 28 | return 0; | ||
| 29 | } | 28 | } |
| 30 | } | 29 | } |
| 31 | 30 | ||
diff --git a/src/video_core/command_classes/codecs/codec.cpp b/src/video_core/command_classes/codecs/codec.cpp index 83b2e0fc4..a5eb97b7f 100644 --- a/src/video_core/command_classes/codecs/codec.cpp +++ b/src/video_core/command_classes/codecs/codec.cpp | |||
| @@ -224,7 +224,7 @@ void Codec::Decode() { | |||
| 224 | vp9_hidden_frame = vp9_decoder->WasFrameHidden(); | 224 | vp9_hidden_frame = vp9_decoder->WasFrameHidden(); |
| 225 | return vp9_decoder->GetFrameBytes(); | 225 | return vp9_decoder->GetFrameBytes(); |
| 226 | default: | 226 | default: |
| 227 | UNREACHABLE(); | 227 | ASSERT(false); |
| 228 | return std::vector<u8>{}; | 228 | return std::vector<u8>{}; |
| 229 | } | 229 | } |
| 230 | }(); | 230 | }(); |
diff --git a/src/video_core/command_classes/vic.cpp b/src/video_core/command_classes/vic.cpp index bef321b6e..7c17df353 100644 --- a/src/video_core/command_classes/vic.cpp +++ b/src/video_core/command_classes/vic.cpp | |||
| @@ -228,7 +228,7 @@ void Vic::WriteYUVFrame(const AVFrame* frame, const VicConfig& config) { | |||
| 228 | break; | 228 | break; |
| 229 | } | 229 | } |
| 230 | default: | 230 | default: |
| 231 | UNREACHABLE(); | 231 | ASSERT(false); |
| 232 | break; | 232 | break; |
| 233 | } | 233 | } |
| 234 | gpu.MemoryManager().WriteBlock(output_surface_chroma_address, chroma_buffer.data(), | 234 | gpu.MemoryManager().WriteBlock(output_surface_chroma_address, chroma_buffer.data(), |
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index 434ba0877..5f9eb208c 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h | |||
| @@ -202,7 +202,7 @@ public: | |||
| 202 | case Size::Size_11_11_10: | 202 | case Size::Size_11_11_10: |
| 203 | return 3; | 203 | return 3; |
| 204 | default: | 204 | default: |
| 205 | UNREACHABLE(); | 205 | ASSERT(false); |
| 206 | return 1; | 206 | return 1; |
| 207 | } | 207 | } |
| 208 | } | 208 | } |
| @@ -238,7 +238,7 @@ public: | |||
| 238 | case Size::Size_11_11_10: | 238 | case Size::Size_11_11_10: |
| 239 | return 4; | 239 | return 4; |
| 240 | default: | 240 | default: |
| 241 | UNREACHABLE(); | 241 | ASSERT(false); |
| 242 | return 1; | 242 | return 1; |
| 243 | } | 243 | } |
| 244 | } | 244 | } |
| @@ -274,7 +274,7 @@ public: | |||
| 274 | case Size::Size_11_11_10: | 274 | case Size::Size_11_11_10: |
| 275 | return "11_11_10"; | 275 | return "11_11_10"; |
| 276 | default: | 276 | default: |
| 277 | UNREACHABLE(); | 277 | ASSERT(false); |
| 278 | return {}; | 278 | return {}; |
| 279 | } | 279 | } |
| 280 | } | 280 | } |
| @@ -296,7 +296,7 @@ public: | |||
| 296 | case Type::Float: | 296 | case Type::Float: |
| 297 | return "FLOAT"; | 297 | return "FLOAT"; |
| 298 | } | 298 | } |
| 299 | UNREACHABLE(); | 299 | ASSERT(false); |
| 300 | return {}; | 300 | return {}; |
| 301 | } | 301 | } |
| 302 | 302 | ||
| @@ -336,7 +336,7 @@ public: | |||
| 336 | case 3: | 336 | case 3: |
| 337 | return {x3, y3}; | 337 | return {x3, y3}; |
| 338 | default: | 338 | default: |
| 339 | UNREACHABLE(); | 339 | ASSERT(false); |
| 340 | return {0, 0}; | 340 | return {0, 0}; |
| 341 | } | 341 | } |
| 342 | } | 342 | } |
| @@ -1193,7 +1193,7 @@ public: | |||
| 1193 | case IndexFormat::UnsignedInt: | 1193 | case IndexFormat::UnsignedInt: |
| 1194 | return 4; | 1194 | return 4; |
| 1195 | } | 1195 | } |
| 1196 | UNREACHABLE(); | 1196 | ASSERT(false); |
| 1197 | return 1; | 1197 | return 1; |
| 1198 | } | 1198 | } |
| 1199 | 1199 | ||
diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp index a7302f7c1..0efe58282 100644 --- a/src/video_core/engines/maxwell_dma.cpp +++ b/src/video_core/engines/maxwell_dma.cpp | |||
| @@ -62,7 +62,7 @@ void MaxwellDMA::Launch() { | |||
| 62 | 62 | ||
| 63 | if (!is_src_pitch && !is_dst_pitch) { | 63 | if (!is_src_pitch && !is_dst_pitch) { |
| 64 | // If both the source and the destination are in block layout, assert. | 64 | // If both the source and the destination are in block layout, assert. |
| 65 | UNREACHABLE_MSG("Tiled->Tiled DMA transfers are not yet implemented"); | 65 | UNIMPLEMENTED_MSG("Tiled->Tiled DMA transfers are not yet implemented"); |
| 66 | return; | 66 | return; |
| 67 | } | 67 | } |
| 68 | 68 | ||
| @@ -260,7 +260,7 @@ void MaxwellDMA::ReleaseSemaphore() { | |||
| 260 | memory_manager.Write<u64>(address + 8, system.GPU().GetTicks()); | 260 | memory_manager.Write<u64>(address + 8, system.GPU().GetTicks()); |
| 261 | break; | 261 | break; |
| 262 | default: | 262 | default: |
| 263 | UNREACHABLE_MSG("Unknown semaphore type: {}", static_cast<u32>(type.Value())); | 263 | ASSERT_MSG(false, "Unknown semaphore type: {}", static_cast<u32>(type.Value())); |
| 264 | } | 264 | } |
| 265 | } | 265 | } |
| 266 | 266 | ||
diff --git a/src/video_core/gpu_thread.cpp b/src/video_core/gpu_thread.cpp index 8479dc6d2..b0ce9f000 100644 --- a/src/video_core/gpu_thread.cpp +++ b/src/video_core/gpu_thread.cpp | |||
| @@ -50,7 +50,7 @@ static void RunThread(std::stop_token stop_token, Core::System& system, | |||
| 50 | } else if (const auto* invalidate = std::get_if<InvalidateRegionCommand>(&next.data)) { | 50 | } else if (const auto* invalidate = std::get_if<InvalidateRegionCommand>(&next.data)) { |
| 51 | rasterizer->OnCPUWrite(invalidate->addr, invalidate->size); | 51 | rasterizer->OnCPUWrite(invalidate->addr, invalidate->size); |
| 52 | } else { | 52 | } else { |
| 53 | UNREACHABLE(); | 53 | ASSERT(false); |
| 54 | } | 54 | } |
| 55 | state.signaled_fence.store(next.fence); | 55 | state.signaled_fence.store(next.fence); |
| 56 | if (next.block) { | 56 | if (next.block) { |
diff --git a/src/video_core/macro/macro.cpp b/src/video_core/macro/macro.cpp index e7279efcd..43f8b5904 100644 --- a/src/video_core/macro/macro.cpp +++ b/src/video_core/macro/macro.cpp | |||
| @@ -71,7 +71,7 @@ void MacroEngine::Execute(u32 method, const std::vector<u32>& parameters) { | |||
| 71 | } | 71 | } |
| 72 | } | 72 | } |
| 73 | if (!mid_method.has_value()) { | 73 | if (!mid_method.has_value()) { |
| 74 | UNREACHABLE_MSG("Macro 0x{0:x} was not uploaded", method); | 74 | ASSERT_MSG(false, "Macro 0x{0:x} was not uploaded", method); |
| 75 | return; | 75 | return; |
| 76 | } | 76 | } |
| 77 | } | 77 | } |
diff --git a/src/video_core/macro/macro_interpreter.cpp b/src/video_core/macro/macro_interpreter.cpp index 87d2e8721..f670b1bca 100644 --- a/src/video_core/macro/macro_interpreter.cpp +++ b/src/video_core/macro/macro_interpreter.cpp | |||
| @@ -308,7 +308,6 @@ bool MacroInterpreterImpl::EvaluateBranchCondition(Macro::BranchCondition cond, | |||
| 308 | return value != 0; | 308 | return value != 0; |
| 309 | } | 309 | } |
| 310 | UNREACHABLE(); | 310 | UNREACHABLE(); |
| 311 | return true; | ||
| 312 | } | 311 | } |
| 313 | 312 | ||
| 314 | Macro::Opcode MacroInterpreterImpl::GetOpcode() const { | 313 | Macro::Opcode MacroInterpreterImpl::GetOpcode() const { |
diff --git a/src/video_core/memory_manager.cpp b/src/video_core/memory_manager.cpp index c8d99fdb5..d373be0ba 100644 --- a/src/video_core/memory_manager.cpp +++ b/src/video_core/memory_manager.cpp | |||
| @@ -67,7 +67,7 @@ void MemoryManager::Unmap(GPUVAddr gpu_addr, std::size_t size) { | |||
| 67 | ASSERT(it->first == gpu_addr); | 67 | ASSERT(it->first == gpu_addr); |
| 68 | map_ranges.erase(it); | 68 | map_ranges.erase(it); |
| 69 | } else { | 69 | } else { |
| 70 | UNREACHABLE_MSG("Unmapping non-existent GPU address=0x{:x}", gpu_addr); | 70 | ASSERT_MSG(false, "Unmapping non-existent GPU address=0x{:x}", gpu_addr); |
| 71 | } | 71 | } |
| 72 | const auto submapped_ranges = GetSubmappedRange(gpu_addr, size); | 72 | const auto submapped_ranges = GetSubmappedRange(gpu_addr, size); |
| 73 | 73 | ||
| @@ -206,7 +206,7 @@ T MemoryManager::Read(GPUVAddr addr) const { | |||
| 206 | return value; | 206 | return value; |
| 207 | } | 207 | } |
| 208 | 208 | ||
| 209 | UNREACHABLE(); | 209 | ASSERT(false); |
| 210 | 210 | ||
| 211 | return {}; | 211 | return {}; |
| 212 | } | 212 | } |
| @@ -219,7 +219,7 @@ void MemoryManager::Write(GPUVAddr addr, T data) { | |||
| 219 | return; | 219 | return; |
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | UNREACHABLE(); | 222 | ASSERT(false); |
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | template u8 MemoryManager::Read<u8>(GPUVAddr addr) const; | 225 | template u8 MemoryManager::Read<u8>(GPUVAddr addr) const; |
diff --git a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp index 35f42f2f8..67eae369d 100644 --- a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp +++ b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp | |||
| @@ -48,7 +48,7 @@ GLenum Stage(size_t stage_index) { | |||
| 48 | case 4: | 48 | case 4: |
| 49 | return GL_FRAGMENT_SHADER; | 49 | return GL_FRAGMENT_SHADER; |
| 50 | } | 50 | } |
| 51 | UNREACHABLE_MSG("{}", stage_index); | 51 | ASSERT_MSG(false, "{}", stage_index); |
| 52 | return GL_NONE; | 52 | return GL_NONE; |
| 53 | } | 53 | } |
| 54 | 54 | ||
| @@ -65,7 +65,7 @@ GLenum AssemblyStage(size_t stage_index) { | |||
| 65 | case 4: | 65 | case 4: |
| 66 | return GL_FRAGMENT_PROGRAM_NV; | 66 | return GL_FRAGMENT_PROGRAM_NV; |
| 67 | } | 67 | } |
| 68 | UNREACHABLE_MSG("{}", stage_index); | 68 | ASSERT_MSG(false, "{}", stage_index); |
| 69 | return GL_NONE; | 69 | return GL_NONE; |
| 70 | } | 70 | } |
| 71 | 71 | ||
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index cd48fef26..07d4b7cf0 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp | |||
| @@ -85,7 +85,7 @@ Shader::RuntimeInfo MakeRuntimeInfo(const GraphicsPipelineKey& key, | |||
| 85 | case Maxwell::TessellationPrimitive::Quads: | 85 | case Maxwell::TessellationPrimitive::Quads: |
| 86 | return Shader::TessPrimitive::Quads; | 86 | return Shader::TessPrimitive::Quads; |
| 87 | } | 87 | } |
| 88 | UNREACHABLE(); | 88 | ASSERT(false); |
| 89 | return Shader::TessPrimitive::Triangles; | 89 | return Shader::TessPrimitive::Triangles; |
| 90 | }(); | 90 | }(); |
| 91 | info.tess_spacing = [&] { | 91 | info.tess_spacing = [&] { |
| @@ -97,7 +97,7 @@ Shader::RuntimeInfo MakeRuntimeInfo(const GraphicsPipelineKey& key, | |||
| 97 | case Maxwell::TessellationSpacing::FractionalEven: | 97 | case Maxwell::TessellationSpacing::FractionalEven: |
| 98 | return Shader::TessSpacing::FractionalEven; | 98 | return Shader::TessSpacing::FractionalEven; |
| 99 | } | 99 | } |
| 100 | UNREACHABLE(); | 100 | ASSERT(false); |
| 101 | return Shader::TessSpacing::Equal; | 101 | return Shader::TessSpacing::Equal; |
| 102 | }(); | 102 | }(); |
| 103 | break; | 103 | break; |
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index 29ff736fb..8c0fffc67 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp | |||
| @@ -83,7 +83,7 @@ GLenum ImageTarget(const VideoCommon::ImageInfo& info) { | |||
| 83 | case ImageType::Buffer: | 83 | case ImageType::Buffer: |
| 84 | return GL_TEXTURE_BUFFER; | 84 | return GL_TEXTURE_BUFFER; |
| 85 | } | 85 | } |
| 86 | UNREACHABLE_MSG("Invalid image type={}", info.type); | 86 | ASSERT_MSG(false, "Invalid image type={}", info.type); |
| 87 | return GL_NONE; | 87 | return GL_NONE; |
| 88 | } | 88 | } |
| 89 | 89 | ||
| @@ -107,7 +107,7 @@ GLenum ImageTarget(Shader::TextureType type, int num_samples = 1) { | |||
| 107 | case Shader::TextureType::Buffer: | 107 | case Shader::TextureType::Buffer: |
| 108 | return GL_TEXTURE_BUFFER; | 108 | return GL_TEXTURE_BUFFER; |
| 109 | } | 109 | } |
| 110 | UNREACHABLE_MSG("Invalid image view type={}", type); | 110 | ASSERT_MSG(false, "Invalid image view type={}", type); |
| 111 | return GL_NONE; | 111 | return GL_NONE; |
| 112 | } | 112 | } |
| 113 | 113 | ||
| @@ -119,7 +119,7 @@ GLenum TextureMode(PixelFormat format, bool is_first) { | |||
| 119 | case PixelFormat::S8_UINT_D24_UNORM: | 119 | case PixelFormat::S8_UINT_D24_UNORM: |
| 120 | return is_first ? GL_STENCIL_INDEX : GL_DEPTH_COMPONENT; | 120 | return is_first ? GL_STENCIL_INDEX : GL_DEPTH_COMPONENT; |
| 121 | default: | 121 | default: |
| 122 | UNREACHABLE(); | 122 | ASSERT(false); |
| 123 | return GL_DEPTH_COMPONENT; | 123 | return GL_DEPTH_COMPONENT; |
| 124 | } | 124 | } |
| 125 | } | 125 | } |
| @@ -140,7 +140,7 @@ GLint Swizzle(SwizzleSource source) { | |||
| 140 | case SwizzleSource::OneFloat: | 140 | case SwizzleSource::OneFloat: |
| 141 | return GL_ONE; | 141 | return GL_ONE; |
| 142 | } | 142 | } |
| 143 | UNREACHABLE_MSG("Invalid swizzle source={}", source); | 143 | ASSERT_MSG(false, "Invalid swizzle source={}", source); |
| 144 | return GL_NONE; | 144 | return GL_NONE; |
| 145 | } | 145 | } |
| 146 | 146 | ||
| @@ -197,7 +197,7 @@ GLint ConvertA5B5G5R1_UNORM(SwizzleSource source) { | |||
| 197 | case SwizzleSource::OneFloat: | 197 | case SwizzleSource::OneFloat: |
| 198 | return GL_ONE; | 198 | return GL_ONE; |
| 199 | } | 199 | } |
| 200 | UNREACHABLE_MSG("Invalid swizzle source={}", source); | 200 | ASSERT_MSG(false, "Invalid swizzle source={}", source); |
| 201 | return GL_NONE; | 201 | return GL_NONE; |
| 202 | } | 202 | } |
| 203 | 203 | ||
| @@ -381,10 +381,10 @@ OGLTexture MakeImage(const VideoCommon::ImageInfo& info, GLenum gl_internal_form | |||
| 381 | glTextureStorage3D(handle, gl_num_levels, gl_internal_format, width, height, depth); | 381 | glTextureStorage3D(handle, gl_num_levels, gl_internal_format, width, height, depth); |
| 382 | break; | 382 | break; |
| 383 | case GL_TEXTURE_BUFFER: | 383 | case GL_TEXTURE_BUFFER: |
| 384 | UNREACHABLE(); | 384 | ASSERT(false); |
| 385 | break; | 385 | break; |
| 386 | default: | 386 | default: |
| 387 | UNREACHABLE_MSG("Invalid target=0x{:x}", target); | 387 | ASSERT_MSG(false, "Invalid target=0x{:x}", target); |
| 388 | break; | 388 | break; |
| 389 | } | 389 | } |
| 390 | return texture; | 390 | return texture; |
| @@ -420,7 +420,7 @@ OGLTexture MakeImage(const VideoCommon::ImageInfo& info, GLenum gl_internal_form | |||
| 420 | case Shader::ImageFormat::R32G32B32A32_UINT: | 420 | case Shader::ImageFormat::R32G32B32A32_UINT: |
| 421 | return GL_RGBA32UI; | 421 | return GL_RGBA32UI; |
| 422 | } | 422 | } |
| 423 | UNREACHABLE_MSG("Invalid image format={}", format); | 423 | ASSERT_MSG(false, "Invalid image format={}", format); |
| 424 | return GL_R32UI; | 424 | return GL_R32UI; |
| 425 | } | 425 | } |
| 426 | 426 | ||
| @@ -579,7 +579,7 @@ void TextureCacheRuntime::EmulateCopyImage(Image& dst, Image& src, | |||
| 579 | } else if (IsPixelFormatBGR(dst.info.format) || IsPixelFormatBGR(src.info.format)) { | 579 | } else if (IsPixelFormatBGR(dst.info.format) || IsPixelFormatBGR(src.info.format)) { |
| 580 | format_conversion_pass.ConvertImage(dst, src, copies); | 580 | format_conversion_pass.ConvertImage(dst, src, copies); |
| 581 | } else { | 581 | } else { |
| 582 | UNREACHABLE(); | 582 | ASSERT(false); |
| 583 | } | 583 | } |
| 584 | } | 584 | } |
| 585 | 585 | ||
| @@ -620,7 +620,7 @@ void TextureCacheRuntime::AccelerateImageUpload(Image& image, const ImageBufferM | |||
| 620 | case ImageType::Linear: | 620 | case ImageType::Linear: |
| 621 | return util_shaders.PitchUpload(image, map, swizzles); | 621 | return util_shaders.PitchUpload(image, map, swizzles); |
| 622 | default: | 622 | default: |
| 623 | UNREACHABLE(); | 623 | ASSERT(false); |
| 624 | break; | 624 | break; |
| 625 | } | 625 | } |
| 626 | } | 626 | } |
| @@ -639,7 +639,7 @@ FormatProperties TextureCacheRuntime::FormatInfo(ImageType type, GLenum internal | |||
| 639 | case ImageType::e3D: | 639 | case ImageType::e3D: |
| 640 | return format_properties[2].at(internal_format); | 640 | return format_properties[2].at(internal_format); |
| 641 | default: | 641 | default: |
| 642 | UNREACHABLE(); | 642 | ASSERT(false); |
| 643 | return FormatProperties{}; | 643 | return FormatProperties{}; |
| 644 | } | 644 | } |
| 645 | } | 645 | } |
| @@ -888,7 +888,7 @@ void Image::CopyBufferToImage(const VideoCommon::BufferImageCopy& copy, size_t b | |||
| 888 | } | 888 | } |
| 889 | break; | 889 | break; |
| 890 | default: | 890 | default: |
| 891 | UNREACHABLE(); | 891 | ASSERT(false); |
| 892 | } | 892 | } |
| 893 | } | 893 | } |
| 894 | 894 | ||
| @@ -924,7 +924,7 @@ void Image::CopyImageToBuffer(const VideoCommon::BufferImageCopy& copy, size_t b | |||
| 924 | depth = copy.image_extent.depth; | 924 | depth = copy.image_extent.depth; |
| 925 | break; | 925 | break; |
| 926 | default: | 926 | default: |
| 927 | UNREACHABLE(); | 927 | ASSERT(false); |
| 928 | } | 928 | } |
| 929 | // Compressed formats don't have a pixel format or type | 929 | // Compressed formats don't have a pixel format or type |
| 930 | const bool is_compressed = gl_format == GL_NONE; | 930 | const bool is_compressed = gl_format == GL_NONE; |
| @@ -950,7 +950,7 @@ void Image::Scale(bool up_scale) { | |||
| 950 | case SurfaceType::DepthStencil: | 950 | case SurfaceType::DepthStencil: |
| 951 | return GL_DEPTH_STENCIL_ATTACHMENT; | 951 | return GL_DEPTH_STENCIL_ATTACHMENT; |
| 952 | default: | 952 | default: |
| 953 | UNREACHABLE(); | 953 | ASSERT(false); |
| 954 | return GL_COLOR_ATTACHMENT0; | 954 | return GL_COLOR_ATTACHMENT0; |
| 955 | } | 955 | } |
| 956 | }(); | 956 | }(); |
| @@ -965,7 +965,7 @@ void Image::Scale(bool up_scale) { | |||
| 965 | case SurfaceType::DepthStencil: | 965 | case SurfaceType::DepthStencil: |
| 966 | return GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT; | 966 | return GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT; |
| 967 | default: | 967 | default: |
| 968 | UNREACHABLE(); | 968 | ASSERT(false); |
| 969 | return GL_COLOR_BUFFER_BIT; | 969 | return GL_COLOR_BUFFER_BIT; |
| 970 | } | 970 | } |
| 971 | }(); | 971 | }(); |
| @@ -980,7 +980,7 @@ void Image::Scale(bool up_scale) { | |||
| 980 | case SurfaceType::DepthStencil: | 980 | case SurfaceType::DepthStencil: |
| 981 | return 3; | 981 | return 3; |
| 982 | default: | 982 | default: |
| 983 | UNREACHABLE(); | 983 | ASSERT(false); |
| 984 | return 0; | 984 | return 0; |
| 985 | } | 985 | } |
| 986 | }(); | 986 | }(); |
| @@ -1045,7 +1045,7 @@ bool Image::ScaleUp(bool ignore) { | |||
| 1045 | return false; | 1045 | return false; |
| 1046 | } | 1046 | } |
| 1047 | if (info.type == ImageType::Linear) { | 1047 | if (info.type == ImageType::Linear) { |
| 1048 | UNREACHABLE(); | 1048 | ASSERT(false); |
| 1049 | return false; | 1049 | return false; |
| 1050 | } | 1050 | } |
| 1051 | flags |= ImageFlagBits::Rescaled; | 1051 | flags |= ImageFlagBits::Rescaled; |
| @@ -1139,7 +1139,7 @@ ImageView::ImageView(TextureCacheRuntime& runtime, const VideoCommon::ImageViewI | |||
| 1139 | UNIMPLEMENTED(); | 1139 | UNIMPLEMENTED(); |
| 1140 | break; | 1140 | break; |
| 1141 | case ImageViewType::Buffer: | 1141 | case ImageViewType::Buffer: |
| 1142 | UNREACHABLE(); | 1142 | ASSERT(false); |
| 1143 | break; | 1143 | break; |
| 1144 | } | 1144 | } |
| 1145 | switch (info.type) { | 1145 | switch (info.type) { |
| @@ -1319,7 +1319,7 @@ Framebuffer::Framebuffer(TextureCacheRuntime& runtime, std::span<ImageView*, NUM | |||
| 1319 | buffer_bits |= GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT; | 1319 | buffer_bits |= GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT; |
| 1320 | break; | 1320 | break; |
| 1321 | default: | 1321 | default: |
| 1322 | UNREACHABLE(); | 1322 | ASSERT(false); |
| 1323 | buffer_bits |= GL_DEPTH_BUFFER_BIT; | 1323 | buffer_bits |= GL_DEPTH_BUFFER_BIT; |
| 1324 | break; | 1324 | break; |
| 1325 | } | 1325 | } |
diff --git a/src/video_core/renderer_opengl/maxwell_to_gl.h b/src/video_core/renderer_opengl/maxwell_to_gl.h index c2a6da5a7..644b60d73 100644 --- a/src/video_core/renderer_opengl/maxwell_to_gl.h +++ b/src/video_core/renderer_opengl/maxwell_to_gl.h | |||
| @@ -206,7 +206,7 @@ inline GLenum IndexFormat(Maxwell::IndexFormat index_format) { | |||
| 206 | case Maxwell::IndexFormat::UnsignedInt: | 206 | case Maxwell::IndexFormat::UnsignedInt: |
| 207 | return GL_UNSIGNED_INT; | 207 | return GL_UNSIGNED_INT; |
| 208 | } | 208 | } |
| 209 | UNREACHABLE_MSG("Invalid index_format={}", index_format); | 209 | ASSERT_MSG(false, "Invalid index_format={}", index_format); |
| 210 | return {}; | 210 | return {}; |
| 211 | } | 211 | } |
| 212 | 212 | ||
| @@ -243,7 +243,7 @@ inline GLenum PrimitiveTopology(Maxwell::PrimitiveTopology topology) { | |||
| 243 | case Maxwell::PrimitiveTopology::Patches: | 243 | case Maxwell::PrimitiveTopology::Patches: |
| 244 | return GL_PATCHES; | 244 | return GL_PATCHES; |
| 245 | } | 245 | } |
| 246 | UNREACHABLE_MSG("Invalid topology={}", topology); | 246 | ASSERT_MSG(false, "Invalid topology={}", topology); |
| 247 | return GL_POINTS; | 247 | return GL_POINTS; |
| 248 | } | 248 | } |
| 249 | 249 | ||
| @@ -271,8 +271,8 @@ inline GLenum TextureFilterMode(Tegra::Texture::TextureFilter filter_mode, | |||
| 271 | } | 271 | } |
| 272 | break; | 272 | break; |
| 273 | } | 273 | } |
| 274 | UNREACHABLE_MSG("Invalid texture filter mode={} and mipmap filter mode={}", filter_mode, | 274 | ASSERT_MSG(false, "Invalid texture filter mode={} and mipmap filter mode={}", filter_mode, |
| 275 | mipmap_filter_mode); | 275 | mipmap_filter_mode); |
| 276 | return GL_NEAREST; | 276 | return GL_NEAREST; |
| 277 | } | 277 | } |
| 278 | 278 | ||
| @@ -550,7 +550,7 @@ inline GLenum PolygonMode(Maxwell::PolygonMode polygon_mode) { | |||
| 550 | case Maxwell::PolygonMode::Fill: | 550 | case Maxwell::PolygonMode::Fill: |
| 551 | return GL_FILL; | 551 | return GL_FILL; |
| 552 | } | 552 | } |
| 553 | UNREACHABLE_MSG("Invalid polygon mode={}", polygon_mode); | 553 | ASSERT_MSG(false, "Invalid polygon mode={}", polygon_mode); |
| 554 | return GL_FILL; | 554 | return GL_FILL; |
| 555 | } | 555 | } |
| 556 | 556 | ||
| @@ -563,7 +563,7 @@ inline GLenum ReductionFilter(Tegra::Texture::SamplerReduction filter) { | |||
| 563 | case Tegra::Texture::SamplerReduction::Max: | 563 | case Tegra::Texture::SamplerReduction::Max: |
| 564 | return GL_MAX; | 564 | return GL_MAX; |
| 565 | } | 565 | } |
| 566 | UNREACHABLE_MSG("Invalid reduction filter={}", static_cast<int>(filter)); | 566 | ASSERT_MSG(false, "Invalid reduction filter={}", static_cast<int>(filter)); |
| 567 | return GL_WEIGHTED_AVERAGE_ARB; | 567 | return GL_WEIGHTED_AVERAGE_ARB; |
| 568 | } | 568 | } |
| 569 | 569 | ||
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 3a3c213bb..9a9243544 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -79,7 +79,7 @@ const char* GetSource(GLenum source) { | |||
| 79 | case GL_DEBUG_SOURCE_OTHER: | 79 | case GL_DEBUG_SOURCE_OTHER: |
| 80 | return "OTHER"; | 80 | return "OTHER"; |
| 81 | default: | 81 | default: |
| 82 | UNREACHABLE(); | 82 | ASSERT(false); |
| 83 | return "Unknown source"; | 83 | return "Unknown source"; |
| 84 | } | 84 | } |
| 85 | } | 85 | } |
| @@ -101,7 +101,7 @@ const char* GetType(GLenum type) { | |||
| 101 | case GL_DEBUG_TYPE_MARKER: | 101 | case GL_DEBUG_TYPE_MARKER: |
| 102 | return "MARKER"; | 102 | return "MARKER"; |
| 103 | default: | 103 | default: |
| 104 | UNREACHABLE(); | 104 | ASSERT(false); |
| 105 | return "Unknown type"; | 105 | return "Unknown type"; |
| 106 | } | 106 | } |
| 107 | } | 107 | } |
diff --git a/src/video_core/renderer_opengl/util_shaders.cpp b/src/video_core/renderer_opengl/util_shaders.cpp index 837825737..404def62e 100644 --- a/src/video_core/renderer_opengl/util_shaders.cpp +++ b/src/video_core/renderer_opengl/util_shaders.cpp | |||
| @@ -282,7 +282,7 @@ GLenum StoreFormat(u32 bytes_per_block) { | |||
| 282 | case 16: | 282 | case 16: |
| 283 | return GL_RGBA32UI; | 283 | return GL_RGBA32UI; |
| 284 | } | 284 | } |
| 285 | UNREACHABLE(); | 285 | ASSERT(false); |
| 286 | return GL_R8UI; | 286 | return GL_R8UI; |
| 287 | } | 287 | } |
| 288 | 288 | ||
diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp index ea360f339..193cbe15e 100644 --- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp +++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp | |||
| @@ -25,7 +25,7 @@ VkFilter Filter(Tegra::Texture::TextureFilter filter) { | |||
| 25 | case Tegra::Texture::TextureFilter::Linear: | 25 | case Tegra::Texture::TextureFilter::Linear: |
| 26 | return VK_FILTER_LINEAR; | 26 | return VK_FILTER_LINEAR; |
| 27 | } | 27 | } |
| 28 | UNREACHABLE_MSG("Invalid sampler filter={}", filter); | 28 | ASSERT_MSG(false, "Invalid sampler filter={}", filter); |
| 29 | return {}; | 29 | return {}; |
| 30 | } | 30 | } |
| 31 | 31 | ||
| @@ -42,7 +42,7 @@ VkSamplerMipmapMode MipmapMode(Tegra::Texture::TextureMipmapFilter mipmap_filter | |||
| 42 | case Tegra::Texture::TextureMipmapFilter::Linear: | 42 | case Tegra::Texture::TextureMipmapFilter::Linear: |
| 43 | return VK_SAMPLER_MIPMAP_MODE_LINEAR; | 43 | return VK_SAMPLER_MIPMAP_MODE_LINEAR; |
| 44 | } | 44 | } |
| 45 | UNREACHABLE_MSG("Invalid sampler mipmap mode={}", mipmap_filter); | 45 | ASSERT_MSG(false, "Invalid sampler mipmap mode={}", mipmap_filter); |
| 46 | return {}; | 46 | return {}; |
| 47 | } | 47 | } |
| 48 | 48 | ||
| @@ -70,7 +70,7 @@ VkSamplerAddressMode WrapMode(const Device& device, Tegra::Texture::WrapMode wra | |||
| 70 | case Tegra::Texture::TextureFilter::Linear: | 70 | case Tegra::Texture::TextureFilter::Linear: |
| 71 | return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER; | 71 | return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER; |
| 72 | } | 72 | } |
| 73 | UNREACHABLE(); | 73 | ASSERT(false); |
| 74 | return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; | 74 | return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; |
| 75 | case Tegra::Texture::WrapMode::MirrorOnceClampToEdge: | 75 | case Tegra::Texture::WrapMode::MirrorOnceClampToEdge: |
| 76 | return VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE; | 76 | return VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE; |
| @@ -744,7 +744,7 @@ VkViewportCoordinateSwizzleNV ViewportSwizzle(Maxwell::ViewportSwizzle swizzle) | |||
| 744 | case Maxwell::ViewportSwizzle::NegativeW: | 744 | case Maxwell::ViewportSwizzle::NegativeW: |
| 745 | return VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV; | 745 | return VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV; |
| 746 | } | 746 | } |
| 747 | UNREACHABLE_MSG("Invalid swizzle={}", swizzle); | 747 | ASSERT_MSG(false, "Invalid swizzle={}", swizzle); |
| 748 | return {}; | 748 | return {}; |
| 749 | } | 749 | } |
| 750 | 750 | ||
| @@ -757,7 +757,7 @@ VkSamplerReductionMode SamplerReduction(Tegra::Texture::SamplerReduction reducti | |||
| 757 | case Tegra::Texture::SamplerReduction::Max: | 757 | case Tegra::Texture::SamplerReduction::Max: |
| 758 | return VK_SAMPLER_REDUCTION_MODE_MAX_EXT; | 758 | return VK_SAMPLER_REDUCTION_MODE_MAX_EXT; |
| 759 | } | 759 | } |
| 760 | UNREACHABLE_MSG("Invalid sampler mode={}", static_cast<int>(reduction)); | 760 | ASSERT_MSG(false, "Invalid sampler mode={}", static_cast<int>(reduction)); |
| 761 | return VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT; | 761 | return VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT; |
| 762 | } | 762 | } |
| 763 | 763 | ||
| @@ -780,7 +780,7 @@ VkSampleCountFlagBits MsaaMode(Tegra::Texture::MsaaMode msaa_mode) { | |||
| 780 | case Tegra::Texture::MsaaMode::Msaa4x4: | 780 | case Tegra::Texture::MsaaMode::Msaa4x4: |
| 781 | return VK_SAMPLE_COUNT_16_BIT; | 781 | return VK_SAMPLE_COUNT_16_BIT; |
| 782 | default: | 782 | default: |
| 783 | UNREACHABLE_MSG("Invalid msaa_mode={}", static_cast<int>(msaa_mode)); | 783 | ASSERT_MSG(false, "Invalid msaa_mode={}", static_cast<int>(msaa_mode)); |
| 784 | return VK_SAMPLE_COUNT_1_BIT; | 784 | return VK_SAMPLE_COUNT_1_BIT; |
| 785 | } | 785 | } |
| 786 | } | 786 | } |
diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp index 0aeb37538..450905197 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp | |||
| @@ -46,7 +46,7 @@ size_t BytesPerIndex(VkIndexType index_type) { | |||
| 46 | case VK_INDEX_TYPE_UINT32: | 46 | case VK_INDEX_TYPE_UINT32: |
| 47 | return 4; | 47 | return 4; |
| 48 | default: | 48 | default: |
| 49 | UNREACHABLE_MSG("Invalid index type={}", index_type); | 49 | ASSERT_MSG(false, "Invalid index type={}", index_type); |
| 50 | return 1; | 50 | return 1; |
| 51 | } | 51 | } |
| 52 | } | 52 | } |
| @@ -366,7 +366,7 @@ void BufferCacheRuntime::ReserveQuadArrayLUT(u32 num_indices, bool wait_for_idle | |||
| 366 | std::memcpy(staging_data, MakeQuadIndices<u32>(quad, first).data(), quad_size); | 366 | std::memcpy(staging_data, MakeQuadIndices<u32>(quad, first).data(), quad_size); |
| 367 | break; | 367 | break; |
| 368 | default: | 368 | default: |
| 369 | UNREACHABLE(); | 369 | ASSERT(false); |
| 370 | break; | 370 | break; |
| 371 | } | 371 | } |
| 372 | staging_data += quad_size; | 372 | staging_data += quad_size; |
diff --git a/src/video_core/renderer_vulkan/vk_compute_pass.cpp b/src/video_core/renderer_vulkan/vk_compute_pass.cpp index 29481a102..acc8badc9 100644 --- a/src/video_core/renderer_vulkan/vk_compute_pass.cpp +++ b/src/video_core/renderer_vulkan/vk_compute_pass.cpp | |||
| @@ -265,7 +265,7 @@ std::pair<VkBuffer, VkDeviceSize> QuadIndexedPass::Assemble( | |||
| 265 | case Tegra::Engines::Maxwell3D::Regs::IndexFormat::UnsignedInt: | 265 | case Tegra::Engines::Maxwell3D::Regs::IndexFormat::UnsignedInt: |
| 266 | return 2; | 266 | return 2; |
| 267 | } | 267 | } |
| 268 | UNREACHABLE(); | 268 | ASSERT(false); |
| 269 | return 2; | 269 | return 2; |
| 270 | }(); | 270 | }(); |
| 271 | const u32 input_size = num_vertices << index_shift; | 271 | const u32 input_size = num_vertices << index_shift; |
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index 5196bdcf2..978e827f5 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | |||
| @@ -174,7 +174,7 @@ Shader::RuntimeInfo MakeRuntimeInfo(std::span<const Shader::IR::Program> program | |||
| 174 | case Maxwell::TessellationPrimitive::Quads: | 174 | case Maxwell::TessellationPrimitive::Quads: |
| 175 | return Shader::TessPrimitive::Quads; | 175 | return Shader::TessPrimitive::Quads; |
| 176 | } | 176 | } |
| 177 | UNREACHABLE(); | 177 | ASSERT(false); |
| 178 | return Shader::TessPrimitive::Triangles; | 178 | return Shader::TessPrimitive::Triangles; |
| 179 | }(); | 179 | }(); |
| 180 | info.tess_spacing = [&] { | 180 | info.tess_spacing = [&] { |
| @@ -187,7 +187,7 @@ Shader::RuntimeInfo MakeRuntimeInfo(std::span<const Shader::IR::Program> program | |||
| 187 | case Maxwell::TessellationSpacing::FractionalEven: | 187 | case Maxwell::TessellationSpacing::FractionalEven: |
| 188 | return Shader::TessSpacing::FractionalEven; | 188 | return Shader::TessSpacing::FractionalEven; |
| 189 | } | 189 | } |
| 190 | UNREACHABLE(); | 190 | ASSERT(false); |
| 191 | return Shader::TessSpacing::Equal; | 191 | return Shader::TessSpacing::Equal; |
| 192 | }(); | 192 | }(); |
| 193 | break; | 193 | break; |
diff --git a/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp b/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp index 31ce2f815..9a6afaca6 100644 --- a/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp +++ b/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp | |||
| @@ -263,7 +263,7 @@ StagingBufferPool::StagingBuffersCache& StagingBufferPool::GetCache(MemoryUsage | |||
| 263 | case MemoryUsage::Download: | 263 | case MemoryUsage::Download: |
| 264 | return download_cache; | 264 | return download_cache; |
| 265 | default: | 265 | default: |
| 266 | UNREACHABLE_MSG("Invalid memory usage={}", usage); | 266 | ASSERT_MSG(false, "Invalid memory usage={}", usage); |
| 267 | return upload_cache; | 267 | return upload_cache; |
| 268 | } | 268 | } |
| 269 | } | 269 | } |
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index 353594293..43ecb9647 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp | |||
| @@ -70,7 +70,7 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) { | |||
| 70 | case ImageType::Buffer: | 70 | case ImageType::Buffer: |
| 71 | break; | 71 | break; |
| 72 | } | 72 | } |
| 73 | UNREACHABLE_MSG("Invalid image type={}", type); | 73 | ASSERT_MSG(false, "Invalid image type={}", type); |
| 74 | return {}; | 74 | return {}; |
| 75 | } | 75 | } |
| 76 | 76 | ||
| @@ -87,7 +87,7 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) { | |||
| 87 | case 16: | 87 | case 16: |
| 88 | return VK_SAMPLE_COUNT_16_BIT; | 88 | return VK_SAMPLE_COUNT_16_BIT; |
| 89 | default: | 89 | default: |
| 90 | UNREACHABLE_MSG("Invalid number of samples={}", num_samples); | 90 | ASSERT_MSG(false, "Invalid number of samples={}", num_samples); |
| 91 | return VK_SAMPLE_COUNT_1_BIT; | 91 | return VK_SAMPLE_COUNT_1_BIT; |
| 92 | } | 92 | } |
| 93 | } | 93 | } |
| @@ -107,7 +107,7 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) { | |||
| 107 | usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT; | 107 | usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT; |
| 108 | break; | 108 | break; |
| 109 | default: | 109 | default: |
| 110 | UNREACHABLE_MSG("Invalid surface type"); | 110 | ASSERT_MSG(false, "Invalid surface type"); |
| 111 | } | 111 | } |
| 112 | } | 112 | } |
| 113 | if (info.storage) { | 113 | if (info.storage) { |
| @@ -179,7 +179,7 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) { | |||
| 179 | case VideoCore::Surface::SurfaceType::DepthStencil: | 179 | case VideoCore::Surface::SurfaceType::DepthStencil: |
| 180 | return VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT; | 180 | return VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT; |
| 181 | default: | 181 | default: |
| 182 | UNREACHABLE_MSG("Invalid surface type"); | 182 | ASSERT_MSG(false, "Invalid surface type"); |
| 183 | return VkImageAspectFlags{}; | 183 | return VkImageAspectFlags{}; |
| 184 | } | 184 | } |
| 185 | } | 185 | } |
| @@ -221,7 +221,7 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) { | |||
| 221 | case SwizzleSource::OneInt: | 221 | case SwizzleSource::OneInt: |
| 222 | return VK_COMPONENT_SWIZZLE_ONE; | 222 | return VK_COMPONENT_SWIZZLE_ONE; |
| 223 | } | 223 | } |
| 224 | UNREACHABLE_MSG("Invalid swizzle={}", swizzle); | 224 | ASSERT_MSG(false, "Invalid swizzle={}", swizzle); |
| 225 | return VK_COMPONENT_SWIZZLE_ZERO; | 225 | return VK_COMPONENT_SWIZZLE_ZERO; |
| 226 | } | 226 | } |
| 227 | 227 | ||
| @@ -242,10 +242,10 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) { | |||
| 242 | case Shader::TextureType::ColorArrayCube: | 242 | case Shader::TextureType::ColorArrayCube: |
| 243 | return VK_IMAGE_VIEW_TYPE_CUBE_ARRAY; | 243 | return VK_IMAGE_VIEW_TYPE_CUBE_ARRAY; |
| 244 | case Shader::TextureType::Buffer: | 244 | case Shader::TextureType::Buffer: |
| 245 | UNREACHABLE_MSG("Texture buffers can't be image views"); | 245 | ASSERT_MSG(false, "Texture buffers can't be image views"); |
| 246 | return VK_IMAGE_VIEW_TYPE_1D; | 246 | return VK_IMAGE_VIEW_TYPE_1D; |
| 247 | } | 247 | } |
| 248 | UNREACHABLE_MSG("Invalid image view type={}", type); | 248 | ASSERT_MSG(false, "Invalid image view type={}", type); |
| 249 | return VK_IMAGE_VIEW_TYPE_2D; | 249 | return VK_IMAGE_VIEW_TYPE_2D; |
| 250 | } | 250 | } |
| 251 | 251 | ||
| @@ -269,10 +269,10 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) { | |||
| 269 | UNIMPLEMENTED_MSG("Rect image view"); | 269 | UNIMPLEMENTED_MSG("Rect image view"); |
| 270 | return VK_IMAGE_VIEW_TYPE_2D; | 270 | return VK_IMAGE_VIEW_TYPE_2D; |
| 271 | case VideoCommon::ImageViewType::Buffer: | 271 | case VideoCommon::ImageViewType::Buffer: |
| 272 | UNREACHABLE_MSG("Texture buffers can't be image views"); | 272 | ASSERT_MSG(false, "Texture buffers can't be image views"); |
| 273 | return VK_IMAGE_VIEW_TYPE_1D; | 273 | return VK_IMAGE_VIEW_TYPE_1D; |
| 274 | } | 274 | } |
| 275 | UNREACHABLE_MSG("Invalid image view type={}", type); | 275 | ASSERT_MSG(false, "Invalid image view type={}", type); |
| 276 | return VK_IMAGE_VIEW_TYPE_2D; | 276 | return VK_IMAGE_VIEW_TYPE_2D; |
| 277 | } | 277 | } |
| 278 | 278 | ||
| @@ -644,7 +644,7 @@ struct RangedBarrierRange { | |||
| 644 | case Shader::ImageFormat::R32G32B32A32_UINT: | 644 | case Shader::ImageFormat::R32G32B32A32_UINT: |
| 645 | return VK_FORMAT_R32G32B32A32_UINT; | 645 | return VK_FORMAT_R32G32B32A32_UINT; |
| 646 | } | 646 | } |
| 647 | UNREACHABLE_MSG("Invalid image format={}", format); | 647 | ASSERT_MSG(false, "Invalid image format={}", format); |
| 648 | return VK_FORMAT_R32_UINT; | 648 | return VK_FORMAT_R32_UINT; |
| 649 | } | 649 | } |
| 650 | 650 | ||
| @@ -1596,7 +1596,7 @@ ImageView::ImageView(TextureCacheRuntime& runtime, const VideoCommon::ImageViewI | |||
| 1596 | UNIMPLEMENTED(); | 1596 | UNIMPLEMENTED(); |
| 1597 | break; | 1597 | break; |
| 1598 | case VideoCommon::ImageViewType::Buffer: | 1598 | case VideoCommon::ImageViewType::Buffer: |
| 1599 | UNREACHABLE(); | 1599 | ASSERT(false); |
| 1600 | break; | 1600 | break; |
| 1601 | } | 1601 | } |
| 1602 | } | 1602 | } |
| @@ -1822,7 +1822,7 @@ void TextureCacheRuntime::AccelerateImageUpload( | |||
| 1822 | if (IsPixelFormatASTC(image.info.format)) { | 1822 | if (IsPixelFormatASTC(image.info.format)) { |
| 1823 | return astc_decoder_pass.Assemble(image, map, swizzles); | 1823 | return astc_decoder_pass.Assemble(image, map, swizzles); |
| 1824 | } | 1824 | } |
| 1825 | UNREACHABLE(); | 1825 | ASSERT(false); |
| 1826 | } | 1826 | } |
| 1827 | 1827 | ||
| 1828 | } // namespace Vulkan | 1828 | } // namespace Vulkan |
diff --git a/src/video_core/shader_environment.cpp b/src/video_core/shader_environment.cpp index d469964f6..c4e923bbf 100644 --- a/src/video_core/shader_environment.cpp +++ b/src/video_core/shader_environment.cpp | |||
| @@ -280,7 +280,7 @@ GraphicsEnvironment::GraphicsEnvironment(Tegra::Engines::Maxwell3D& maxwell3d_, | |||
| 280 | stage_index = 4; | 280 | stage_index = 4; |
| 281 | break; | 281 | break; |
| 282 | default: | 282 | default: |
| 283 | UNREACHABLE_MSG("Invalid program={}", program); | 283 | ASSERT_MSG(false, "Invalid program={}", program); |
| 284 | break; | 284 | break; |
| 285 | } | 285 | } |
| 286 | const u64 local_size{sph.LocalMemorySize()}; | 286 | const u64 local_size{sph.LocalMemorySize()}; |
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp index 5f428d35d..69c1b1e6d 100644 --- a/src/video_core/surface.cpp +++ b/src/video_core/surface.cpp | |||
| @@ -29,7 +29,7 @@ SurfaceTarget SurfaceTargetFromTextureType(Tegra::Texture::TextureType texture_t | |||
| 29 | return SurfaceTarget::Texture2DArray; | 29 | return SurfaceTarget::Texture2DArray; |
| 30 | default: | 30 | default: |
| 31 | LOG_CRITICAL(HW_GPU, "Unimplemented texture_type={}", texture_type); | 31 | LOG_CRITICAL(HW_GPU, "Unimplemented texture_type={}", texture_type); |
| 32 | UNREACHABLE(); | 32 | ASSERT(false); |
| 33 | return SurfaceTarget::Texture2D; | 33 | return SurfaceTarget::Texture2D; |
| 34 | } | 34 | } |
| 35 | } | 35 | } |
| @@ -48,7 +48,7 @@ bool SurfaceTargetIsLayered(SurfaceTarget target) { | |||
| 48 | return true; | 48 | return true; |
| 49 | default: | 49 | default: |
| 50 | LOG_CRITICAL(HW_GPU, "Unimplemented surface_target={}", target); | 50 | LOG_CRITICAL(HW_GPU, "Unimplemented surface_target={}", target); |
| 51 | UNREACHABLE(); | 51 | ASSERT(false); |
| 52 | return false; | 52 | return false; |
| 53 | } | 53 | } |
| 54 | } | 54 | } |
| @@ -67,7 +67,7 @@ bool SurfaceTargetIsArray(SurfaceTarget target) { | |||
| 67 | return true; | 67 | return true; |
| 68 | default: | 68 | default: |
| 69 | LOG_CRITICAL(HW_GPU, "Unimplemented surface_target={}", target); | 69 | LOG_CRITICAL(HW_GPU, "Unimplemented surface_target={}", target); |
| 70 | UNREACHABLE(); | 70 | ASSERT(false); |
| 71 | return false; | 71 | return false; |
| 72 | } | 72 | } |
| 73 | } | 73 | } |
diff --git a/src/video_core/texture_cache/image_info.cpp b/src/video_core/texture_cache/image_info.cpp index 802939f6c..6c073ee57 100644 --- a/src/video_core/texture_cache/image_info.cpp +++ b/src/video_core/texture_cache/image_info.cpp | |||
| @@ -94,7 +94,7 @@ ImageInfo::ImageInfo(const TICEntry& config) noexcept { | |||
| 94 | resources.layers = 1; | 94 | resources.layers = 1; |
| 95 | break; | 95 | break; |
| 96 | default: | 96 | default: |
| 97 | UNREACHABLE_MSG("Invalid texture_type={}", static_cast<int>(config.texture_type.Value())); | 97 | ASSERT_MSG(false, "Invalid texture_type={}", static_cast<int>(config.texture_type.Value())); |
| 98 | break; | 98 | break; |
| 99 | } | 99 | } |
| 100 | if (type != ImageType::Linear) { | 100 | if (type != ImageType::Linear) { |
diff --git a/src/video_core/texture_cache/image_view_info.cpp b/src/video_core/texture_cache/image_view_info.cpp index 0cee5e45f..f47885147 100644 --- a/src/video_core/texture_cache/image_view_info.cpp +++ b/src/video_core/texture_cache/image_view_info.cpp | |||
| @@ -71,7 +71,7 @@ ImageViewInfo::ImageViewInfo(const TICEntry& config, s32 base_layer) noexcept | |||
| 71 | range.extent.layers = config.Depth() * 6; | 71 | range.extent.layers = config.Depth() * 6; |
| 72 | break; | 72 | break; |
| 73 | default: | 73 | default: |
| 74 | UNREACHABLE_MSG("Invalid texture_type={}", static_cast<int>(config.texture_type.Value())); | 74 | ASSERT_MSG(false, "Invalid texture_type={}", static_cast<int>(config.texture_type.Value())); |
| 75 | break; | 75 | break; |
| 76 | } | 76 | } |
| 77 | } | 77 | } |
diff --git a/src/video_core/texture_cache/samples_helper.h b/src/video_core/texture_cache/samples_helper.h index 91fec60bd..d552bccf0 100644 --- a/src/video_core/texture_cache/samples_helper.h +++ b/src/video_core/texture_cache/samples_helper.h | |||
| @@ -23,7 +23,7 @@ namespace VideoCommon { | |||
| 23 | case 16: | 23 | case 16: |
| 24 | return {2, 2}; | 24 | return {2, 2}; |
| 25 | } | 25 | } |
| 26 | UNREACHABLE_MSG("Invalid number of samples={}", num_samples); | 26 | ASSERT_MSG(false, "Invalid number of samples={}", num_samples); |
| 27 | return {1, 1}; | 27 | return {1, 1}; |
| 28 | } | 28 | } |
| 29 | 29 | ||
| @@ -47,7 +47,7 @@ namespace VideoCommon { | |||
| 47 | case MsaaMode::Msaa4x4: | 47 | case MsaaMode::Msaa4x4: |
| 48 | return 16; | 48 | return 16; |
| 49 | } | 49 | } |
| 50 | UNREACHABLE_MSG("Invalid MSAA mode={}", static_cast<int>(msaa_mode)); | 50 | ASSERT_MSG(false, "Invalid MSAA mode={}", static_cast<int>(msaa_mode)); |
| 51 | return 1; | 51 | return 1; |
| 52 | } | 52 | } |
| 53 | 53 | ||
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 6622d7818..cf3ca06a6 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h | |||
| @@ -1485,14 +1485,14 @@ void TextureCache<P>::UnregisterImage(ImageId image_id) { | |||
| 1485 | std::unordered_map<u64, std::vector<ImageId>, IdentityHash<u64>>& selected_page_table) { | 1485 | std::unordered_map<u64, std::vector<ImageId>, IdentityHash<u64>>& selected_page_table) { |
| 1486 | const auto page_it = selected_page_table.find(page); | 1486 | const auto page_it = selected_page_table.find(page); |
| 1487 | if (page_it == selected_page_table.end()) { | 1487 | if (page_it == selected_page_table.end()) { |
| 1488 | UNREACHABLE_MSG("Unregistering unregistered page=0x{:x}", page << PAGE_BITS); | 1488 | ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << PAGE_BITS); |
| 1489 | return; | 1489 | return; |
| 1490 | } | 1490 | } |
| 1491 | std::vector<ImageId>& image_ids = page_it->second; | 1491 | std::vector<ImageId>& image_ids = page_it->second; |
| 1492 | const auto vector_it = std::ranges::find(image_ids, image_id); | 1492 | const auto vector_it = std::ranges::find(image_ids, image_id); |
| 1493 | if (vector_it == image_ids.end()) { | 1493 | if (vector_it == image_ids.end()) { |
| 1494 | UNREACHABLE_MSG("Unregistering unregistered image in page=0x{:x}", | 1494 | ASSERT_MSG(false, "Unregistering unregistered image in page=0x{:x}", |
| 1495 | page << PAGE_BITS); | 1495 | page << PAGE_BITS); |
| 1496 | return; | 1496 | return; |
| 1497 | } | 1497 | } |
| 1498 | image_ids.erase(vector_it); | 1498 | image_ids.erase(vector_it); |
| @@ -1504,14 +1504,14 @@ void TextureCache<P>::UnregisterImage(ImageId image_id) { | |||
| 1504 | ForEachCPUPage(image.cpu_addr, image.guest_size_bytes, [this, map_id](u64 page) { | 1504 | ForEachCPUPage(image.cpu_addr, image.guest_size_bytes, [this, map_id](u64 page) { |
| 1505 | const auto page_it = page_table.find(page); | 1505 | const auto page_it = page_table.find(page); |
| 1506 | if (page_it == page_table.end()) { | 1506 | if (page_it == page_table.end()) { |
| 1507 | UNREACHABLE_MSG("Unregistering unregistered page=0x{:x}", page << PAGE_BITS); | 1507 | ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << PAGE_BITS); |
| 1508 | return; | 1508 | return; |
| 1509 | } | 1509 | } |
| 1510 | std::vector<ImageMapId>& image_map_ids = page_it->second; | 1510 | std::vector<ImageMapId>& image_map_ids = page_it->second; |
| 1511 | const auto vector_it = std::ranges::find(image_map_ids, map_id); | 1511 | const auto vector_it = std::ranges::find(image_map_ids, map_id); |
| 1512 | if (vector_it == image_map_ids.end()) { | 1512 | if (vector_it == image_map_ids.end()) { |
| 1513 | UNREACHABLE_MSG("Unregistering unregistered image in page=0x{:x}", | 1513 | ASSERT_MSG(false, "Unregistering unregistered image in page=0x{:x}", |
| 1514 | page << PAGE_BITS); | 1514 | page << PAGE_BITS); |
| 1515 | return; | 1515 | return; |
| 1516 | } | 1516 | } |
| 1517 | image_map_ids.erase(vector_it); | 1517 | image_map_ids.erase(vector_it); |
| @@ -1532,7 +1532,7 @@ void TextureCache<P>::UnregisterImage(ImageId image_id) { | |||
| 1532 | ForEachCPUPage(cpu_addr, size, [this, image_id](u64 page) { | 1532 | ForEachCPUPage(cpu_addr, size, [this, image_id](u64 page) { |
| 1533 | const auto page_it = page_table.find(page); | 1533 | const auto page_it = page_table.find(page); |
| 1534 | if (page_it == page_table.end()) { | 1534 | if (page_it == page_table.end()) { |
| 1535 | UNREACHABLE_MSG("Unregistering unregistered page=0x{:x}", page << PAGE_BITS); | 1535 | ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << PAGE_BITS); |
| 1536 | return; | 1536 | return; |
| 1537 | } | 1537 | } |
| 1538 | std::vector<ImageMapId>& image_map_ids = page_it->second; | 1538 | std::vector<ImageMapId>& image_map_ids = page_it->second; |
| @@ -1616,15 +1616,15 @@ void TextureCache<P>::DeleteImage(ImageId image_id, bool immediate_delete) { | |||
| 1616 | const GPUVAddr gpu_addr = image.gpu_addr; | 1616 | const GPUVAddr gpu_addr = image.gpu_addr; |
| 1617 | const auto alloc_it = image_allocs_table.find(gpu_addr); | 1617 | const auto alloc_it = image_allocs_table.find(gpu_addr); |
| 1618 | if (alloc_it == image_allocs_table.end()) { | 1618 | if (alloc_it == image_allocs_table.end()) { |
| 1619 | UNREACHABLE_MSG("Trying to delete an image alloc that does not exist in address 0x{:x}", | 1619 | ASSERT_MSG(false, "Trying to delete an image alloc that does not exist in address 0x{:x}", |
| 1620 | gpu_addr); | 1620 | gpu_addr); |
| 1621 | return; | 1621 | return; |
| 1622 | } | 1622 | } |
| 1623 | const ImageAllocId alloc_id = alloc_it->second; | 1623 | const ImageAllocId alloc_id = alloc_it->second; |
| 1624 | std::vector<ImageId>& alloc_images = slot_image_allocs[alloc_id].images; | 1624 | std::vector<ImageId>& alloc_images = slot_image_allocs[alloc_id].images; |
| 1625 | const auto alloc_image_it = std::ranges::find(alloc_images, image_id); | 1625 | const auto alloc_image_it = std::ranges::find(alloc_images, image_id); |
| 1626 | if (alloc_image_it == alloc_images.end()) { | 1626 | if (alloc_image_it == alloc_images.end()) { |
| 1627 | UNREACHABLE_MSG("Trying to delete an image that does not exist"); | 1627 | ASSERT_MSG(false, "Trying to delete an image that does not exist"); |
| 1628 | return; | 1628 | return; |
| 1629 | } | 1629 | } |
| 1630 | ASSERT_MSG(False(image.flags & ImageFlagBits::Tracked), "Image was not untracked"); | 1630 | ASSERT_MSG(False(image.flags & ImageFlagBits::Tracked), "Image was not untracked"); |
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp index c81343850..9b6b8527b 100644 --- a/src/video_core/textures/decoders.cpp +++ b/src/video_core/textures/decoders.cpp | |||
| @@ -87,7 +87,7 @@ void Swizzle(std::span<u8> output, std::span<const u8> input, u32 bytes_per_pixe | |||
| 87 | BPP_CASE(16) | 87 | BPP_CASE(16) |
| 88 | #undef BPP_CASE | 88 | #undef BPP_CASE |
| 89 | default: | 89 | default: |
| 90 | UNREACHABLE_MSG("Invalid bytes_per_pixel={}", bytes_per_pixel); | 90 | ASSERT_MSG(false, "Invalid bytes_per_pixel={}", bytes_per_pixel); |
| 91 | } | 91 | } |
| 92 | } | 92 | } |
| 93 | 93 | ||
| @@ -209,7 +209,7 @@ void SwizzleSubrect(u32 subrect_width, u32 subrect_height, u32 source_pitch, u32 | |||
| 209 | BPP_CASE(16) | 209 | BPP_CASE(16) |
| 210 | #undef BPP_CASE | 210 | #undef BPP_CASE |
| 211 | default: | 211 | default: |
| 212 | UNREACHABLE_MSG("Invalid bytes_per_pixel={}", bytes_per_pixel); | 212 | ASSERT_MSG(false, "Invalid bytes_per_pixel={}", bytes_per_pixel); |
| 213 | } | 213 | } |
| 214 | } | 214 | } |
| 215 | 215 | ||
| @@ -230,7 +230,7 @@ void UnswizzleSubrect(u32 line_length_in, u32 line_count, u32 pitch, u32 width, | |||
| 230 | BPP_CASE(16) | 230 | BPP_CASE(16) |
| 231 | #undef BPP_CASE | 231 | #undef BPP_CASE |
| 232 | default: | 232 | default: |
| 233 | UNREACHABLE_MSG("Invalid bytes_per_pixel={}", bytes_per_pixel); | 233 | ASSERT_MSG(false, "Invalid bytes_per_pixel={}", bytes_per_pixel); |
| 234 | } | 234 | } |
| 235 | } | 235 | } |
| 236 | 236 | ||
| @@ -253,7 +253,7 @@ void SwizzleSliceToVoxel(u32 line_length_in, u32 line_count, u32 pitch, u32 widt | |||
| 253 | BPP_CASE(16) | 253 | BPP_CASE(16) |
| 254 | #undef BPP_CASE | 254 | #undef BPP_CASE |
| 255 | default: | 255 | default: |
| 256 | UNREACHABLE_MSG("Invalid bytes_per_pixel={}", bytes_per_pixel); | 256 | ASSERT_MSG(false, "Invalid bytes_per_pixel={}", bytes_per_pixel); |
| 257 | } | 257 | } |
| 258 | } | 258 | } |
| 259 | 259 | ||
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index b3a77e07f..11ce865a7 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp | |||
| @@ -738,9 +738,10 @@ VkFormat Device::GetSupportedFormat(VkFormat wanted_format, VkFormatFeatureFlags | |||
| 738 | // The wanted format is not supported by hardware, search for alternatives | 738 | // The wanted format is not supported by hardware, search for alternatives |
| 739 | const VkFormat* alternatives = GetFormatAlternatives(wanted_format); | 739 | const VkFormat* alternatives = GetFormatAlternatives(wanted_format); |
| 740 | if (alternatives == nullptr) { | 740 | if (alternatives == nullptr) { |
| 741 | UNREACHABLE_MSG("Format={} with usage={} and type={} has no defined alternatives and host " | 741 | ASSERT_MSG(false, |
| 742 | "hardware does not support it", | 742 | "Format={} with usage={} and type={} has no defined alternatives and host " |
| 743 | wanted_format, wanted_usage, format_type); | 743 | "hardware does not support it", |
| 744 | wanted_format, wanted_usage, format_type); | ||
| 744 | return wanted_format; | 745 | return wanted_format; |
| 745 | } | 746 | } |
| 746 | 747 | ||
| @@ -756,9 +757,10 @@ VkFormat Device::GetSupportedFormat(VkFormat wanted_format, VkFormatFeatureFlags | |||
| 756 | } | 757 | } |
| 757 | 758 | ||
| 758 | // No alternatives found, panic | 759 | // No alternatives found, panic |
| 759 | UNREACHABLE_MSG("Format={} with usage={} and type={} is not supported by the host hardware and " | 760 | ASSERT_MSG(false, |
| 760 | "doesn't support any of the alternatives", | 761 | "Format={} with usage={} and type={} is not supported by the host hardware and " |
| 761 | wanted_format, wanted_usage, format_type); | 762 | "doesn't support any of the alternatives", |
| 763 | wanted_format, wanted_usage, format_type); | ||
| 762 | return wanted_format; | 764 | return wanted_format; |
| 763 | } | 765 | } |
| 764 | 766 | ||
diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp index caae6dfdc..6442898bd 100644 --- a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp +++ b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp | |||
| @@ -49,7 +49,7 @@ struct Range { | |||
| 49 | return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | | 49 | return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | |
| 50 | VK_MEMORY_PROPERTY_HOST_CACHED_BIT; | 50 | VK_MEMORY_PROPERTY_HOST_CACHED_BIT; |
| 51 | } | 51 | } |
| 52 | UNREACHABLE_MSG("Invalid memory usage={}", usage); | 52 | ASSERT_MSG(false, "Invalid memory usage={}", usage); |
| 53 | return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; | 53 | return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; |
| 54 | } | 54 | } |
| 55 | 55 | ||
| @@ -325,7 +325,7 @@ VkMemoryPropertyFlags MemoryAllocator::MemoryPropertyFlags(u32 type_mask, | |||
| 325 | // Remove device local, if it's not supported by the requested resource | 325 | // Remove device local, if it's not supported by the requested resource |
| 326 | return MemoryPropertyFlags(type_mask, flags & ~VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT); | 326 | return MemoryPropertyFlags(type_mask, flags & ~VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT); |
| 327 | } | 327 | } |
| 328 | UNREACHABLE_MSG("No compatible memory types found"); | 328 | ASSERT_MSG(false, "No compatible memory types found"); |
| 329 | return 0; | 329 | return 0; |
| 330 | } | 330 | } |
| 331 | 331 | ||
| @@ -349,7 +349,7 @@ bool IsHostVisible(MemoryUsage usage) noexcept { | |||
| 349 | case MemoryUsage::Download: | 349 | case MemoryUsage::Download: |
| 350 | return true; | 350 | return true; |
| 351 | } | 351 | } |
| 352 | UNREACHABLE_MSG("Invalid memory usage={}", usage); | 352 | ASSERT_MSG(false, "Invalid memory usage={}", usage); |
| 353 | return false; | 353 | return false; |
| 354 | } | 354 | } |
| 355 | 355 | ||
diff --git a/src/yuzu/applets/qt_controller.cpp b/src/yuzu/applets/qt_controller.cpp index c924cb0cb..8be311fcb 100644 --- a/src/yuzu/applets/qt_controller.cpp +++ b/src/yuzu/applets/qt_controller.cpp | |||
| @@ -631,7 +631,7 @@ void QtControllerSelectorDialog::DisableUnsupportedPlayers() { | |||
| 631 | switch (max_supported_players) { | 631 | switch (max_supported_players) { |
| 632 | case 0: | 632 | case 0: |
| 633 | default: | 633 | default: |
| 634 | UNREACHABLE(); | 634 | ASSERT(false); |
| 635 | return; | 635 | return; |
| 636 | case 1: | 636 | case 1: |
| 637 | ui->widgetSpacer->hide(); | 637 | ui->widgetSpacer->hide(); |