Compare commits

...

11 Commits

Author SHA1 Message Date
Moonlacer
abe6d39b1a add_link
remove_accident

fix_whoopsie
2021-10-16 21:48:49 -05:00
Fernando S
8b996015a8 Merge pull request #7190 from Morph1984/missing-ui-main
main: Add missing make_unique for ui
2021-10-16 01:48:10 +02:00
Morph
d4c79a0404 main: Add missing make_unique for ui 2021-10-15 19:36:52 -04:00
bunnei
aef3ae1cb9 Merge pull request #7187 from FernandoS27/boy-i-say-boy
NVHost_Ctrl: Force wait if the gpu falls behind too long.
2021-10-15 16:14:32 -07:00
Morph
f40b425cd7 Merge pull request #7189 from FearlessTobi/translation-ci
.ci/transifex: Mark docker.sh as executable
2021-10-15 19:07:06 -04:00
FearlessTobi
20b20a1086 .ci/transifex: Mark docker.sh as executable 2021-10-16 00:59:18 +02:00
Morph
41b4047536 Merge pull request #7188 from Morph1984/web-applet-include
qt_web_browser: Add missing QApplication include
2021-10-15 18:52:22 -04:00
Feng Chen
de81571289 service/vi: Stub IHOSBinderDriver::TransactParcel GetBufferHistory (#7184) 2021-10-15 18:50:45 -04:00
Fernando Sahmkow
53cf91d151 NvHost/Core: Address Feedback. 2021-10-16 00:23:27 +02:00
FernandoS27
198c6ad0d7 Suspend temporally 2021-10-16 00:23:23 +02:00
FernandoS27
7dca0bc11d NVHost_Ctrl: Force wait if the gpu falls behind too long. 2021-10-16 00:22:01 +02:00
8 changed files with 65 additions and 4 deletions

0
.ci/scripts/transifex/docker.sh Normal file → Executable file
View File

View File

@@ -140,25 +140,45 @@ struct System::Impl {
cpu_manager{system}, reporter{system}, applet_manager{system}, time_manager{system} {}
SystemResultStatus Run() {
std::unique_lock<std::mutex> lk(suspend_guard);
status = SystemResultStatus::Success;
kernel.Suspend(false);
core_timing.SyncPause(false);
cpu_manager.Pause(false);
is_paused = false;
return status;
}
SystemResultStatus Pause() {
std::unique_lock<std::mutex> lk(suspend_guard);
status = SystemResultStatus::Success;
core_timing.SyncPause(true);
kernel.Suspend(true);
cpu_manager.Pause(true);
is_paused = true;
return status;
}
std::unique_lock<std::mutex> StallCPU() {
std::unique_lock<std::mutex> lk(suspend_guard);
kernel.Suspend(true);
core_timing.SyncPause(true);
cpu_manager.Pause(true);
return lk;
}
void UnstallCPU() {
if (!is_paused) {
core_timing.SyncPause(false);
kernel.Suspend(false);
cpu_manager.Pause(false);
}
}
SystemResultStatus Init(System& system, Frontend::EmuWindow& emu_window) {
LOG_DEBUG(Core, "initialized OK");
@@ -367,6 +387,9 @@ struct System::Impl {
return perf_stats->GetAndResetStats(core_timing.GetGlobalTimeUs());
}
std::mutex suspend_guard;
bool is_paused{};
Timing::CoreTiming core_timing;
Kernel::KernelCore kernel;
/// RealVfsFilesystem instance
@@ -464,6 +487,14 @@ void System::Shutdown() {
impl->Shutdown();
}
std::unique_lock<std::mutex> System::StallCPU() {
return impl->StallCPU();
}
void System::UnstallCPU() {
impl->UnstallCPU();
}
SystemResultStatus System::Load(Frontend::EmuWindow& emu_window, const std::string& filepath,
u64 program_id, std::size_t program_index) {
return impl->Load(*this, emu_window, filepath, program_id, program_index);

View File

@@ -7,6 +7,7 @@
#include <cstddef>
#include <functional>
#include <memory>
#include <mutex>
#include <string>
#include <vector>
@@ -160,6 +161,9 @@ public:
/// Shutdown the emulated system.
void Shutdown();
std::unique_lock<std::mutex> StallCPU();
void UnstallCPU();
/**
* Load an executable application.
* @param emu_window Reference to the host-system window used for video output and keyboard

View File

@@ -92,6 +92,7 @@ NvResult nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector
if (syncpoint_manager.IsSyncpointExpired(params.syncpt_id, params.threshold)) {
params.value = syncpoint_manager.GetSyncpointMin(params.syncpt_id);
std::memcpy(output.data(), &params, sizeof(params));
events_interface.failed[event_id] = false;
return NvResult::Success;
}
@@ -99,6 +100,7 @@ NvResult nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector
syncpoint_manager.IsSyncpointExpired(params.syncpt_id, params.threshold)) {
params.value = new_value;
std::memcpy(output.data(), &params, sizeof(params));
events_interface.failed[event_id] = false;
return NvResult::Success;
}
@@ -117,6 +119,7 @@ NvResult nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector
event.event->GetWritableEvent().Signal();
params.value = current_syncpoint_value;
std::memcpy(output.data(), &params, sizeof(params));
events_interface.failed[event_id] = false;
return NvResult::Success;
}
const u32 target_value = current_syncpoint_value - diff;
@@ -146,6 +149,16 @@ NvResult nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector
}
params.value |= event_id;
event.event->GetWritableEvent().Clear();
if (events_interface.failed[event_id]) {
{
auto lk = system.StallCPU();
gpu.WaitFence(params.syncpt_id, target_value);
system.UnstallCPU();
}
std::memcpy(output.data(), &params, sizeof(params));
events_interface.failed[event_id] = false;
return NvResult::Success;
}
gpu.RegisterSyncptInterrupt(params.syncpt_id, target_value);
std::memcpy(output.data(), &params, sizeof(params));
return NvResult::Timeout;
@@ -201,6 +214,7 @@ NvResult nvhost_ctrl::IocCtrlClearEventWait(const std::vector<u8>& input, std::v
if (events_interface.status[event_id] == EventState::Waiting) {
events_interface.LiberateEvent(event_id);
}
events_interface.failed[event_id] = true;
syncpoint_manager.RefreshSyncpoint(events_interface.events[event_id].fence.id);

View File

@@ -49,6 +49,8 @@ struct EventInterface {
std::array<EventState, MaxNvEvents> status{};
// Tells if an NVEvent is registered or not
std::array<bool, MaxNvEvents> registered{};
// Tells the NVEvent that it has failed.
std::array<bool, MaxNvEvents> failed{};
// When an NVEvent is waiting on GPU interrupt, this is the sync_point
// associated with it.
std::array<u32, MaxNvEvents> assigned_syncpt{};

View File

@@ -524,7 +524,9 @@ private:
Disconnect = 11,
AllocateBuffers = 13,
SetPreallocatedBuffer = 14
SetPreallocatedBuffer = 14,
GetBufferHistory = 17
};
void TransactParcel(Kernel::HLERequestContext& ctx) {
@@ -641,6 +643,14 @@ private:
ctx.WriteBuffer(response.Serialize());
break;
}
case TransactionId::GetBufferHistory: {
LOG_WARNING(Service_VI, "(STUBBED) called, transaction=GetBufferHistory");
[[maybe_unused]] const auto buffer = ctx.ReadBuffer();
IGBPEmptyResponseParcel response{};
ctx.WriteBuffer(response.Serialize());
break;
}
default:
ASSERT_MSG(false, "Unimplemented");
}

View File

@@ -14,14 +14,14 @@
<item row="0" column="0" colspan="4">
<widget class="QLabel" name="label_1">
<property name="text">
<string>Reads controller input from scripts in the same format as TAS-nx scripts.&lt;br/&gt;For a more detailed explanation please consult the FAQ on the yuzu website.</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Reads controller input from scripts in the same format as TAS-nx scripts.&lt;br/&gt;For a more detailed explanation, please consult the &lt;a href=&quot;https://yuzu-emu.org/help/feature/tas/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#039be5;&quot;&gt;help page&lt;/span&gt;&lt;/a&gt; on the yuzu website.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="4">
<widget class="QLabel" name="label_2">
<property name="text">
<string>To check which hotkeys control the playback/recording, please refer to the Hotkey settings (General -&gt; Hotkeys).</string>
<string>To check which hotkeys control the playback/recording, please refer to the Hotkey settings (Configure -&gt; General -&gt; Hotkeys).</string>
</property>
<property name="wordWrap">
<bool>true</bool>

View File

@@ -192,7 +192,7 @@ static void RemoveCachedContents() {
}
GMainWindow::GMainWindow()
: system{std::make_unique<Core::System>()},
: ui{std::make_unique<Ui::MainWindow>()}, system{std::make_unique<Core::System>()},
input_subsystem{std::make_shared<InputCommon::InputSubsystem>()},
config{std::make_unique<Config>(*system)},
vfs{std::make_shared<FileSys::RealVfsFilesystem>()},