diff options
| author | 2020-08-13 15:13:21 -0400 | |
|---|---|---|
| committer | 2020-08-13 15:13:21 -0400 | |
| commit | ff0b14ee624c056d41cb020562f57af07c710a8b (patch) | |
| tree | 6642ba786c7158933e3d1e2fb41a1aa1a6e30a63 /src | |
| parent | Merge pull request #4497 from lioncash/freezer-alg (diff) | |
| parent | General: Tidy up clang-format warnings part 2 (diff) | |
| download | yuzu-ff0b14ee624c056d41cb020562f57af07c710a8b.tar.gz yuzu-ff0b14ee624c056d41cb020562f57af07c710a8b.tar.xz yuzu-ff0b14ee624c056d41cb020562f57af07c710a8b.zip | |
Merge pull request #4511 from lioncash/build2
General: Tidy up clang-format warnings part 2
Diffstat (limited to 'src')
| -rw-r--r-- | src/audio_core/cubeb_sink.cpp | 2 | ||||
| -rw-r--r-- | src/common/bit_field.h | 2 | ||||
| -rw-r--r-- | src/common/detached_tasks.cpp | 3 | ||||
| -rw-r--r-- | src/common/math_util.h | 2 | ||||
| -rw-r--r-- | src/core/file_sys/registered_cache.h | 6 | ||||
| -rw-r--r-- | src/core/hle/kernel/hle_ipc.cpp | 46 | ||||
| -rw-r--r-- | src/core/hle/kernel/memory/page_table.cpp | 22 | ||||
| -rw-r--r-- | src/core/hle/service/am/applets/web_browser.cpp | 3 | ||||
| -rw-r--r-- | src/core/hle/service/audio/audout_u.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/bcat/backend/boxcat.cpp | 6 | ||||
| -rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.h | 10 | ||||
| -rw-r--r-- | src/input_common/udp/client.cpp | 6 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/wrapper.h | 28 | ||||
| -rw-r--r-- | src/video_core/shader/control_flow.cpp | 30 | ||||
| -rw-r--r-- | src/video_core/shader/decode/memory.cpp | 6 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_input_player.cpp | 61 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_mouse_advanced.cpp | 11 |
17 files changed, 129 insertions, 117 deletions
diff --git a/src/audio_core/cubeb_sink.cpp b/src/audio_core/cubeb_sink.cpp index 41bf5cd4d..c27df946c 100644 --- a/src/audio_core/cubeb_sink.cpp +++ b/src/audio_core/cubeb_sink.cpp | |||
| @@ -78,7 +78,7 @@ public: | |||
| 78 | const s16 surround_left{samples[i + 4]}; | 78 | const s16 surround_left{samples[i + 4]}; |
| 79 | const s16 surround_right{samples[i + 5]}; | 79 | const s16 surround_right{samples[i + 5]}; |
| 80 | // Not used in the ATSC reference implementation | 80 | // Not used in the ATSC reference implementation |
| 81 | [[maybe_unused]] const s16 low_frequency_effects { samples[i + 3] }; | 81 | [[maybe_unused]] const s16 low_frequency_effects{samples[i + 3]}; |
| 82 | 82 | ||
| 83 | constexpr s32 clev{707}; // center mixing level coefficient | 83 | constexpr s32 clev{707}; // center mixing level coefficient |
| 84 | constexpr s32 slev{707}; // surround mixing level coefficient | 84 | constexpr s32 slev{707}; // surround mixing level coefficient |
diff --git a/src/common/bit_field.h b/src/common/bit_field.h index dfa38a357..26ae6c7fc 100644 --- a/src/common/bit_field.h +++ b/src/common/bit_field.h | |||
| @@ -161,7 +161,7 @@ public: | |||
| 161 | } | 161 | } |
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | /// This constructor and assignment operator might be considered ambiguous: | 164 | // This constructor and assignment operator might be considered ambiguous: |
| 165 | // Would they initialize the storage or just the bitfield? | 165 | // Would they initialize the storage or just the bitfield? |
| 166 | // Hence, delete them. Use the Assign method to set bitfield values! | 166 | // Hence, delete them. Use the Assign method to set bitfield values! |
| 167 | BitField(T val) = delete; | 167 | BitField(T val) = delete; |
diff --git a/src/common/detached_tasks.cpp b/src/common/detached_tasks.cpp index f268d6021..f2b4939df 100644 --- a/src/common/detached_tasks.cpp +++ b/src/common/detached_tasks.cpp | |||
| @@ -34,8 +34,7 @@ void DetachedTasks::AddTask(std::function<void()> task) { | |||
| 34 | std::unique_lock lock{instance->mutex}; | 34 | std::unique_lock lock{instance->mutex}; |
| 35 | --instance->count; | 35 | --instance->count; |
| 36 | std::notify_all_at_thread_exit(instance->cv, std::move(lock)); | 36 | std::notify_all_at_thread_exit(instance->cv, std::move(lock)); |
| 37 | }) | 37 | }).detach(); |
| 38 | .detach(); | ||
| 39 | } | 38 | } |
| 40 | 39 | ||
| 41 | } // namespace Common | 40 | } // namespace Common |
diff --git a/src/common/math_util.h b/src/common/math_util.h index 83ef0201f..abca3177c 100644 --- a/src/common/math_util.h +++ b/src/common/math_util.h | |||
| @@ -54,6 +54,6 @@ struct Rectangle { | |||
| 54 | }; | 54 | }; |
| 55 | 55 | ||
| 56 | template <typename T> | 56 | template <typename T> |
| 57 | Rectangle(T, T, T, T)->Rectangle<T>; | 57 | Rectangle(T, T, T, T) -> Rectangle<T>; |
| 58 | 58 | ||
| 59 | } // namespace Common | 59 | } // namespace Common |
diff --git a/src/core/file_sys/registered_cache.h b/src/core/file_sys/registered_cache.h index ec1d54f27..5b414b0f0 100644 --- a/src/core/file_sys/registered_cache.h +++ b/src/core/file_sys/registered_cache.h | |||
| @@ -133,9 +133,9 @@ public: | |||
| 133 | // Parsing function defines the conversion from raw file to NCA. If there are other steps | 133 | // Parsing function defines the conversion from raw file to NCA. If there are other steps |
| 134 | // besides creating the NCA from the file (e.g. NAX0 on SD Card), that should go in a custom | 134 | // besides creating the NCA from the file (e.g. NAX0 on SD Card), that should go in a custom |
| 135 | // parsing function. | 135 | // parsing function. |
| 136 | explicit RegisteredCache(VirtualDir dir, | 136 | explicit RegisteredCache( |
| 137 | ContentProviderParsingFunction parsing_function = | 137 | VirtualDir dir, ContentProviderParsingFunction parsing_function = |
| 138 | [](const VirtualFile& file, const NcaID& id) { return file; }); | 138 | [](const VirtualFile& file, const NcaID& id) { return file; }); |
| 139 | ~RegisteredCache() override; | 139 | ~RegisteredCache() override; |
| 140 | 140 | ||
| 141 | void Refresh() override; | 141 | void Refresh() override; |
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index 9277b5d08..81f85643b 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp | |||
| @@ -293,13 +293,15 @@ std::vector<u8> HLERequestContext::ReadBuffer(std::size_t buffer_index) const { | |||
| 293 | BufferDescriptorA()[buffer_index].Size()}; | 293 | BufferDescriptorA()[buffer_index].Size()}; |
| 294 | 294 | ||
| 295 | if (is_buffer_a) { | 295 | if (is_buffer_a) { |
| 296 | ASSERT_OR_EXECUTE_MSG(BufferDescriptorA().size() > buffer_index, { return buffer; }, | 296 | ASSERT_OR_EXECUTE_MSG( |
| 297 | "BufferDescriptorA invalid buffer_index {}", buffer_index); | 297 | BufferDescriptorA().size() > buffer_index, { return buffer; }, |
| 298 | "BufferDescriptorA invalid buffer_index {}", buffer_index); | ||
| 298 | buffer.resize(BufferDescriptorA()[buffer_index].Size()); | 299 | buffer.resize(BufferDescriptorA()[buffer_index].Size()); |
| 299 | memory.ReadBlock(BufferDescriptorA()[buffer_index].Address(), buffer.data(), buffer.size()); | 300 | memory.ReadBlock(BufferDescriptorA()[buffer_index].Address(), buffer.data(), buffer.size()); |
| 300 | } else { | 301 | } else { |
| 301 | ASSERT_OR_EXECUTE_MSG(BufferDescriptorX().size() > buffer_index, { return buffer; }, | 302 | ASSERT_OR_EXECUTE_MSG( |
| 302 | "BufferDescriptorX invalid buffer_index {}", buffer_index); | 303 | BufferDescriptorX().size() > buffer_index, { return buffer; }, |
| 304 | "BufferDescriptorX invalid buffer_index {}", buffer_index); | ||
| 303 | buffer.resize(BufferDescriptorX()[buffer_index].Size()); | 305 | buffer.resize(BufferDescriptorX()[buffer_index].Size()); |
| 304 | memory.ReadBlock(BufferDescriptorX()[buffer_index].Address(), buffer.data(), buffer.size()); | 306 | memory.ReadBlock(BufferDescriptorX()[buffer_index].Address(), buffer.data(), buffer.size()); |
| 305 | } | 307 | } |
| @@ -324,16 +326,16 @@ std::size_t HLERequestContext::WriteBuffer(const void* buffer, std::size_t size, | |||
| 324 | } | 326 | } |
| 325 | 327 | ||
| 326 | if (is_buffer_b) { | 328 | if (is_buffer_b) { |
| 327 | ASSERT_OR_EXECUTE_MSG(BufferDescriptorB().size() > buffer_index && | 329 | ASSERT_OR_EXECUTE_MSG( |
| 328 | BufferDescriptorB()[buffer_index].Size() >= size, | 330 | BufferDescriptorB().size() > buffer_index && |
| 329 | { return 0; }, "BufferDescriptorB is invalid, index={}, size={}", | 331 | BufferDescriptorB()[buffer_index].Size() >= size, |
| 330 | buffer_index, size); | 332 | { return 0; }, "BufferDescriptorB is invalid, index={}, size={}", buffer_index, size); |
| 331 | memory.WriteBlock(BufferDescriptorB()[buffer_index].Address(), buffer, size); | 333 | memory.WriteBlock(BufferDescriptorB()[buffer_index].Address(), buffer, size); |
| 332 | } else { | 334 | } else { |
| 333 | ASSERT_OR_EXECUTE_MSG(BufferDescriptorC().size() > buffer_index && | 335 | ASSERT_OR_EXECUTE_MSG( |
| 334 | BufferDescriptorC()[buffer_index].Size() >= size, | 336 | BufferDescriptorC().size() > buffer_index && |
| 335 | { return 0; }, "BufferDescriptorC is invalid, index={}, size={}", | 337 | BufferDescriptorC()[buffer_index].Size() >= size, |
| 336 | buffer_index, size); | 338 | { return 0; }, "BufferDescriptorC is invalid, index={}, size={}", buffer_index, size); |
| 337 | memory.WriteBlock(BufferDescriptorC()[buffer_index].Address(), buffer, size); | 339 | memory.WriteBlock(BufferDescriptorC()[buffer_index].Address(), buffer, size); |
| 338 | } | 340 | } |
| 339 | 341 | ||
| @@ -344,12 +346,14 @@ std::size_t HLERequestContext::GetReadBufferSize(std::size_t buffer_index) const | |||
| 344 | const bool is_buffer_a{BufferDescriptorA().size() > buffer_index && | 346 | const bool is_buffer_a{BufferDescriptorA().size() > buffer_index && |
| 345 | BufferDescriptorA()[buffer_index].Size()}; | 347 | BufferDescriptorA()[buffer_index].Size()}; |
| 346 | if (is_buffer_a) { | 348 | if (is_buffer_a) { |
| 347 | ASSERT_OR_EXECUTE_MSG(BufferDescriptorA().size() > buffer_index, { return 0; }, | 349 | ASSERT_OR_EXECUTE_MSG( |
| 348 | "BufferDescriptorA invalid buffer_index {}", buffer_index); | 350 | BufferDescriptorA().size() > buffer_index, { return 0; }, |
| 351 | "BufferDescriptorA invalid buffer_index {}", buffer_index); | ||
| 349 | return BufferDescriptorA()[buffer_index].Size(); | 352 | return BufferDescriptorA()[buffer_index].Size(); |
| 350 | } else { | 353 | } else { |
| 351 | ASSERT_OR_EXECUTE_MSG(BufferDescriptorX().size() > buffer_index, { return 0; }, | 354 | ASSERT_OR_EXECUTE_MSG( |
| 352 | "BufferDescriptorX invalid buffer_index {}", buffer_index); | 355 | BufferDescriptorX().size() > buffer_index, { return 0; }, |
| 356 | "BufferDescriptorX invalid buffer_index {}", buffer_index); | ||
| 353 | return BufferDescriptorX()[buffer_index].Size(); | 357 | return BufferDescriptorX()[buffer_index].Size(); |
| 354 | } | 358 | } |
| 355 | } | 359 | } |
| @@ -358,12 +362,14 @@ std::size_t HLERequestContext::GetWriteBufferSize(std::size_t buffer_index) cons | |||
| 358 | const bool is_buffer_b{BufferDescriptorB().size() > buffer_index && | 362 | const bool is_buffer_b{BufferDescriptorB().size() > buffer_index && |
| 359 | BufferDescriptorB()[buffer_index].Size()}; | 363 | BufferDescriptorB()[buffer_index].Size()}; |
| 360 | if (is_buffer_b) { | 364 | if (is_buffer_b) { |
| 361 | ASSERT_OR_EXECUTE_MSG(BufferDescriptorB().size() > buffer_index, { return 0; }, | 365 | ASSERT_OR_EXECUTE_MSG( |
| 362 | "BufferDescriptorB invalid buffer_index {}", buffer_index); | 366 | BufferDescriptorB().size() > buffer_index, { return 0; }, |
| 367 | "BufferDescriptorB invalid buffer_index {}", buffer_index); | ||
| 363 | return BufferDescriptorB()[buffer_index].Size(); | 368 | return BufferDescriptorB()[buffer_index].Size(); |
| 364 | } else { | 369 | } else { |
| 365 | ASSERT_OR_EXECUTE_MSG(BufferDescriptorC().size() > buffer_index, { return 0; }, | 370 | ASSERT_OR_EXECUTE_MSG( |
| 366 | "BufferDescriptorC invalid buffer_index {}", buffer_index); | 371 | BufferDescriptorC().size() > buffer_index, { return 0; }, |
| 372 | "BufferDescriptorC invalid buffer_index {}", buffer_index); | ||
| 367 | return BufferDescriptorC()[buffer_index].Size(); | 373 | return BufferDescriptorC()[buffer_index].Size(); |
| 368 | } | 374 | } |
| 369 | return 0; | 375 | return 0; |
diff --git a/src/core/hle/kernel/memory/page_table.cpp b/src/core/hle/kernel/memory/page_table.cpp index e22e07206..a3fadb533 100644 --- a/src/core/hle/kernel/memory/page_table.cpp +++ b/src/core/hle/kernel/memory/page_table.cpp | |||
| @@ -851,11 +851,12 @@ ResultCode PageTable::LockForDeviceAddressSpace(VAddr addr, std::size_t size) { | |||
| 851 | return result; | 851 | return result; |
| 852 | } | 852 | } |
| 853 | 853 | ||
| 854 | block_manager->UpdateLock(addr, size / PageSize, | 854 | block_manager->UpdateLock( |
| 855 | [](MemoryBlockManager::iterator block, MemoryPermission perm) { | 855 | addr, size / PageSize, |
| 856 | block->ShareToDevice(perm); | 856 | [](MemoryBlockManager::iterator block, MemoryPermission perm) { |
| 857 | }, | 857 | block->ShareToDevice(perm); |
| 858 | perm); | 858 | }, |
| 859 | perm); | ||
| 859 | 860 | ||
| 860 | return RESULT_SUCCESS; | 861 | return RESULT_SUCCESS; |
| 861 | } | 862 | } |
| @@ -873,11 +874,12 @@ ResultCode PageTable::UnlockForDeviceAddressSpace(VAddr addr, std::size_t size) | |||
| 873 | return result; | 874 | return result; |
| 874 | } | 875 | } |
| 875 | 876 | ||
| 876 | block_manager->UpdateLock(addr, size / PageSize, | 877 | block_manager->UpdateLock( |
| 877 | [](MemoryBlockManager::iterator block, MemoryPermission perm) { | 878 | addr, size / PageSize, |
| 878 | block->UnshareToDevice(perm); | 879 | [](MemoryBlockManager::iterator block, MemoryPermission perm) { |
| 879 | }, | 880 | block->UnshareToDevice(perm); |
| 880 | perm); | 881 | }, |
| 882 | perm); | ||
| 881 | 883 | ||
| 882 | return RESULT_SUCCESS; | 884 | return RESULT_SUCCESS; |
| 883 | } | 885 | } |
diff --git a/src/core/hle/service/am/applets/web_browser.cpp b/src/core/hle/service/am/applets/web_browser.cpp index 9f30e167d..4157fbf39 100644 --- a/src/core/hle/service/am/applets/web_browser.cpp +++ b/src/core/hle/service/am/applets/web_browser.cpp | |||
| @@ -551,7 +551,8 @@ void WebBrowser::ExecuteShop() { | |||
| 551 | } | 551 | } |
| 552 | 552 | ||
| 553 | void WebBrowser::ExecuteOffline() { | 553 | void WebBrowser::ExecuteOffline() { |
| 554 | frontend.OpenPageLocal(filename, [this] { UnpackRomFS(); }, [this] { Finalize(); }); | 554 | frontend.OpenPageLocal( |
| 555 | filename, [this] { UnpackRomFS(); }, [this] { Finalize(); }); | ||
| 555 | } | 556 | } |
| 556 | 557 | ||
| 557 | } // namespace Service::AM::Applets | 558 | } // namespace Service::AM::Applets |
diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp index dd80dd1dc..9b4910e53 100644 --- a/src/core/hle/service/audio/audout_u.cpp +++ b/src/core/hle/service/audio/audout_u.cpp | |||
| @@ -206,7 +206,7 @@ private: | |||
| 206 | AudioCore::StreamPtr stream; | 206 | AudioCore::StreamPtr stream; |
| 207 | std::string device_name; | 207 | std::string device_name; |
| 208 | 208 | ||
| 209 | [[maybe_unused]] AudoutParams audio_params {}; | 209 | [[maybe_unused]] AudoutParams audio_params{}; |
| 210 | 210 | ||
| 211 | /// This is the event handle used to check if the audio buffer was released | 211 | /// This is the event handle used to check if the audio buffer was released |
| 212 | Kernel::EventPair buffer_event; | 212 | Kernel::EventPair buffer_event; |
diff --git a/src/core/hle/service/bcat/backend/boxcat.cpp b/src/core/hle/service/bcat/backend/boxcat.cpp index d29e78d7e..51c2ba964 100644 --- a/src/core/hle/service/bcat/backend/boxcat.cpp +++ b/src/core/hle/service/bcat/backend/boxcat.cpp | |||
| @@ -365,8 +365,7 @@ bool Boxcat::Synchronize(TitleIDVersion title, ProgressServiceBackend& progress) | |||
| 365 | 365 | ||
| 366 | std::thread([this, title, &progress] { | 366 | std::thread([this, title, &progress] { |
| 367 | SynchronizeInternal(applet_manager, dir_getter, title, progress); | 367 | SynchronizeInternal(applet_manager, dir_getter, title, progress); |
| 368 | }) | 368 | }).detach(); |
| 369 | .detach(); | ||
| 370 | 369 | ||
| 371 | return true; | 370 | return true; |
| 372 | } | 371 | } |
| @@ -377,8 +376,7 @@ bool Boxcat::SynchronizeDirectory(TitleIDVersion title, std::string name, | |||
| 377 | 376 | ||
| 378 | std::thread([this, title, name, &progress] { | 377 | std::thread([this, title, name, &progress] { |
| 379 | SynchronizeInternal(applet_manager, dir_getter, title, progress, name); | 378 | SynchronizeInternal(applet_manager, dir_getter, title, progress, name); |
| 380 | }) | 379 | }).detach(); |
| 381 | .detach(); | ||
| 382 | 380 | ||
| 383 | return true; | 381 | return true; |
| 384 | } | 382 | } |
diff --git a/src/core/hle/service/nvflinger/nvflinger.h b/src/core/hle/service/nvflinger/nvflinger.h index ff85cbba6..1ebe949c0 100644 --- a/src/core/hle/service/nvflinger/nvflinger.h +++ b/src/core/hle/service/nvflinger/nvflinger.h | |||
| @@ -86,11 +86,13 @@ public: | |||
| 86 | 86 | ||
| 87 | [[nodiscard]] s64 GetNextTicks() const; | 87 | [[nodiscard]] s64 GetNextTicks() const; |
| 88 | 88 | ||
| 89 | [[nodiscard]] std::unique_lock<std::mutex> Lock() const { return std::unique_lock{*guard}; } | 89 | [[nodiscard]] std::unique_lock<std::mutex> Lock() const { |
| 90 | return std::unique_lock{*guard}; | ||
| 91 | } | ||
| 90 | 92 | ||
| 91 | private : | 93 | private: |
| 92 | /// Finds the display identified by the specified ID. | 94 | /// Finds the display identified by the specified ID. |
| 93 | [[nodiscard]] VI::Display* FindDisplay(u64 display_id); | 95 | [[nodiscard]] VI::Display* FindDisplay(u64 display_id); |
| 94 | 96 | ||
| 95 | /// Finds the display identified by the specified ID. | 97 | /// Finds the display identified by the specified ID. |
| 96 | [[nodiscard]] const VI::Display* FindDisplay(u64 display_id) const; | 98 | [[nodiscard]] const VI::Display* FindDisplay(u64 display_id) const; |
diff --git a/src/input_common/udp/client.cpp b/src/input_common/udp/client.cpp index 6c95a8b42..3f4eaf448 100644 --- a/src/input_common/udp/client.cpp +++ b/src/input_common/udp/client.cpp | |||
| @@ -224,8 +224,7 @@ void TestCommunication(const std::string& host, u16 port, u8 pad_index, u32 clie | |||
| 224 | } else { | 224 | } else { |
| 225 | failure_callback(); | 225 | failure_callback(); |
| 226 | } | 226 | } |
| 227 | }) | 227 | }).detach(); |
| 228 | .detach(); | ||
| 229 | } | 228 | } |
| 230 | 229 | ||
| 231 | CalibrationConfigurationJob::CalibrationConfigurationJob( | 230 | CalibrationConfigurationJob::CalibrationConfigurationJob( |
| @@ -279,8 +278,7 @@ CalibrationConfigurationJob::CalibrationConfigurationJob( | |||
| 279 | complete_event.Wait(); | 278 | complete_event.Wait(); |
| 280 | socket.Stop(); | 279 | socket.Stop(); |
| 281 | worker_thread.join(); | 280 | worker_thread.join(); |
| 282 | }) | 281 | }).detach(); |
| 283 | .detach(); | ||
| 284 | } | 282 | } |
| 285 | 283 | ||
| 286 | CalibrationConfigurationJob::~CalibrationConfigurationJob() { | 284 | CalibrationConfigurationJob::~CalibrationConfigurationJob() { |
diff --git a/src/video_core/renderer_vulkan/wrapper.h b/src/video_core/renderer_vulkan/wrapper.h index 71daac9d7..31885ef42 100644 --- a/src/video_core/renderer_vulkan/wrapper.h +++ b/src/video_core/renderer_vulkan/wrapper.h | |||
| @@ -756,8 +756,8 @@ public: | |||
| 756 | } | 756 | } |
| 757 | 757 | ||
| 758 | VkResult GetQueryResults(VkQueryPool query_pool, u32 first, u32 count, std::size_t data_size, | 758 | VkResult GetQueryResults(VkQueryPool query_pool, u32 first, u32 count, std::size_t data_size, |
| 759 | void* data, VkDeviceSize stride, VkQueryResultFlags flags) const | 759 | void* data, VkDeviceSize stride, |
| 760 | noexcept { | 760 | VkQueryResultFlags flags) const noexcept { |
| 761 | return dld->vkGetQueryPoolResults(handle, query_pool, first, count, data_size, data, stride, | 761 | return dld->vkGetQueryPoolResults(handle, query_pool, first, count, data_size, data, stride, |
| 762 | flags); | 762 | flags); |
| 763 | } | 763 | } |
| @@ -849,8 +849,8 @@ public: | |||
| 849 | dld->vkCmdBindPipeline(handle, bind_point, pipeline); | 849 | dld->vkCmdBindPipeline(handle, bind_point, pipeline); |
| 850 | } | 850 | } |
| 851 | 851 | ||
| 852 | void BindIndexBuffer(VkBuffer buffer, VkDeviceSize offset, VkIndexType index_type) const | 852 | void BindIndexBuffer(VkBuffer buffer, VkDeviceSize offset, |
| 853 | noexcept { | 853 | VkIndexType index_type) const noexcept { |
| 854 | dld->vkCmdBindIndexBuffer(handle, buffer, offset, index_type); | 854 | dld->vkCmdBindIndexBuffer(handle, buffer, offset, index_type); |
| 855 | } | 855 | } |
| 856 | 856 | ||
| @@ -863,8 +863,8 @@ public: | |||
| 863 | BindVertexBuffers(binding, 1, &buffer, &offset); | 863 | BindVertexBuffers(binding, 1, &buffer, &offset); |
| 864 | } | 864 | } |
| 865 | 865 | ||
| 866 | void Draw(u32 vertex_count, u32 instance_count, u32 first_vertex, u32 first_instance) const | 866 | void Draw(u32 vertex_count, u32 instance_count, u32 first_vertex, |
| 867 | noexcept { | 867 | u32 first_instance) const noexcept { |
| 868 | dld->vkCmdDraw(handle, vertex_count, instance_count, first_vertex, first_instance); | 868 | dld->vkCmdDraw(handle, vertex_count, instance_count, first_vertex, first_instance); |
| 869 | } | 869 | } |
| 870 | 870 | ||
| @@ -874,15 +874,15 @@ public: | |||
| 874 | first_instance); | 874 | first_instance); |
| 875 | } | 875 | } |
| 876 | 876 | ||
| 877 | void ClearAttachments(Span<VkClearAttachment> attachments, Span<VkClearRect> rects) const | 877 | void ClearAttachments(Span<VkClearAttachment> attachments, |
| 878 | noexcept { | 878 | Span<VkClearRect> rects) const noexcept { |
| 879 | dld->vkCmdClearAttachments(handle, attachments.size(), attachments.data(), rects.size(), | 879 | dld->vkCmdClearAttachments(handle, attachments.size(), attachments.data(), rects.size(), |
| 880 | rects.data()); | 880 | rects.data()); |
| 881 | } | 881 | } |
| 882 | 882 | ||
| 883 | void BlitImage(VkImage src_image, VkImageLayout src_layout, VkImage dst_image, | 883 | void BlitImage(VkImage src_image, VkImageLayout src_layout, VkImage dst_image, |
| 884 | VkImageLayout dst_layout, Span<VkImageBlit> regions, VkFilter filter) const | 884 | VkImageLayout dst_layout, Span<VkImageBlit> regions, |
| 885 | noexcept { | 885 | VkFilter filter) const noexcept { |
| 886 | dld->vkCmdBlitImage(handle, src_image, src_layout, dst_image, dst_layout, regions.size(), | 886 | dld->vkCmdBlitImage(handle, src_image, src_layout, dst_image, dst_layout, regions.size(), |
| 887 | regions.data(), filter); | 887 | regions.data(), filter); |
| 888 | } | 888 | } |
| @@ -907,8 +907,8 @@ public: | |||
| 907 | regions.data()); | 907 | regions.data()); |
| 908 | } | 908 | } |
| 909 | 909 | ||
| 910 | void CopyBuffer(VkBuffer src_buffer, VkBuffer dst_buffer, Span<VkBufferCopy> regions) const | 910 | void CopyBuffer(VkBuffer src_buffer, VkBuffer dst_buffer, |
| 911 | noexcept { | 911 | Span<VkBufferCopy> regions) const noexcept { |
| 912 | dld->vkCmdCopyBuffer(handle, src_buffer, dst_buffer, regions.size(), regions.data()); | 912 | dld->vkCmdCopyBuffer(handle, src_buffer, dst_buffer, regions.size(), regions.data()); |
| 913 | } | 913 | } |
| 914 | 914 | ||
| @@ -924,8 +924,8 @@ public: | |||
| 924 | regions.data()); | 924 | regions.data()); |
| 925 | } | 925 | } |
| 926 | 926 | ||
| 927 | void FillBuffer(VkBuffer dst_buffer, VkDeviceSize dst_offset, VkDeviceSize size, u32 data) const | 927 | void FillBuffer(VkBuffer dst_buffer, VkDeviceSize dst_offset, VkDeviceSize size, |
| 928 | noexcept { | 928 | u32 data) const noexcept { |
| 929 | dld->vkCmdFillBuffer(handle, dst_buffer, dst_offset, size, data); | 929 | dld->vkCmdFillBuffer(handle, dst_buffer, dst_offset, size, data); |
| 930 | } | 930 | } |
| 931 | 931 | ||
diff --git a/src/video_core/shader/control_flow.cpp b/src/video_core/shader/control_flow.cpp index 8d86020f6..336397cdb 100644 --- a/src/video_core/shader/control_flow.cpp +++ b/src/video_core/shader/control_flow.cpp | |||
| @@ -187,24 +187,26 @@ std::optional<std::pair<BufferInfo, u64>> TrackLDC(const CFGRebuildState& state, | |||
| 187 | 187 | ||
| 188 | std::optional<u64> TrackSHLRegister(const CFGRebuildState& state, u32& pos, | 188 | std::optional<u64> TrackSHLRegister(const CFGRebuildState& state, u32& pos, |
| 189 | u64 ldc_tracked_register) { | 189 | u64 ldc_tracked_register) { |
| 190 | return TrackInstruction<u64>(state, pos, | 190 | return TrackInstruction<u64>( |
| 191 | [ldc_tracked_register](auto instr, const auto& opcode) { | 191 | state, pos, |
| 192 | return opcode.GetId() == OpCode::Id::SHL_IMM && | 192 | [ldc_tracked_register](auto instr, const auto& opcode) { |
| 193 | instr.gpr0.Value() == ldc_tracked_register; | 193 | return opcode.GetId() == OpCode::Id::SHL_IMM && |
| 194 | }, | 194 | instr.gpr0.Value() == ldc_tracked_register; |
| 195 | [](auto instr, const auto&) { return instr.gpr8.Value(); }); | 195 | }, |
| 196 | [](auto instr, const auto&) { return instr.gpr8.Value(); }); | ||
| 196 | } | 197 | } |
| 197 | 198 | ||
| 198 | std::optional<u32> TrackIMNMXValue(const CFGRebuildState& state, u32& pos, | 199 | std::optional<u32> TrackIMNMXValue(const CFGRebuildState& state, u32& pos, |
| 199 | u64 shl_tracked_register) { | 200 | u64 shl_tracked_register) { |
| 200 | return TrackInstruction<u32>(state, pos, | 201 | return TrackInstruction<u32>( |
| 201 | [shl_tracked_register](auto instr, const auto& opcode) { | 202 | state, pos, |
| 202 | return opcode.GetId() == OpCode::Id::IMNMX_IMM && | 203 | [shl_tracked_register](auto instr, const auto& opcode) { |
| 203 | instr.gpr0.Value() == shl_tracked_register; | 204 | return opcode.GetId() == OpCode::Id::IMNMX_IMM && |
| 204 | }, | 205 | instr.gpr0.Value() == shl_tracked_register; |
| 205 | [](auto instr, const auto&) { | 206 | }, |
| 206 | return static_cast<u32>(instr.alu.GetSignedImm20_20() + 1); | 207 | [](auto instr, const auto&) { |
| 207 | }); | 208 | return static_cast<u32>(instr.alu.GetSignedImm20_20() + 1); |
| 209 | }); | ||
| 208 | } | 210 | } |
| 209 | 211 | ||
| 210 | std::optional<BranchIndirectInfo> TrackBranchIndirectInfo(const CFGRebuildState& state, u32 pos) { | 212 | std::optional<BranchIndirectInfo> TrackBranchIndirectInfo(const CFGRebuildState& state, u32 pos) { |
diff --git a/src/video_core/shader/decode/memory.cpp b/src/video_core/shader/decode/memory.cpp index 63adbc4a3..e4739394d 100644 --- a/src/video_core/shader/decode/memory.cpp +++ b/src/video_core/shader/decode/memory.cpp | |||
| @@ -471,9 +471,9 @@ std::tuple<Node, Node, GlobalMemoryBase> ShaderIR::TrackGlobalMemory(NodeBlock& | |||
| 471 | 471 | ||
| 472 | const auto [base_address, index, offset] = | 472 | const auto [base_address, index, offset] = |
| 473 | TrackCbuf(addr_register, global_code, static_cast<s64>(global_code.size())); | 473 | TrackCbuf(addr_register, global_code, static_cast<s64>(global_code.size())); |
| 474 | ASSERT_OR_EXECUTE_MSG(base_address != nullptr, | 474 | ASSERT_OR_EXECUTE_MSG( |
| 475 | { return std::make_tuple(nullptr, nullptr, GlobalMemoryBase{}); }, | 475 | base_address != nullptr, { return std::make_tuple(nullptr, nullptr, GlobalMemoryBase{}); }, |
| 476 | "Global memory tracking failed"); | 476 | "Global memory tracking failed"); |
| 477 | 477 | ||
| 478 | bb.push_back(Comment(fmt::format("Base address is c[0x{:x}][0x{:x}]", index, offset))); | 478 | bb.push_back(Comment(fmt::format("Base address is c[0x{:x}][0x{:x}]", index, offset))); |
| 479 | 479 | ||
diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp index b1850bc95..597defe8c 100644 --- a/src/yuzu/configuration/configure_input_player.cpp +++ b/src/yuzu/configuration/configure_input_player.cpp | |||
| @@ -281,24 +281,25 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i | |||
| 281 | 281 | ||
| 282 | button->setContextMenuPolicy(Qt::CustomContextMenu); | 282 | button->setContextMenuPolicy(Qt::CustomContextMenu); |
| 283 | connect(button, &QPushButton::clicked, [=, this] { | 283 | connect(button, &QPushButton::clicked, [=, this] { |
| 284 | HandleClick(button_map[button_id], | 284 | HandleClick( |
| 285 | [=, this](Common::ParamPackage params) { | 285 | button_map[button_id], |
| 286 | // Workaround for ZL & ZR for analog triggers like on XBOX controllors. | 286 | [=, this](Common::ParamPackage params) { |
| 287 | // Analog triggers (from controllers like the XBOX controller) would not | 287 | // Workaround for ZL & ZR for analog triggers like on XBOX controllors. |
| 288 | // work due to a different range of their signals (from 0 to 255 on | 288 | // Analog triggers (from controllers like the XBOX controller) would not |
| 289 | // analog triggers instead of -32768 to 32768 on analog joysticks). The | 289 | // work due to a different range of their signals (from 0 to 255 on |
| 290 | // SDL driver misinterprets analog triggers as analog joysticks. | 290 | // analog triggers instead of -32768 to 32768 on analog joysticks). The |
| 291 | // TODO: reinterpret the signal range for analog triggers to map the | 291 | // SDL driver misinterprets analog triggers as analog joysticks. |
| 292 | // values correctly. This is required for the correct emulation of the | 292 | // TODO: reinterpret the signal range for analog triggers to map the |
| 293 | // analog triggers of the GameCube controller. | 293 | // values correctly. This is required for the correct emulation of the |
| 294 | if (button_id == Settings::NativeButton::ZL || | 294 | // analog triggers of the GameCube controller. |
| 295 | button_id == Settings::NativeButton::ZR) { | 295 | if (button_id == Settings::NativeButton::ZL || |
| 296 | params.Set("direction", "+"); | 296 | button_id == Settings::NativeButton::ZR) { |
| 297 | params.Set("threshold", "0.5"); | 297 | params.Set("direction", "+"); |
| 298 | } | 298 | params.Set("threshold", "0.5"); |
| 299 | buttons_param[button_id] = std::move(params); | 299 | } |
| 300 | }, | 300 | buttons_param[button_id] = std::move(params); |
| 301 | InputCommon::Polling::DeviceType::Button); | 301 | }, |
| 302 | InputCommon::Polling::DeviceType::Button); | ||
| 302 | }); | 303 | }); |
| 303 | connect(button, &QPushButton::customContextMenuRequested, | 304 | connect(button, &QPushButton::customContextMenuRequested, |
| 304 | [=, this](const QPoint& menu_location) { | 305 | [=, this](const QPoint& menu_location) { |
| @@ -325,12 +326,13 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i | |||
| 325 | 326 | ||
| 326 | analog_button->setContextMenuPolicy(Qt::CustomContextMenu); | 327 | analog_button->setContextMenuPolicy(Qt::CustomContextMenu); |
| 327 | connect(analog_button, &QPushButton::clicked, [=, this] { | 328 | connect(analog_button, &QPushButton::clicked, [=, this] { |
| 328 | HandleClick(analog_map_buttons[analog_id][sub_button_id], | 329 | HandleClick( |
| 329 | [=, this](const Common::ParamPackage& params) { | 330 | analog_map_buttons[analog_id][sub_button_id], |
| 330 | SetAnalogButton(params, analogs_param[analog_id], | 331 | [=, this](const Common::ParamPackage& params) { |
| 331 | analog_sub_buttons[sub_button_id]); | 332 | SetAnalogButton(params, analogs_param[analog_id], |
| 332 | }, | 333 | analog_sub_buttons[sub_button_id]); |
| 333 | InputCommon::Polling::DeviceType::Button); | 334 | }, |
| 335 | InputCommon::Polling::DeviceType::Button); | ||
| 334 | }); | 336 | }); |
| 335 | connect(analog_button, &QPushButton::customContextMenuRequested, | 337 | connect(analog_button, &QPushButton::customContextMenuRequested, |
| 336 | [=, this](const QPoint& menu_location) { | 338 | [=, this](const QPoint& menu_location) { |
| @@ -357,11 +359,12 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i | |||
| 357 | tr("After pressing OK, first move your joystick horizontally, " | 359 | tr("After pressing OK, first move your joystick horizontally, " |
| 358 | "and then vertically."), | 360 | "and then vertically."), |
| 359 | QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok) { | 361 | QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok) { |
| 360 | HandleClick(analog_map_stick[analog_id], | 362 | HandleClick( |
| 361 | [=, this](const Common::ParamPackage& params) { | 363 | analog_map_stick[analog_id], |
| 362 | analogs_param[analog_id] = params; | 364 | [=, this](const Common::ParamPackage& params) { |
| 363 | }, | 365 | analogs_param[analog_id] = params; |
| 364 | InputCommon::Polling::DeviceType::Analog); | 366 | }, |
| 367 | InputCommon::Polling::DeviceType::Analog); | ||
| 365 | } | 368 | } |
| 366 | }); | 369 | }); |
| 367 | 370 | ||
diff --git a/src/yuzu/configuration/configure_mouse_advanced.cpp b/src/yuzu/configuration/configure_mouse_advanced.cpp index ea2549363..5bcf5ffa8 100644 --- a/src/yuzu/configuration/configure_mouse_advanced.cpp +++ b/src/yuzu/configuration/configure_mouse_advanced.cpp | |||
| @@ -84,11 +84,12 @@ ConfigureMouseAdvanced::ConfigureMouseAdvanced(QWidget* parent) | |||
| 84 | 84 | ||
| 85 | button->setContextMenuPolicy(Qt::CustomContextMenu); | 85 | button->setContextMenuPolicy(Qt::CustomContextMenu); |
| 86 | connect(button, &QPushButton::clicked, [=, this] { | 86 | connect(button, &QPushButton::clicked, [=, this] { |
| 87 | HandleClick(button_map[button_id], | 87 | HandleClick( |
| 88 | [=, this](const Common::ParamPackage& params) { | 88 | button_map[button_id], |
| 89 | buttons_param[button_id] = params; | 89 | [=, this](const Common::ParamPackage& params) { |
| 90 | }, | 90 | buttons_param[button_id] = params; |
| 91 | InputCommon::Polling::DeviceType::Button); | 91 | }, |
| 92 | InputCommon::Polling::DeviceType::Button); | ||
| 92 | }); | 93 | }); |
| 93 | connect(button, &QPushButton::customContextMenuRequested, | 94 | connect(button, &QPushButton::customContextMenuRequested, |
| 94 | [=, this](const QPoint& menu_location) { | 95 | [=, this](const QPoint& menu_location) { |