early-access version 2996

This commit is contained in:
pineappleEA 2022-10-06 06:29:16 +02:00
parent 5d64751ac0
commit a1131762fb
20 changed files with 24 additions and 24 deletions

View file

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

View file

@ -132,7 +132,7 @@ void AudioRenderer::CreateSinkStreams() {
} }
void AudioRenderer::ThreadFunc() { void AudioRenderer::ThreadFunc() {
constexpr char name[]{"yuzu:AudioRenderer"}; constexpr char name[]{"AudioRenderer"};
MicroProfileOnThreadCreate(name); MicroProfileOnThreadCreate(name);
Common::SetCurrentThreadName(name); Common::SetCurrentThreadName(name);
Common::SetCurrentThreadPriority(Common::ThreadPriority::Critical); Common::SetCurrentThreadPriority(Common::ThreadPriority::Critical);

View file

@ -94,7 +94,7 @@ bool SystemManager::Remove(System& system_) {
} }
void SystemManager::ThreadFunc() { void SystemManager::ThreadFunc() {
constexpr char name[]{"yuzu:AudioRenderSystemManager"}; constexpr char name[]{"AudioRenderSystemManager"};
MicroProfileOnThreadCreate(name); MicroProfileOnThreadCreate(name);
Common::SetCurrentThreadName(name); Common::SetCurrentThreadName(name);
Common::SetCurrentThreadPriority(Common::ThreadPriority::High); Common::SetCurrentThreadPriority(Common::ThreadPriority::High);

View file

@ -219,7 +219,7 @@ private:
void StartBackendThread() { void StartBackendThread() {
backend_thread = std::jthread([this](std::stop_token stop_token) { backend_thread = std::jthread([this](std::stop_token stop_token) {
Common::SetCurrentThreadName("yuzu:Log"); Common::SetCurrentThreadName("Logger");
Entry entry; Entry entry;
const auto write_logs = [this, &entry]() { const auto write_logs = [this, &entry]() {
ForEachBackend([&entry](Backend& backend) { backend.Write(entry); }); ForEachBackend([&entry](Backend& backend) { backend.Write(entry); });

View file

@ -43,7 +43,7 @@ CoreTiming::CoreTiming()
CoreTiming::~CoreTiming() = default; CoreTiming::~CoreTiming() = default;
void CoreTiming::ThreadEntry(CoreTiming& instance) { void CoreTiming::ThreadEntry(CoreTiming& instance) {
constexpr char name[] = "yuzu:HostTiming"; constexpr char name[] = "HostTiming";
MicroProfileOnThreadCreate(name); MicroProfileOnThreadCreate(name);
Common::SetCurrentThreadName(name); Common::SetCurrentThreadName(name);
Common::SetCurrentThreadPriority(Common::ThreadPriority::Critical); Common::SetCurrentThreadPriority(Common::ThreadPriority::Critical);

View file

@ -189,9 +189,9 @@ void CpuManager::RunThread(std::size_t core) {
system.RegisterCoreThread(core); system.RegisterCoreThread(core);
std::string name; std::string name;
if (is_multicore) { if (is_multicore) {
name = "yuzu:CPUCore_" + std::to_string(core); name = "CPUCore_" + std::to_string(core);
} else { } else {
name = "yuzu:CPUThread"; name = "CPUThread";
} }
MicroProfileOnThreadCreate(name.c_str()); MicroProfileOnThreadCreate(name.c_str());
Common::SetCurrentThreadName(name.c_str()); Common::SetCurrentThreadName(name.c_str());

View file

@ -140,7 +140,7 @@ private:
} }
void ThreadLoop(std::stop_token stop_token) { void ThreadLoop(std::stop_token stop_token) {
Common::SetCurrentThreadName("yuzu:Debugger"); Common::SetCurrentThreadName("Debugger");
// Set up the client signals for new data. // Set up the client signals for new data.
AsyncReceiveInto(signal_pipe, pipe_data, [&](auto d) { PipeData(d); }); AsyncReceiveInto(signal_pipe, pipe_data, [&](auto d) { PipeData(d); });

View file

@ -23,7 +23,7 @@ void KWorkerTask::DoWorkerTask() {
} }
} }
KWorkerTaskManager::KWorkerTaskManager() : m_waiting_thread(1, "yuzu:KWorkerTaskManager") {} KWorkerTaskManager::KWorkerTaskManager() : m_waiting_thread(1, "KWorkerTaskManager") {}
void KWorkerTaskManager::AddTask(KernelCore& kernel, WorkerType type, KWorkerTask* task) { void KWorkerTaskManager::AddTask(KernelCore& kernel, WorkerType type, KWorkerTask* task) {
ASSERT(type <= WorkerType::Count); ASSERT(type <= WorkerType::Count);

View file

@ -48,7 +48,7 @@ namespace Kernel {
struct KernelCore::Impl { struct KernelCore::Impl {
explicit Impl(Core::System& system_, KernelCore& kernel_) explicit Impl(Core::System& system_, KernelCore& kernel_)
: time_manager{system_}, : time_manager{system_},
service_threads_manager{1, "yuzu:ServiceThreadsManager"}, system{system_} {} service_threads_manager{1, "ServiceThreadsManager"}, system{system_} {}
void SetMulticore(bool is_multi) { void SetMulticore(bool is_multi) {
is_multicore = is_multi; is_multicore = is_multi;

View file

@ -36,7 +36,7 @@ ServiceThread::Impl::Impl(KernelCore& kernel, std::size_t num_threads, const std
: service_name{name} { : service_name{name} {
for (std::size_t i = 0; i < num_threads; ++i) { for (std::size_t i = 0; i < num_threads; ++i) {
threads.emplace_back([this, &kernel](std::stop_token stop_token) { threads.emplace_back([this, &kernel](std::stop_token stop_token) {
Common::SetCurrentThreadName(std::string{"yuzu:HleService:" + service_name}.c_str()); Common::SetCurrentThreadName(std::string{service_name}.c_str());
// Wait for first request before trying to acquire a render context // Wait for first request before trying to acquire a render context
{ {

View file

@ -33,7 +33,7 @@ constexpr auto frame_ns = std::chrono::nanoseconds{1000000000 / 60};
void NVFlinger::SplitVSync(std::stop_token stop_token) { void NVFlinger::SplitVSync(std::stop_token stop_token) {
system.RegisterHostThread(); system.RegisterHostThread();
std::string name = "yuzu:VSyncThread"; std::string name = "VSyncThread";
MicroProfileOnThreadCreate(name.c_str()); MicroProfileOnThreadCreate(name.c_str());
// Cleanup // Cleanup

View file

@ -90,7 +90,7 @@ GCAdapter::~GCAdapter() {
void GCAdapter::AdapterInputThread(std::stop_token stop_token) { void GCAdapter::AdapterInputThread(std::stop_token stop_token) {
LOG_DEBUG(Input, "Input thread started"); LOG_DEBUG(Input, "Input thread started");
Common::SetCurrentThreadName("yuzu:input:GCAdapter"); Common::SetCurrentThreadName("GCAdapter");
s32 payload_size{}; s32 payload_size{};
AdapterPayload adapter_payload{}; AdapterPayload adapter_payload{};
@ -214,7 +214,7 @@ void GCAdapter::UpdateStateAxes(std::size_t port, const AdapterPayload& adapter_
} }
void GCAdapter::AdapterScanThread(std::stop_token stop_token) { void GCAdapter::AdapterScanThread(std::stop_token stop_token) {
Common::SetCurrentThreadName("yuzu:input:ScanGCAdapter"); Common::SetCurrentThreadName("ScanGCAdapter");
usb_adapter_handle = nullptr; usb_adapter_handle = nullptr;
pads = {}; pads = {};
while (!stop_token.stop_requested() && !Setup()) { while (!stop_token.stop_requested() && !Setup()) {

View file

@ -37,7 +37,7 @@ Mouse::Mouse(std::string input_engine_) : InputEngine(std::move(input_engine_))
} }
void Mouse::UpdateThread(std::stop_token stop_token) { void Mouse::UpdateThread(std::stop_token stop_token) {
Common::SetCurrentThreadName("yuzu:input:Mouse"); Common::SetCurrentThreadName("Mouse");
constexpr int update_time = 10; constexpr int update_time = 10;
while (!stop_token.stop_requested()) { while (!stop_token.stop_requested()) {
if (Settings::values.mouse_panning && !Settings::values.mouse_enabled) { if (Settings::values.mouse_panning && !Settings::values.mouse_enabled) {

View file

@ -436,7 +436,7 @@ SDLDriver::SDLDriver(std::string input_engine_) : InputEngine(std::move(input_en
initialized = true; initialized = true;
if (start_thread) { if (start_thread) {
poll_thread = std::thread([this] { poll_thread = std::thread([this] {
Common::SetCurrentThreadName("yuzu:input:SDL"); Common::SetCurrentThreadName("SDL_MainLoop");
using namespace std::chrono_literals; using namespace std::chrono_literals;
while (initialized) { while (initialized) {
SDL_PumpEvents(); SDL_PumpEvents();
@ -444,7 +444,7 @@ SDLDriver::SDLDriver(std::string input_engine_) : InputEngine(std::move(input_en
} }
}); });
vibration_thread = std::thread([this] { vibration_thread = std::thread([this] {
Common::SetCurrentThreadName("yuzu:input:SDL_Vibration"); Common::SetCurrentThreadName("SDL_Vibration");
using namespace std::chrono_literals; using namespace std::chrono_literals;
while (initialized) { while (initialized) {
SendVibrations(); SendVibrations();

View file

@ -20,7 +20,7 @@ namespace VideoCommon::GPUThread {
static void RunThread(std::stop_token stop_token, Core::System& system, static void RunThread(std::stop_token stop_token, Core::System& system,
VideoCore::RendererBase& renderer, Core::Frontend::GraphicsContext& context, VideoCore::RendererBase& renderer, Core::Frontend::GraphicsContext& context,
Tegra::Control::Scheduler& scheduler, SynchState& state) { Tegra::Control::Scheduler& scheduler, SynchState& state) {
std::string name = "yuzu:GPU"; std::string name = "GPU";
MicroProfileOnThreadCreate(name.c_str()); MicroProfileOnThreadCreate(name.c_str());
SCOPE_EXIT({ MicroProfileOnThreadExit(); }); SCOPE_EXIT({ MicroProfileOnThreadExit(); });

View file

@ -542,7 +542,7 @@ std::unique_ptr<ComputePipeline> ShaderCache::CreateComputePipeline(
std::unique_ptr<ShaderWorker> ShaderCache::CreateWorkers() const { std::unique_ptr<ShaderWorker> ShaderCache::CreateWorkers() const {
return std::make_unique<ShaderWorker>(std::max(std::thread::hardware_concurrency(), 2U) - 1, return std::make_unique<ShaderWorker>(std::max(std::thread::hardware_concurrency(), 2U) - 1,
"yuzu:ShaderBuilder", "GlShaderBuilder",
[this] { return Context{emu_window}; }); [this] { return Context{emu_window}; });
} }

View file

@ -269,8 +269,8 @@ PipelineCache::PipelineCache(RasterizerVulkan& rasterizer_, const Device& device
render_pass_cache{render_pass_cache_}, buffer_cache{buffer_cache_}, render_pass_cache{render_pass_cache_}, buffer_cache{buffer_cache_},
texture_cache{texture_cache_}, shader_notify{shader_notify_}, texture_cache{texture_cache_}, shader_notify{shader_notify_},
use_asynchronous_shaders{Settings::values.use_asynchronous_shaders.GetValue()}, use_asynchronous_shaders{Settings::values.use_asynchronous_shaders.GetValue()},
workers(std::max(std::thread::hardware_concurrency(), 2U) - 1, "yuzu:PipelineBuilder"), workers(std::max(std::thread::hardware_concurrency(), 2U) - 1, "VkPipelineBuilder"),
serialization_thread(1, "yuzu:PipelineSerialization") { serialization_thread(1, "VkPipelineSerialization") {
const auto& float_control{device.FloatControlProperties()}; const auto& float_control{device.FloatControlProperties()};
const VkDriverIdKHR driver_id{device.GetDriverID()}; const VkDriverIdKHR driver_id{device.GetDriverID()};
profile = Shader::Profile{ profile = Shader::Profile{

View file

@ -136,7 +136,7 @@ bool Scheduler::UpdateRescaling(bool is_rescaling) {
} }
void Scheduler::WorkerThread(std::stop_token stop_token) { void Scheduler::WorkerThread(std::stop_token stop_token) {
Common::SetCurrentThreadName("yuzu:VulkanWorker"); Common::SetCurrentThreadName("VulkanWorker");
do { do {
std::unique_ptr<CommandChunk> work; std::unique_ptr<CommandChunk> work;
bool has_submit{false}; bool has_submit{false};

View file

@ -1656,7 +1656,7 @@ void Decompress(std::span<const uint8_t> data, uint32_t width, uint32_t height,
const u32 cols = Common::DivideUp(width, block_width); const u32 cols = Common::DivideUp(width, block_width);
Common::ThreadWorker workers{std::max(std::thread::hardware_concurrency(), 2U) / 2, Common::ThreadWorker workers{std::max(std::thread::hardware_concurrency(), 2U) / 2,
"yuzu:ASTCDecompress"}; "ASTCDecompress"};
for (u32 z = 0; z < depth; ++z) { for (u32 z = 0; z < depth; ++z) {
const u32 depth_offset = z * height * width * 4; const u32 depth_offset = z * height * width * 4;

View file

@ -47,7 +47,7 @@ EmuThread::EmuThread(Core::System& system_) : system{system_} {}
EmuThread::~EmuThread() = default; EmuThread::~EmuThread() = default;
void EmuThread::run() { void EmuThread::run() {
std::string name = "yuzu:EmuControlThread"; std::string name = "EmuControlThread";
MicroProfileOnThreadCreate(name.c_str()); MicroProfileOnThreadCreate(name.c_str());
Common::SetCurrentThreadName(name.c_str()); Common::SetCurrentThreadName(name.c_str());