early-access version 2174
This commit is contained in:
parent
b37854dccc
commit
03951516e2
@ -1,7 +1,7 @@
|
|||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 2173.
|
This is the source code for early-access 2174.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
426
dist/languages/ca.ts
vendored
426
dist/languages/ca.ts
vendored
File diff suppressed because it is too large
Load Diff
504
dist/languages/cs.ts
vendored
504
dist/languages/cs.ts
vendored
File diff suppressed because it is too large
Load Diff
5821
dist/languages/da.ts
vendored
Executable file
5821
dist/languages/da.ts
vendored
Executable file
File diff suppressed because it is too large
Load Diff
426
dist/languages/de.ts
vendored
426
dist/languages/de.ts
vendored
File diff suppressed because it is too large
Load Diff
776
dist/languages/es.ts
vendored
776
dist/languages/es.ts
vendored
File diff suppressed because it is too large
Load Diff
715
dist/languages/fr.ts
vendored
715
dist/languages/fr.ts
vendored
File diff suppressed because it is too large
Load Diff
436
dist/languages/it.ts
vendored
436
dist/languages/it.ts
vendored
File diff suppressed because it is too large
Load Diff
1008
dist/languages/ja_JP.ts
vendored
1008
dist/languages/ja_JP.ts
vendored
File diff suppressed because it is too large
Load Diff
738
dist/languages/ko_KR.ts
vendored
738
dist/languages/ko_KR.ts
vendored
File diff suppressed because it is too large
Load Diff
426
dist/languages/nb.ts
vendored
426
dist/languages/nb.ts
vendored
File diff suppressed because it is too large
Load Diff
432
dist/languages/nl.ts
vendored
432
dist/languages/nl.ts
vendored
File diff suppressed because it is too large
Load Diff
452
dist/languages/pl.ts
vendored
452
dist/languages/pl.ts
vendored
File diff suppressed because it is too large
Load Diff
631
dist/languages/pt_BR.ts
vendored
631
dist/languages/pt_BR.ts
vendored
File diff suppressed because it is too large
Load Diff
426
dist/languages/pt_PT.ts
vendored
426
dist/languages/pt_PT.ts
vendored
File diff suppressed because it is too large
Load Diff
817
dist/languages/ru_RU.ts
vendored
817
dist/languages/ru_RU.ts
vendored
File diff suppressed because it is too large
Load Diff
426
dist/languages/sv.ts
vendored
426
dist/languages/sv.ts
vendored
File diff suppressed because it is too large
Load Diff
995
dist/languages/tr_TR.ts
vendored
995
dist/languages/tr_TR.ts
vendored
File diff suppressed because it is too large
Load Diff
448
dist/languages/zh_CN.ts
vendored
448
dist/languages/zh_CN.ts
vendored
File diff suppressed because it is too large
Load Diff
652
dist/languages/zh_TW.ts
vendored
652
dist/languages/zh_TW.ts
vendored
File diff suppressed because it is too large
Load Diff
@ -98,7 +98,7 @@ NvResult nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector
|
|||||||
if (syncpoint_manager.IsSyncpointExpired(params.syncpt_id, params.threshold)) {
|
if (syncpoint_manager.IsSyncpointExpired(params.syncpt_id, params.threshold)) {
|
||||||
params.value = syncpoint_manager.GetSyncpointMin(params.syncpt_id);
|
params.value = syncpoint_manager.GetSyncpointMin(params.syncpt_id);
|
||||||
std::memcpy(output.data(), ¶ms, sizeof(params));
|
std::memcpy(output.data(), ¶ms, sizeof(params));
|
||||||
events_interface.fails[event_id] = 0;
|
events_interface.failed[event_id] = false;
|
||||||
return NvResult::Success;
|
return NvResult::Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,35 +106,36 @@ NvResult nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector
|
|||||||
syncpoint_manager.IsSyncpointExpired(params.syncpt_id, params.threshold)) {
|
syncpoint_manager.IsSyncpointExpired(params.syncpt_id, params.threshold)) {
|
||||||
params.value = new_value;
|
params.value = new_value;
|
||||||
std::memcpy(output.data(), ¶ms, sizeof(params));
|
std::memcpy(output.data(), ¶ms, sizeof(params));
|
||||||
events_interface.fails[event_id] = 0;
|
events_interface.failed[event_id] = false;
|
||||||
return NvResult::Success;
|
return NvResult::Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto& event = events_interface.events[event_id];
|
||||||
auto& gpu = system.GPU();
|
auto& gpu = system.GPU();
|
||||||
const u32 target_value = syncpoint_manager.GetSyncpointMax(params.syncpt_id);
|
|
||||||
|
// This is mostly to take into account unimplemented features. As synced
|
||||||
|
// gpu is always synced.
|
||||||
|
if (!gpu.IsAsync()) {
|
||||||
|
event.event->GetWritableEvent().Signal();
|
||||||
|
return NvResult::Success;
|
||||||
|
}
|
||||||
|
const u32 current_syncpoint_value = event.fence.value;
|
||||||
|
const s32 diff = current_syncpoint_value - params.threshold;
|
||||||
|
if (diff >= 0) {
|
||||||
|
event.event->GetWritableEvent().Signal();
|
||||||
|
params.value = current_syncpoint_value;
|
||||||
|
std::memcpy(output.data(), ¶ms, sizeof(params));
|
||||||
|
events_interface.failed[event_id] = false;
|
||||||
|
return NvResult::Success;
|
||||||
|
}
|
||||||
|
const u32 target_value = current_syncpoint_value - diff;
|
||||||
|
|
||||||
if (!is_async) {
|
if (!is_async) {
|
||||||
params.value = 0;
|
params.value = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto check_failing = [&]() {
|
|
||||||
if (events_interface.fails[event_id] > 1) {
|
|
||||||
{
|
|
||||||
auto lk = system.StallCPU();
|
|
||||||
gpu.WaitFence(params.syncpt_id, target_value);
|
|
||||||
system.UnstallCPU();
|
|
||||||
}
|
|
||||||
std::memcpy(output.data(), ¶ms, sizeof(params));
|
|
||||||
events_interface.fails[event_id] = 0;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (params.timeout == 0) {
|
if (params.timeout == 0) {
|
||||||
if (check_failing()) {
|
std::memcpy(output.data(), ¶ms, sizeof(params));
|
||||||
return NvResult::Success;
|
|
||||||
}
|
|
||||||
return NvResult::Timeout;
|
return NvResult::Timeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,7 +154,15 @@ NvResult nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector
|
|||||||
params.value = ((params.syncpt_id & 0xfff) << 16) | 0x10000000;
|
params.value = ((params.syncpt_id & 0xfff) << 16) | 0x10000000;
|
||||||
}
|
}
|
||||||
params.value |= event_id;
|
params.value |= event_id;
|
||||||
if (check_failing()) {
|
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(), ¶ms, sizeof(params));
|
||||||
|
events_interface.failed[event_id] = false;
|
||||||
return NvResult::Success;
|
return NvResult::Success;
|
||||||
}
|
}
|
||||||
gpu.RegisterSyncptInterrupt(params.syncpt_id, target_value);
|
gpu.RegisterSyncptInterrupt(params.syncpt_id, target_value);
|
||||||
@ -211,7 +220,7 @@ NvResult nvhost_ctrl::IocCtrlClearEventWait(const std::vector<u8>& input, std::v
|
|||||||
if (events_interface.status[event_id] == EventState::Waiting) {
|
if (events_interface.status[event_id] == EventState::Waiting) {
|
||||||
events_interface.LiberateEvent(event_id);
|
events_interface.LiberateEvent(event_id);
|
||||||
}
|
}
|
||||||
events_interface.fails[event_id]++;
|
events_interface.failed[event_id] = true;
|
||||||
|
|
||||||
syncpoint_manager.RefreshSyncpoint(events_interface.events[event_id].fence.id);
|
syncpoint_manager.RefreshSyncpoint(events_interface.events[event_id].fence.id);
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ struct EventInterface {
|
|||||||
// Tells if an NVEvent is registered or not
|
// Tells if an NVEvent is registered or not
|
||||||
std::array<bool, MaxNvEvents> registered{};
|
std::array<bool, MaxNvEvents> registered{};
|
||||||
// Tells the NVEvent that it has failed.
|
// Tells the NVEvent that it has failed.
|
||||||
std::array<u32, MaxNvEvents> fails{};
|
std::array<bool, MaxNvEvents> failed{};
|
||||||
// When an NVEvent is waiting on GPU interrupt, this is the sync_point
|
// When an NVEvent is waiting on GPU interrupt, this is the sync_point
|
||||||
// associated with it.
|
// associated with it.
|
||||||
std::array<u32, MaxNvEvents> assigned_syncpt{};
|
std::array<u32, MaxNvEvents> assigned_syncpt{};
|
||||||
|
@ -182,7 +182,7 @@ public:
|
|||||||
/// Add phi operand to a phi instruction.
|
/// Add phi operand to a phi instruction.
|
||||||
void AddPhiOperand(Block* predecessor, const Value& value);
|
void AddPhiOperand(Block* predecessor, const Value& value);
|
||||||
|
|
||||||
/// Orders the Phi arguments.
|
/// Orders the Phi arguments from farthest away to nearest.
|
||||||
void OrderPhiArgs();
|
void OrderPhiArgs();
|
||||||
|
|
||||||
void Invalidate();
|
void Invalidate();
|
||||||
|
Loading…
Reference in New Issue
Block a user