diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/k_affinity_mask.h | 2 | ||||
| -rw-r--r-- | src/core/hle/kernel/k_process.cpp | 26 | ||||
| -rw-r--r-- | src/core/hle/kernel/k_process.h | 8 | ||||
| -rw-r--r-- | src/core/hle/kernel/k_thread.cpp | 11 | ||||
| -rw-r--r-- | src/input_common/drivers/udp_client.cpp | 8 | ||||
| -rw-r--r-- | src/input_common/drivers/udp_client.h | 4 | ||||
| -rw-r--r-- | src/input_common/input_engine.h | 4 | ||||
| -rw-r--r-- | src/input_common/input_mapping.cpp | 11 | ||||
| -rw-r--r-- | src/input_common/input_mapping.h | 8 | ||||
| -rw-r--r-- | src/input_common/main.cpp | 6 | ||||
| -rw-r--r-- | src/input_common/main.h | 2 | ||||
| -rw-r--r-- | src/video_core/gpu.h | 16 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_fsr.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_input_player.cpp | 59 |
14 files changed, 80 insertions, 87 deletions
diff --git a/src/core/hle/kernel/k_affinity_mask.h b/src/core/hle/kernel/k_affinity_mask.h index b906895fc..cf704ce87 100644 --- a/src/core/hle/kernel/k_affinity_mask.h +++ b/src/core/hle/kernel/k_affinity_mask.h | |||
| @@ -31,8 +31,6 @@ public: | |||
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | constexpr void SetAffinity(s32 core, bool set) { | 33 | constexpr void SetAffinity(s32 core, bool set) { |
| 34 | ASSERT(0 <= core && core < static_cast<s32>(Core::Hardware::NUM_CPU_CORES)); | ||
| 35 | |||
| 36 | if (set) { | 34 | if (set) { |
| 37 | this->mask |= GetCoreBit(core); | 35 | this->mask |= GetCoreBit(core); |
| 38 | } else { | 36 | } else { |
diff --git a/src/core/hle/kernel/k_process.cpp b/src/core/hle/kernel/k_process.cpp index 265ac6fa1..85c506979 100644 --- a/src/core/hle/kernel/k_process.cpp +++ b/src/core/hle/kernel/k_process.cpp | |||
| @@ -146,6 +146,13 @@ ResultCode KProcess::Initialize(KProcess* process, Core::System& system, std::st | |||
| 146 | // Open a reference to the resource limit. | 146 | // Open a reference to the resource limit. |
| 147 | process->resource_limit->Open(); | 147 | process->resource_limit->Open(); |
| 148 | 148 | ||
| 149 | // Clear remaining fields. | ||
| 150 | process->num_running_threads = 0; | ||
| 151 | process->is_signaled = false; | ||
| 152 | process->exception_thread = nullptr; | ||
| 153 | process->is_suspended = false; | ||
| 154 | process->schedule_count = 0; | ||
| 155 | |||
| 149 | return ResultSuccess; | 156 | return ResultSuccess; |
| 150 | } | 157 | } |
| 151 | 158 | ||
| @@ -157,20 +164,17 @@ KResourceLimit* KProcess::GetResourceLimit() const { | |||
| 157 | return resource_limit; | 164 | return resource_limit; |
| 158 | } | 165 | } |
| 159 | 166 | ||
| 160 | void KProcess::IncrementThreadCount() { | 167 | void KProcess::IncrementRunningThreadCount() { |
| 161 | ASSERT(num_threads >= 0); | 168 | ASSERT(num_running_threads.load() >= 0); |
| 162 | num_created_threads++; | 169 | ++num_running_threads; |
| 163 | |||
| 164 | if (const auto count = ++num_threads; count > peak_num_threads) { | ||
| 165 | peak_num_threads = count; | ||
| 166 | } | ||
| 167 | } | 170 | } |
| 168 | 171 | ||
| 169 | void KProcess::DecrementThreadCount() { | 172 | void KProcess::DecrementRunningThreadCount() { |
| 170 | ASSERT(num_threads > 0); | 173 | ASSERT(num_running_threads.load() > 0); |
| 171 | 174 | ||
| 172 | if (const auto count = --num_threads; count == 0) { | 175 | if (const auto prev = num_running_threads--; prev == 1) { |
| 173 | LOG_WARNING(Kernel, "Process termination is not fully implemented."); | 176 | // TODO(bunnei): Process termination to be implemented when multiprocess is supported. |
| 177 | UNIMPLEMENTED_MSG("KProcess termination is not implemennted!"); | ||
| 174 | } | 178 | } |
| 175 | } | 179 | } |
| 176 | 180 | ||
diff --git a/src/core/hle/kernel/k_process.h b/src/core/hle/kernel/k_process.h index c2a672021..38b446350 100644 --- a/src/core/hle/kernel/k_process.h +++ b/src/core/hle/kernel/k_process.h | |||
| @@ -235,8 +235,8 @@ public: | |||
| 235 | ++schedule_count; | 235 | ++schedule_count; |
| 236 | } | 236 | } |
| 237 | 237 | ||
| 238 | void IncrementThreadCount(); | 238 | void IncrementRunningThreadCount(); |
| 239 | void DecrementThreadCount(); | 239 | void DecrementRunningThreadCount(); |
| 240 | 240 | ||
| 241 | void SetRunningThread(s32 core, KThread* thread, u64 idle_count) { | 241 | void SetRunningThread(s32 core, KThread* thread, u64 idle_count) { |
| 242 | running_threads[core] = thread; | 242 | running_threads[core] = thread; |
| @@ -473,9 +473,7 @@ private: | |||
| 473 | bool is_suspended{}; | 473 | bool is_suspended{}; |
| 474 | bool is_initialized{}; | 474 | bool is_initialized{}; |
| 475 | 475 | ||
| 476 | std::atomic<s32> num_created_threads{}; | 476 | std::atomic<u16> num_running_threads{}; |
| 477 | std::atomic<u16> num_threads{}; | ||
| 478 | u16 peak_num_threads{}; | ||
| 479 | 477 | ||
| 480 | std::array<KThread*, Core::Hardware::NUM_CPU_CORES> running_threads{}; | 478 | std::array<KThread*, Core::Hardware::NUM_CPU_CORES> running_threads{}; |
| 481 | std::array<u64, Core::Hardware::NUM_CPU_CORES> running_thread_idle_counts{}; | 479 | std::array<u64, Core::Hardware::NUM_CPU_CORES> running_thread_idle_counts{}; |
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp index f42abb8a1..de3ffe0c7 100644 --- a/src/core/hle/kernel/k_thread.cpp +++ b/src/core/hle/kernel/k_thread.cpp | |||
| @@ -215,7 +215,6 @@ ResultCode KThread::Initialize(KThreadFunction func, uintptr_t arg, VAddr user_s | |||
| 215 | 215 | ||
| 216 | parent = owner; | 216 | parent = owner; |
| 217 | parent->Open(); | 217 | parent->Open(); |
| 218 | parent->IncrementThreadCount(); | ||
| 219 | } | 218 | } |
| 220 | 219 | ||
| 221 | // Initialize thread context. | 220 | // Initialize thread context. |
| @@ -327,11 +326,6 @@ void KThread::Finalize() { | |||
| 327 | } | 326 | } |
| 328 | } | 327 | } |
| 329 | 328 | ||
| 330 | // Decrement the parent process's thread count. | ||
| 331 | if (parent != nullptr) { | ||
| 332 | parent->DecrementThreadCount(); | ||
| 333 | } | ||
| 334 | |||
| 335 | // Perform inherited finalization. | 329 | // Perform inherited finalization. |
| 336 | KSynchronizationObject::Finalize(); | 330 | KSynchronizationObject::Finalize(); |
| 337 | } | 331 | } |
| @@ -1011,7 +1005,7 @@ ResultCode KThread::Run() { | |||
| 1011 | if (IsUserThread() && IsSuspended()) { | 1005 | if (IsUserThread() && IsSuspended()) { |
| 1012 | this->UpdateState(); | 1006 | this->UpdateState(); |
| 1013 | } | 1007 | } |
| 1014 | owner->IncrementThreadCount(); | 1008 | owner->IncrementRunningThreadCount(); |
| 1015 | } | 1009 | } |
| 1016 | 1010 | ||
| 1017 | // Set our state and finish. | 1011 | // Set our state and finish. |
| @@ -1026,10 +1020,11 @@ ResultCode KThread::Run() { | |||
| 1026 | void KThread::Exit() { | 1020 | void KThread::Exit() { |
| 1027 | ASSERT(this == GetCurrentThreadPointer(kernel)); | 1021 | ASSERT(this == GetCurrentThreadPointer(kernel)); |
| 1028 | 1022 | ||
| 1029 | // Release the thread resource hint from parent. | 1023 | // Release the thread resource hint, running thread count from parent. |
| 1030 | if (parent != nullptr) { | 1024 | if (parent != nullptr) { |
| 1031 | parent->GetResourceLimit()->Release(Kernel::LimitableResource::Threads, 0, 1); | 1025 | parent->GetResourceLimit()->Release(Kernel::LimitableResource::Threads, 0, 1); |
| 1032 | resource_limit_release_hint = true; | 1026 | resource_limit_release_hint = true; |
| 1027 | parent->DecrementRunningThreadCount(); | ||
| 1033 | } | 1028 | } |
| 1034 | 1029 | ||
| 1035 | // Perform termination. | 1030 | // Perform termination. |
diff --git a/src/input_common/drivers/udp_client.cpp b/src/input_common/drivers/udp_client.cpp index 9aaeb91be..d1cdb1ab2 100644 --- a/src/input_common/drivers/udp_client.cpp +++ b/src/input_common/drivers/udp_client.cpp | |||
| @@ -339,7 +339,7 @@ void UDPClient::StartCommunication(std::size_t client, const std::string& host, | |||
| 339 | } | 339 | } |
| 340 | } | 340 | } |
| 341 | 341 | ||
| 342 | const PadIdentifier UDPClient::GetPadIdentifier(std::size_t pad_index) const { | 342 | PadIdentifier UDPClient::GetPadIdentifier(std::size_t pad_index) const { |
| 343 | const std::size_t client = pad_index / PADS_PER_CLIENT; | 343 | const std::size_t client = pad_index / PADS_PER_CLIENT; |
| 344 | return { | 344 | return { |
| 345 | .guid = clients[client].uuid, | 345 | .guid = clients[client].uuid, |
| @@ -348,9 +348,9 @@ const PadIdentifier UDPClient::GetPadIdentifier(std::size_t pad_index) const { | |||
| 348 | }; | 348 | }; |
| 349 | } | 349 | } |
| 350 | 350 | ||
| 351 | const Common::UUID UDPClient::GetHostUUID(const std::string host) const { | 351 | Common::UUID UDPClient::GetHostUUID(const std::string& host) const { |
| 352 | const auto ip = boost::asio::ip::address_v4::from_string(host); | 352 | const auto ip = boost::asio::ip::make_address_v4(host); |
| 353 | const auto hex_host = fmt::format("{:06x}", ip.to_ulong()); | 353 | const auto hex_host = fmt::format("{:06x}", ip.to_uint()); |
| 354 | return Common::UUID{hex_host}; | 354 | return Common::UUID{hex_host}; |
| 355 | } | 355 | } |
| 356 | 356 | ||
diff --git a/src/input_common/drivers/udp_client.h b/src/input_common/drivers/udp_client.h index 61a1fff37..30d7c2682 100644 --- a/src/input_common/drivers/udp_client.h +++ b/src/input_common/drivers/udp_client.h | |||
| @@ -145,8 +145,8 @@ private: | |||
| 145 | void OnPortInfo(Response::PortInfo); | 145 | void OnPortInfo(Response::PortInfo); |
| 146 | void OnPadData(Response::PadData, std::size_t client); | 146 | void OnPadData(Response::PadData, std::size_t client); |
| 147 | void StartCommunication(std::size_t client, const std::string& host, u16 port); | 147 | void StartCommunication(std::size_t client, const std::string& host, u16 port); |
| 148 | const PadIdentifier GetPadIdentifier(std::size_t pad_index) const; | 148 | PadIdentifier GetPadIdentifier(std::size_t pad_index) const; |
| 149 | const Common::UUID GetHostUUID(const std::string host) const; | 149 | Common::UUID GetHostUUID(const std::string& host) const; |
| 150 | 150 | ||
| 151 | Common::Input::ButtonNames GetUIButtonName(const Common::ParamPackage& params) const; | 151 | Common::Input::ButtonNames GetUIButtonName(const Common::ParamPackage& params) const; |
| 152 | 152 | ||
diff --git a/src/input_common/input_engine.h b/src/input_common/input_engine.h index 390581c94..fe2faee5a 100644 --- a/src/input_common/input_engine.h +++ b/src/input_common/input_engine.h | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | 16 | ||
| 17 | // Pad Identifier of data source | 17 | // Pad Identifier of data source |
| 18 | struct PadIdentifier { | 18 | struct PadIdentifier { |
| 19 | Common::UUID guid{}; | 19 | Common::UUID guid{Common::INVALID_UUID}; |
| 20 | std::size_t port{}; | 20 | std::size_t port{}; |
| 21 | std::size_t pad{}; | 21 | std::size_t pad{}; |
| 22 | 22 | ||
| @@ -89,7 +89,7 @@ struct UpdateCallback { | |||
| 89 | 89 | ||
| 90 | // Triggered if data changed on the controller and the engine is on configuring mode | 90 | // Triggered if data changed on the controller and the engine is on configuring mode |
| 91 | struct MappingCallback { | 91 | struct MappingCallback { |
| 92 | std::function<void(MappingData)> on_data; | 92 | std::function<void(const MappingData&)> on_data; |
| 93 | }; | 93 | }; |
| 94 | 94 | ||
| 95 | // Input Identifier of data source | 95 | // Input Identifier of data source |
diff --git a/src/input_common/input_mapping.cpp b/src/input_common/input_mapping.cpp index 475257f42..a7a6ad8c2 100644 --- a/src/input_common/input_mapping.cpp +++ b/src/input_common/input_mapping.cpp | |||
| @@ -2,14 +2,13 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included | 3 | // Refer to the license.txt file included |
| 4 | 4 | ||
| 5 | #include "common/common_types.h" | ||
| 6 | #include "common/settings.h" | 5 | #include "common/settings.h" |
| 7 | #include "input_common/input_engine.h" | 6 | #include "input_common/input_engine.h" |
| 8 | #include "input_common/input_mapping.h" | 7 | #include "input_common/input_mapping.h" |
| 9 | 8 | ||
| 10 | namespace InputCommon { | 9 | namespace InputCommon { |
| 11 | 10 | ||
| 12 | MappingFactory::MappingFactory() {} | 11 | MappingFactory::MappingFactory() = default; |
| 13 | 12 | ||
| 14 | void MappingFactory::BeginMapping(Polling::InputType type) { | 13 | void MappingFactory::BeginMapping(Polling::InputType type) { |
| 15 | is_enabled = true; | 14 | is_enabled = true; |
| @@ -19,7 +18,7 @@ void MappingFactory::BeginMapping(Polling::InputType type) { | |||
| 19 | second_axis = -1; | 18 | second_axis = -1; |
| 20 | } | 19 | } |
| 21 | 20 | ||
| 22 | [[nodiscard]] const Common::ParamPackage MappingFactory::GetNextInput() { | 21 | Common::ParamPackage MappingFactory::GetNextInput() { |
| 23 | Common::ParamPackage input; | 22 | Common::ParamPackage input; |
| 24 | input_queue.Pop(input); | 23 | input_queue.Pop(input); |
| 25 | return input; | 24 | return input; |
| @@ -57,7 +56,7 @@ void MappingFactory::StopMapping() { | |||
| 57 | void MappingFactory::RegisterButton(const MappingData& data) { | 56 | void MappingFactory::RegisterButton(const MappingData& data) { |
| 58 | Common::ParamPackage new_input; | 57 | Common::ParamPackage new_input; |
| 59 | new_input.Set("engine", data.engine); | 58 | new_input.Set("engine", data.engine); |
| 60 | if (data.pad.guid != Common::UUID{}) { | 59 | if (data.pad.guid.IsValid()) { |
| 61 | new_input.Set("guid", data.pad.guid.Format()); | 60 | new_input.Set("guid", data.pad.guid.Format()); |
| 62 | } | 61 | } |
| 63 | new_input.Set("port", static_cast<int>(data.pad.port)); | 62 | new_input.Set("port", static_cast<int>(data.pad.port)); |
| @@ -93,7 +92,7 @@ void MappingFactory::RegisterButton(const MappingData& data) { | |||
| 93 | void MappingFactory::RegisterStick(const MappingData& data) { | 92 | void MappingFactory::RegisterStick(const MappingData& data) { |
| 94 | Common::ParamPackage new_input; | 93 | Common::ParamPackage new_input; |
| 95 | new_input.Set("engine", data.engine); | 94 | new_input.Set("engine", data.engine); |
| 96 | if (data.pad.guid != Common::UUID{}) { | 95 | if (data.pad.guid.IsValid()) { |
| 97 | new_input.Set("guid", data.pad.guid.Format()); | 96 | new_input.Set("guid", data.pad.guid.Format()); |
| 98 | } | 97 | } |
| 99 | new_input.Set("port", static_cast<int>(data.pad.port)); | 98 | new_input.Set("port", static_cast<int>(data.pad.port)); |
| @@ -138,7 +137,7 @@ void MappingFactory::RegisterStick(const MappingData& data) { | |||
| 138 | void MappingFactory::RegisterMotion(const MappingData& data) { | 137 | void MappingFactory::RegisterMotion(const MappingData& data) { |
| 139 | Common::ParamPackage new_input; | 138 | Common::ParamPackage new_input; |
| 140 | new_input.Set("engine", data.engine); | 139 | new_input.Set("engine", data.engine); |
| 141 | if (data.pad.guid != Common::UUID{}) { | 140 | if (data.pad.guid.IsValid()) { |
| 142 | new_input.Set("guid", data.pad.guid.Format()); | 141 | new_input.Set("guid", data.pad.guid.Format()); |
| 143 | } | 142 | } |
| 144 | new_input.Set("port", static_cast<int>(data.pad.port)); | 143 | new_input.Set("port", static_cast<int>(data.pad.port)); |
diff --git a/src/input_common/input_mapping.h b/src/input_common/input_mapping.h index 93564b5f8..e0dfbc7ad 100644 --- a/src/input_common/input_mapping.h +++ b/src/input_common/input_mapping.h | |||
| @@ -3,8 +3,14 @@ | |||
| 3 | // Refer to the license.txt file included | 3 | // Refer to the license.txt file included |
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | |||
| 7 | #include "common/param_package.h" | ||
| 6 | #include "common/threadsafe_queue.h" | 8 | #include "common/threadsafe_queue.h" |
| 7 | 9 | ||
| 10 | namespace InputCommon::Polling { | ||
| 11 | enum class InputType; | ||
| 12 | } | ||
| 13 | |||
| 8 | namespace InputCommon { | 14 | namespace InputCommon { |
| 9 | class InputEngine; | 15 | class InputEngine; |
| 10 | struct MappingData; | 16 | struct MappingData; |
| @@ -20,7 +26,7 @@ public: | |||
| 20 | void BeginMapping(Polling::InputType type); | 26 | void BeginMapping(Polling::InputType type); |
| 21 | 27 | ||
| 22 | /// Returns an input event with mapping information from the input_queue | 28 | /// Returns an input event with mapping information from the input_queue |
| 23 | [[nodiscard]] const Common::ParamPackage GetNextInput(); | 29 | [[nodiscard]] Common::ParamPackage GetNextInput(); |
| 24 | 30 | ||
| 25 | /** | 31 | /** |
| 26 | * Registers mapping input data from the driver | 32 | * Registers mapping input data from the driver |
diff --git a/src/input_common/main.cpp b/src/input_common/main.cpp index 940744c5f..a4d7ed645 100644 --- a/src/input_common/main.cpp +++ b/src/input_common/main.cpp | |||
| @@ -27,7 +27,7 @@ namespace InputCommon { | |||
| 27 | struct InputSubsystem::Impl { | 27 | struct InputSubsystem::Impl { |
| 28 | void Initialize() { | 28 | void Initialize() { |
| 29 | mapping_factory = std::make_shared<MappingFactory>(); | 29 | mapping_factory = std::make_shared<MappingFactory>(); |
| 30 | MappingCallback mapping_callback{[this](MappingData data) { RegisterInput(data); }}; | 30 | MappingCallback mapping_callback{[this](const MappingData& data) { RegisterInput(data); }}; |
| 31 | 31 | ||
| 32 | keyboard = std::make_shared<Keyboard>("keyboard"); | 32 | keyboard = std::make_shared<Keyboard>("keyboard"); |
| 33 | keyboard->SetMappingCallback(mapping_callback); | 33 | keyboard->SetMappingCallback(mapping_callback); |
| @@ -284,7 +284,7 @@ struct InputSubsystem::Impl { | |||
| 284 | #endif | 284 | #endif |
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | void RegisterInput(MappingData data) { | 287 | void RegisterInput(const MappingData& data) { |
| 288 | mapping_factory->RegisterInput(data); | 288 | mapping_factory->RegisterInput(data); |
| 289 | } | 289 | } |
| 290 | 290 | ||
| @@ -394,7 +394,7 @@ void InputSubsystem::BeginMapping(Polling::InputType type) { | |||
| 394 | impl->mapping_factory->BeginMapping(type); | 394 | impl->mapping_factory->BeginMapping(type); |
| 395 | } | 395 | } |
| 396 | 396 | ||
| 397 | const Common::ParamPackage InputSubsystem::GetNextInput() const { | 397 | Common::ParamPackage InputSubsystem::GetNextInput() const { |
| 398 | return impl->mapping_factory->GetNextInput(); | 398 | return impl->mapping_factory->GetNextInput(); |
| 399 | } | 399 | } |
| 400 | 400 | ||
diff --git a/src/input_common/main.h b/src/input_common/main.h index c6f97f691..baf107e0f 100644 --- a/src/input_common/main.h +++ b/src/input_common/main.h | |||
| @@ -126,7 +126,7 @@ public: | |||
| 126 | void BeginMapping(Polling::InputType type); | 126 | void BeginMapping(Polling::InputType type); |
| 127 | 127 | ||
| 128 | /// Returns an input event with mapping information. | 128 | /// Returns an input event with mapping information. |
| 129 | [[nodiscard]] const Common::ParamPackage GetNextInput() const; | 129 | [[nodiscard]] Common::ParamPackage GetNextInput() const; |
| 130 | 130 | ||
| 131 | /// Stop polling from all backends. | 131 | /// Stop polling from all backends. |
| 132 | void StopMapping() const; | 132 | void StopMapping() const; |
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index 3188b83ed..26b8ea233 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h | |||
| @@ -12,9 +12,6 @@ | |||
| 12 | #include "video_core/framebuffer_config.h" | 12 | #include "video_core/framebuffer_config.h" |
| 13 | 13 | ||
| 14 | namespace Core { | 14 | namespace Core { |
| 15 | namespace Frontend { | ||
| 16 | class EmuWindow; | ||
| 17 | } | ||
| 18 | class System; | 15 | class System; |
| 19 | } // namespace Core | 16 | } // namespace Core |
| 20 | 17 | ||
| @@ -25,7 +22,6 @@ class ShaderNotify; | |||
| 25 | 22 | ||
| 26 | namespace Tegra { | 23 | namespace Tegra { |
| 27 | class DmaPusher; | 24 | class DmaPusher; |
| 28 | class CDmaPusher; | ||
| 29 | struct CommandList; | 25 | struct CommandList; |
| 30 | 26 | ||
| 31 | enum class RenderTargetFormat : u32 { | 27 | enum class RenderTargetFormat : u32 { |
| @@ -88,15 +84,9 @@ enum class DepthFormat : u32 { | |||
| 88 | D32_FLOAT_S8X24_UINT = 0x19, | 84 | D32_FLOAT_S8X24_UINT = 0x19, |
| 89 | }; | 85 | }; |
| 90 | 86 | ||
| 91 | struct CommandListHeader; | ||
| 92 | class DebugContext; | ||
| 93 | |||
| 94 | namespace Engines { | 87 | namespace Engines { |
| 95 | class Fermi2D; | ||
| 96 | class Maxwell3D; | 88 | class Maxwell3D; |
| 97 | class MaxwellDMA; | ||
| 98 | class KeplerCompute; | 89 | class KeplerCompute; |
| 99 | class KeplerMemory; | ||
| 100 | } // namespace Engines | 90 | } // namespace Engines |
| 101 | 91 | ||
| 102 | enum class EngineID { | 92 | enum class EngineID { |
| @@ -190,12 +180,6 @@ public: | |||
| 190 | /// Returns a const reference to the GPU DMA pusher. | 180 | /// Returns a const reference to the GPU DMA pusher. |
| 191 | [[nodiscard]] const Tegra::DmaPusher& DmaPusher() const; | 181 | [[nodiscard]] const Tegra::DmaPusher& DmaPusher() const; |
| 192 | 182 | ||
| 193 | /// Returns a reference to the GPU CDMA pusher. | ||
| 194 | [[nodiscard]] Tegra::CDmaPusher& CDmaPusher(); | ||
| 195 | |||
| 196 | /// Returns a const reference to the GPU CDMA pusher. | ||
| 197 | [[nodiscard]] const Tegra::CDmaPusher& CDmaPusher() const; | ||
| 198 | |||
| 199 | /// Returns a reference to the underlying renderer. | 183 | /// Returns a reference to the underlying renderer. |
| 200 | [[nodiscard]] VideoCore::RendererBase& Renderer(); | 184 | [[nodiscard]] VideoCore::RendererBase& Renderer(); |
| 201 | 185 | ||
diff --git a/src/video_core/renderer_vulkan/vk_fsr.cpp b/src/video_core/renderer_vulkan/vk_fsr.cpp index 73629d229..b630090e8 100644 --- a/src/video_core/renderer_vulkan/vk_fsr.cpp +++ b/src/video_core/renderer_vulkan/vk_fsr.cpp | |||
| @@ -214,7 +214,7 @@ VkImageView FSR::Draw(VKScheduler& scheduler, size_t image_index, VkImageView im | |||
| 214 | 214 | ||
| 215 | { | 215 | { |
| 216 | VkImageMemoryBarrier fsr_write_barrier = base_barrier; | 216 | VkImageMemoryBarrier fsr_write_barrier = base_barrier; |
| 217 | fsr_write_barrier.image = *images[image_index], | 217 | fsr_write_barrier.image = *images[image_index]; |
| 218 | fsr_write_barrier.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED; | 218 | fsr_write_barrier.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED; |
| 219 | 219 | ||
| 220 | cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, | 220 | cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, |
diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp index d2132b408..7029287a9 100644 --- a/src/yuzu/configuration/configure_input_player.cpp +++ b/src/yuzu/configuration/configure_input_player.cpp | |||
| @@ -147,7 +147,7 @@ QString ConfigureInputPlayer::ButtonToText(const Common::ParamPackage& param) { | |||
| 147 | // Retrieve the names from Qt | 147 | // Retrieve the names from Qt |
| 148 | if (param.Get("engine", "") == "keyboard") { | 148 | if (param.Get("engine", "") == "keyboard") { |
| 149 | const QString button_str = GetKeyName(param.Get("code", 0)); | 149 | const QString button_str = GetKeyName(param.Get("code", 0)); |
| 150 | return QObject::tr("%1%2").arg(toggle, button_str); | 150 | return QObject::tr("%1%2%3").arg(toggle, inverted, button_str); |
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | if (common_button_name == Common::Input::ButtonNames::Invalid) { | 153 | if (common_button_name == Common::Input::ButtonNames::Invalid) { |
| @@ -341,7 +341,7 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i | |||
| 341 | emulated_controller->SetButtonParam(button_id, {}); | 341 | emulated_controller->SetButtonParam(button_id, {}); |
| 342 | button_map[button_id]->setText(tr("[not set]")); | 342 | button_map[button_id]->setText(tr("[not set]")); |
| 343 | }); | 343 | }); |
| 344 | if (param.Has("button") || param.Has("hat")) { | 344 | if (param.Has("code") || param.Has("button") || param.Has("hat")) { |
| 345 | context_menu.addAction(tr("Toggle button"), [&] { | 345 | context_menu.addAction(tr("Toggle button"), [&] { |
| 346 | const bool toggle_value = !param.Get("toggle", false); | 346 | const bool toggle_value = !param.Get("toggle", false); |
| 347 | param.Set("toggle", toggle_value); | 347 | param.Set("toggle", toggle_value); |
| @@ -349,8 +349,8 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i | |||
| 349 | emulated_controller->SetButtonParam(button_id, param); | 349 | emulated_controller->SetButtonParam(button_id, param); |
| 350 | }); | 350 | }); |
| 351 | context_menu.addAction(tr("Invert button"), [&] { | 351 | context_menu.addAction(tr("Invert button"), [&] { |
| 352 | const bool toggle_value = !param.Get("inverted", false); | 352 | const bool invert_value = !param.Get("inverted", false); |
| 353 | param.Set("inverted", toggle_value); | 353 | param.Set("inverted", invert_value); |
| 354 | button_map[button_id]->setText(ButtonToText(param)); | 354 | button_map[button_id]->setText(ButtonToText(param)); |
| 355 | emulated_controller->SetButtonParam(button_id, param); | 355 | emulated_controller->SetButtonParam(button_id, param); |
| 356 | }); | 356 | }); |
| @@ -510,28 +510,37 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i | |||
| 510 | 510 | ||
| 511 | analog_map_modifier_button[analog_id]->setContextMenuPolicy(Qt::CustomContextMenu); | 511 | analog_map_modifier_button[analog_id]->setContextMenuPolicy(Qt::CustomContextMenu); |
| 512 | 512 | ||
| 513 | connect(analog_map_modifier_button[analog_id], &QPushButton::customContextMenuRequested, | 513 | connect( |
| 514 | [=, this](const QPoint& menu_location) { | 514 | analog_map_modifier_button[analog_id], &QPushButton::customContextMenuRequested, |
| 515 | QMenu context_menu; | 515 | [=, this](const QPoint& menu_location) { |
| 516 | Common::ParamPackage param = emulated_controller->GetStickParam(analog_id); | 516 | QMenu context_menu; |
| 517 | context_menu.addAction(tr("Clear"), [&] { | 517 | Common::ParamPackage param = emulated_controller->GetStickParam(analog_id); |
| 518 | param.Set("modifier", ""); | 518 | context_menu.addAction(tr("Clear"), [&] { |
| 519 | analog_map_modifier_button[analog_id]->setText(tr("[not set]")); | 519 | param.Set("modifier", ""); |
| 520 | emulated_controller->SetStickParam(analog_id, param); | 520 | analog_map_modifier_button[analog_id]->setText(tr("[not set]")); |
| 521 | }); | 521 | emulated_controller->SetStickParam(analog_id, param); |
| 522 | context_menu.addAction(tr("Toggle button"), [&] { | 522 | }); |
| 523 | Common::ParamPackage modifier_param = | 523 | context_menu.addAction(tr("Toggle button"), [&] { |
| 524 | Common::ParamPackage{param.Get("modifier", "")}; | 524 | Common::ParamPackage modifier_param = |
| 525 | const bool toggle_value = !modifier_param.Get("toggle", false); | 525 | Common::ParamPackage{param.Get("modifier", "")}; |
| 526 | modifier_param.Set("toggle", toggle_value); | 526 | const bool toggle_value = !modifier_param.Get("toggle", false); |
| 527 | param.Set("modifier", modifier_param.Serialize()); | 527 | modifier_param.Set("toggle", toggle_value); |
| 528 | analog_map_modifier_button[analog_id]->setText( | 528 | param.Set("modifier", modifier_param.Serialize()); |
| 529 | ButtonToText(modifier_param)); | 529 | analog_map_modifier_button[analog_id]->setText(ButtonToText(modifier_param)); |
| 530 | emulated_controller->SetStickParam(analog_id, param); | 530 | emulated_controller->SetStickParam(analog_id, param); |
| 531 | }); | ||
| 532 | context_menu.exec( | ||
| 533 | analog_map_modifier_button[analog_id]->mapToGlobal(menu_location)); | ||
| 534 | }); | 531 | }); |
| 532 | context_menu.addAction(tr("Invert button"), [&] { | ||
| 533 | Common::ParamPackage modifier_param = | ||
| 534 | Common::ParamPackage{param.Get("modifier", "")}; | ||
| 535 | const bool invert_value = !modifier_param.Get("inverted", false); | ||
| 536 | modifier_param.Set("inverted", invert_value); | ||
| 537 | param.Set("modifier", modifier_param.Serialize()); | ||
| 538 | analog_map_modifier_button[analog_id]->setText(ButtonToText(modifier_param)); | ||
| 539 | emulated_controller->SetStickParam(analog_id, param); | ||
| 540 | }); | ||
| 541 | context_menu.exec( | ||
| 542 | analog_map_modifier_button[analog_id]->mapToGlobal(menu_location)); | ||
| 543 | }); | ||
| 535 | 544 | ||
| 536 | connect(analog_map_range_spinbox[analog_id], qOverload<int>(&QSpinBox::valueChanged), | 545 | connect(analog_map_range_spinbox[analog_id], qOverload<int>(&QSpinBox::valueChanged), |
| 537 | [=, this] { | 546 | [=, this] { |