early-access version 2435

This commit is contained in:
pineappleEA 2022-01-25 23:21:18 +01:00
parent d379fdd5b6
commit bd4866cc89
12 changed files with 27 additions and 41 deletions

View File

@ -1,7 +1,7 @@
yuzu emulator early access yuzu emulator early access
============= =============
This is the source code for early-access 2434. This is the source code for early-access 2435.
## Legal Notice ## Legal Notice

View File

@ -31,8 +31,6 @@ public:
} }
constexpr void SetAffinity(s32 core, bool set) { constexpr void SetAffinity(s32 core, bool set) {
ASSERT(0 <= core && core < static_cast<s32>(Core::Hardware::NUM_CPU_CORES));
if (set) { if (set) {
this->mask |= GetCoreBit(core); this->mask |= GetCoreBit(core);
} else { } else {

View File

@ -339,7 +339,7 @@ void UDPClient::StartCommunication(std::size_t client, const std::string& host,
} }
} }
const PadIdentifier UDPClient::GetPadIdentifier(std::size_t pad_index) const { PadIdentifier UDPClient::GetPadIdentifier(std::size_t pad_index) const {
const std::size_t client = pad_index / PADS_PER_CLIENT; const std::size_t client = pad_index / PADS_PER_CLIENT;
return { return {
.guid = clients[client].uuid, .guid = clients[client].uuid,
@ -348,9 +348,9 @@ const PadIdentifier UDPClient::GetPadIdentifier(std::size_t pad_index) const {
}; };
} }
const Common::UUID UDPClient::GetHostUUID(const std::string host) const { Common::UUID UDPClient::GetHostUUID(const std::string& host) const {
const auto ip = boost::asio::ip::address_v4::from_string(host); const auto ip = boost::asio::ip::make_address_v4(host);
const auto hex_host = fmt::format("{:06x}", ip.to_ulong()); const auto hex_host = fmt::format("{:06x}", ip.to_uint());
return Common::UUID{hex_host}; return Common::UUID{hex_host};
} }

View File

@ -145,8 +145,8 @@ private:
void OnPortInfo(Response::PortInfo); void OnPortInfo(Response::PortInfo);
void OnPadData(Response::PadData, std::size_t client); void OnPadData(Response::PadData, std::size_t client);
void StartCommunication(std::size_t client, const std::string& host, u16 port); void StartCommunication(std::size_t client, const std::string& host, u16 port);
const PadIdentifier GetPadIdentifier(std::size_t pad_index) const; PadIdentifier GetPadIdentifier(std::size_t pad_index) const;
const Common::UUID GetHostUUID(const std::string host) const; Common::UUID GetHostUUID(const std::string& host) const;
Common::Input::ButtonNames GetUIButtonName(const Common::ParamPackage& params) const; Common::Input::ButtonNames GetUIButtonName(const Common::ParamPackage& params) const;

View File

@ -16,7 +16,7 @@
// Pad Identifier of data source // Pad Identifier of data source
struct PadIdentifier { struct PadIdentifier {
Common::UUID guid{}; Common::UUID guid{Common::INVALID_UUID};
std::size_t port{}; std::size_t port{};
std::size_t pad{}; std::size_t pad{};
@ -89,7 +89,7 @@ struct UpdateCallback {
// Triggered if data changed on the controller and the engine is on configuring mode // Triggered if data changed on the controller and the engine is on configuring mode
struct MappingCallback { struct MappingCallback {
std::function<void(MappingData)> on_data; std::function<void(const MappingData&)> on_data;
}; };
// Input Identifier of data source // Input Identifier of data source

View File

@ -2,14 +2,13 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included // Refer to the license.txt file included
#include "common/common_types.h"
#include "common/settings.h" #include "common/settings.h"
#include "input_common/input_engine.h" #include "input_common/input_engine.h"
#include "input_common/input_mapping.h" #include "input_common/input_mapping.h"
namespace InputCommon { namespace InputCommon {
MappingFactory::MappingFactory() {} MappingFactory::MappingFactory() = default;
void MappingFactory::BeginMapping(Polling::InputType type) { void MappingFactory::BeginMapping(Polling::InputType type) {
is_enabled = true; is_enabled = true;
@ -19,7 +18,7 @@ void MappingFactory::BeginMapping(Polling::InputType type) {
second_axis = -1; second_axis = -1;
} }
[[nodiscard]] const Common::ParamPackage MappingFactory::GetNextInput() { Common::ParamPackage MappingFactory::GetNextInput() {
Common::ParamPackage input; Common::ParamPackage input;
input_queue.Pop(input); input_queue.Pop(input);
return input; return input;
@ -57,7 +56,7 @@ void MappingFactory::StopMapping() {
void MappingFactory::RegisterButton(const MappingData& data) { void MappingFactory::RegisterButton(const MappingData& data) {
Common::ParamPackage new_input; Common::ParamPackage new_input;
new_input.Set("engine", data.engine); new_input.Set("engine", data.engine);
if (data.pad.guid != Common::UUID{}) { if (data.pad.guid.IsValid()) {
new_input.Set("guid", data.pad.guid.Format()); new_input.Set("guid", data.pad.guid.Format());
} }
new_input.Set("port", static_cast<int>(data.pad.port)); new_input.Set("port", static_cast<int>(data.pad.port));
@ -93,7 +92,7 @@ void MappingFactory::RegisterButton(const MappingData& data) {
void MappingFactory::RegisterStick(const MappingData& data) { void MappingFactory::RegisterStick(const MappingData& data) {
Common::ParamPackage new_input; Common::ParamPackage new_input;
new_input.Set("engine", data.engine); new_input.Set("engine", data.engine);
if (data.pad.guid != Common::UUID{}) { if (data.pad.guid.IsValid()) {
new_input.Set("guid", data.pad.guid.Format()); new_input.Set("guid", data.pad.guid.Format());
} }
new_input.Set("port", static_cast<int>(data.pad.port)); new_input.Set("port", static_cast<int>(data.pad.port));
@ -138,7 +137,7 @@ void MappingFactory::RegisterStick(const MappingData& data) {
void MappingFactory::RegisterMotion(const MappingData& data) { void MappingFactory::RegisterMotion(const MappingData& data) {
Common::ParamPackage new_input; Common::ParamPackage new_input;
new_input.Set("engine", data.engine); new_input.Set("engine", data.engine);
if (data.pad.guid != Common::UUID{}) { if (data.pad.guid.IsValid()) {
new_input.Set("guid", data.pad.guid.Format()); new_input.Set("guid", data.pad.guid.Format());
} }
new_input.Set("port", static_cast<int>(data.pad.port)); new_input.Set("port", static_cast<int>(data.pad.port));

View File

@ -3,8 +3,14 @@
// Refer to the license.txt file included // Refer to the license.txt file included
#pragma once #pragma once
#include "common/param_package.h"
#include "common/threadsafe_queue.h" #include "common/threadsafe_queue.h"
namespace InputCommon::Polling {
enum class InputType;
}
namespace InputCommon { namespace InputCommon {
class InputEngine; class InputEngine;
struct MappingData; struct MappingData;
@ -20,7 +26,7 @@ public:
void BeginMapping(Polling::InputType type); void BeginMapping(Polling::InputType type);
/// Returns an input event with mapping information from the input_queue /// Returns an input event with mapping information from the input_queue
[[nodiscard]] const Common::ParamPackage GetNextInput(); [[nodiscard]] Common::ParamPackage GetNextInput();
/** /**
* Registers mapping input data from the driver * Registers mapping input data from the driver

View File

@ -27,7 +27,7 @@ namespace InputCommon {
struct InputSubsystem::Impl { struct InputSubsystem::Impl {
void Initialize() { void Initialize() {
mapping_factory = std::make_shared<MappingFactory>(); mapping_factory = std::make_shared<MappingFactory>();
MappingCallback mapping_callback{[this](MappingData data) { RegisterInput(data); }}; MappingCallback mapping_callback{[this](const MappingData& data) { RegisterInput(data); }};
keyboard = std::make_shared<Keyboard>("keyboard"); keyboard = std::make_shared<Keyboard>("keyboard");
keyboard->SetMappingCallback(mapping_callback); keyboard->SetMappingCallback(mapping_callback);
@ -284,7 +284,7 @@ struct InputSubsystem::Impl {
#endif #endif
} }
void RegisterInput(MappingData data) { void RegisterInput(const MappingData& data) {
mapping_factory->RegisterInput(data); mapping_factory->RegisterInput(data);
} }
@ -394,7 +394,7 @@ void InputSubsystem::BeginMapping(Polling::InputType type) {
impl->mapping_factory->BeginMapping(type); impl->mapping_factory->BeginMapping(type);
} }
const Common::ParamPackage InputSubsystem::GetNextInput() const { Common::ParamPackage InputSubsystem::GetNextInput() const {
return impl->mapping_factory->GetNextInput(); return impl->mapping_factory->GetNextInput();
} }

View File

@ -126,7 +126,7 @@ public:
void BeginMapping(Polling::InputType type); void BeginMapping(Polling::InputType type);
/// Returns an input event with mapping information. /// Returns an input event with mapping information.
[[nodiscard]] const Common::ParamPackage GetNextInput() const; [[nodiscard]] Common::ParamPackage GetNextInput() const;
/// Stop polling from all backends. /// Stop polling from all backends.
void StopMapping() const; void StopMapping() const;

View File

@ -21,7 +21,6 @@ namespace Shader::Maxwell {
[[nodiscard]] IR::Program MergeDualVertexPrograms(IR::Program& vertex_a, IR::Program& vertex_b, [[nodiscard]] IR::Program MergeDualVertexPrograms(IR::Program& vertex_a, IR::Program& vertex_b,
Environment& env_vertex_b); Environment& env_vertex_b);
[[nodiscard]] void ConvertLegacyToGeneric(IR::Program& program, void ConvertLegacyToGeneric(IR::Program& program, const RuntimeInfo& runtime_info);
const Shader::RuntimeInfo& runtime_info);
} // namespace Shader::Maxwell } // namespace Shader::Maxwell

View File

@ -12,9 +12,6 @@
#include "video_core/framebuffer_config.h" #include "video_core/framebuffer_config.h"
namespace Core { namespace Core {
namespace Frontend {
class EmuWindow;
}
class System; class System;
} // namespace Core } // namespace Core
@ -25,7 +22,6 @@ class ShaderNotify;
namespace Tegra { namespace Tegra {
class DmaPusher; class DmaPusher;
class CDmaPusher;
struct CommandList; struct CommandList;
enum class RenderTargetFormat : u32 { enum class RenderTargetFormat : u32 {
@ -88,15 +84,9 @@ enum class DepthFormat : u32 {
D32_FLOAT_S8X24_UINT = 0x19, D32_FLOAT_S8X24_UINT = 0x19,
}; };
struct CommandListHeader;
class DebugContext;
namespace Engines { namespace Engines {
class Fermi2D;
class Maxwell3D; class Maxwell3D;
class MaxwellDMA;
class KeplerCompute; class KeplerCompute;
class KeplerMemory;
} // namespace Engines } // namespace Engines
enum class EngineID { enum class EngineID {
@ -190,12 +180,6 @@ public:
/// Returns a const reference to the GPU DMA pusher. /// Returns a const reference to the GPU DMA pusher.
[[nodiscard]] const Tegra::DmaPusher& DmaPusher() const; [[nodiscard]] const Tegra::DmaPusher& DmaPusher() const;
/// Returns a reference to the GPU CDMA pusher.
[[nodiscard]] Tegra::CDmaPusher& CDmaPusher();
/// Returns a const reference to the GPU CDMA pusher.
[[nodiscard]] const Tegra::CDmaPusher& CDmaPusher() const;
/// Returns a reference to the underlying renderer. /// Returns a reference to the underlying renderer.
[[nodiscard]] VideoCore::RendererBase& Renderer(); [[nodiscard]] VideoCore::RendererBase& Renderer();

View File

@ -214,7 +214,7 @@ VkImageView FSR::Draw(VKScheduler& scheduler, size_t image_index, VkImageView im
{ {
VkImageMemoryBarrier fsr_write_barrier = base_barrier; VkImageMemoryBarrier fsr_write_barrier = base_barrier;
fsr_write_barrier.image = *images[image_index], fsr_write_barrier.image = *images[image_index];
fsr_write_barrier.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED; fsr_write_barrier.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,