Morph
52a219cfe9
core_timing: Fix SingleCore cycle timer
3 years ago
Morph
1b83c7eab4
(wall, native)_clock: Add GetGPUTick
Allows us to directly calculate the GPU tick without double conversion to and from the host clock tick.
3 years ago
Morph
2856fadaa0
core_timing: Use CNTPCT as the guest CPU tick
Previously, we were mixing the raw CPU frequency and CNTFRQ.
The raw CPU frequency (1020 MHz) should've never been used as CNTPCT (whose frequency is CNTFRQ) is the only counter available.
3 years ago
Morph
e67edd4bb7
core_timing: Make use of MicroSleep for x64 CPUs
For CPUs that support tpause, this should result in significant CPU power savings over thread yield in this spin wait.
3 years ago
Morph
ddb330121a
core: Promote CPU/GPU threads to time critical
And also demote Audren and CoreTiming to High thread priority.
3 years ago
Morph
e25334b8b3
core_timing: Use higher precision sleeps on Windows
The precision of sleep_for and wait_for is limited to 1-1.5ms on Windows.
Using SleepForOneTick() allows us to sleep for exactly one interval of the current timer resolution.
This allows us to take advantage of systems that have a timer resolution of 0.5ms to reduce CPU overhead in the event loop.
3 years ago
arades79
60a68839ee
remove static from pointer sized or smaller types for aesthetics, change constexpr static to static constexpr for consistency
Signed-off-by: arades79 <scravers@protonmail.com>
3 years ago
arades79
adcef452e0
add static lifetime to constexpr values to force compile time evaluation where possible
Signed-off-by: arades79 <scravers@protonmail.com>
3 years ago
Liam
e1b0b3d0db
timing: wait for completion on unregister
3 years ago
bunnei
438c1b5c18
core: core_timing: Re-initialize if single/multicore state changes.
3 years ago
bunnei
a35c884097
core: Partially persist emulation state across game boots.
3 years ago
Liam
d10787b40b
core_timing: use high-precision sleeps on non-Windows targets
3 years ago
Liam
47fc168030
common: remove "yuzu:" prefix from thread names
3 years ago
Kelebek1
c6d4071162
Remove pause callbacks from coretiming
3 years ago
Morph
b5847efa10
core_timing: Sleep in discrete intervals, yield during spin
3 years ago
Kelebek1
4a764c5df7
Add missing looping event schedule signal
3 years ago
Kelebek1
992af57f8d
Make coretiming waiting more accurate
3 years ago
Maide
68dcd946b7
Revert Coretiming PRs 8531 and 7454 ( #8591 )
3 years ago
Kelebek1
03de5e053d
Rework CoreTiming
4 years ago
Fernando Sahmkow
95cb99b186
Core timing: use only one thread.
4 years ago
Fernando Sahmkow
3adeb694b0
Adress Feedback.
4 years ago
Fernando Sahmkow
2d838d8ec9
Address feedback.
4 years ago
Fernando Sahmkow
0043292951
Core: Protect each event from race conditions within it.
4 years ago
Fernando Sahmkow
1541f198eb
Core/Common: Corrections to core timing and add critical priority.
4 years ago
Fernando Sahmkow
ca686b6d07
Core: Reimplement Core Timing.
4 years ago
Morph
2b87305d31
general: Convert source file copyright comments over to SPDX
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
4 years ago
Lioncash
84b656fbbd
core: Resolve misc cases of variable shadowing
Resolves shadowing warnings that aren't in a particularly large
subsection of core. Brings us closer to turning -Wshadow into an error.
All that remains now is for cases in the kernel (left untouched for now
since a big change by bunnei is pending), and a few left over in the
service code (will be tackled next).
5 years ago
bunnei
7f4d928f77
core: hle: Add missing calls to MicroProfileOnThreadExit.
5 years ago
bunnei
deb3536936
Revert "core: Fix clang build"
5 years ago
Lioncash
18636013c9
core: Fix clang build
Recent changes to the build system that made more warnings be flagged as
errors caused building via clang to break.
Fixes #4795
5 years ago
Lioncash
96214f8600
core_timing: Remove unused header
5 years ago
Lioncash
aae74a55da
core_timing: Move clock initializer into constructor initializer list
Same behavior, minus unnecessary zeroing out of the pointer.
5 years ago
Lioncash
41c74f4f0c
core_timing: Resolve sign conversion warning
This constant is only ever assigned to downcount, which is a s64, not a
u64.
5 years ago
Lioncash
7decda6bc2
core_timing: Make use of uintptr_t to represent user_data
Makes the interface future-proofed for supporting other platforms in the event we ever support platforms with differing pointer sizes. This way, we have a type in place that is always guaranteed to be able to represent a pointer exactly.
5 years ago
Lioncash
56054fe86d
core_timing: Make TimedCallback take std::chrono::nanoseconds
Enforces our desired time units directly with a concrete type.
6 years ago
Lioncash
9e113a2b67
core_timing: Make use of std::chrono with ScheduleEvent
6 years ago
ReinUsesLisp
a0226819e1
core_timing,scheduler: Use std::scoped_lock when possible
Simplifies the cognitive load of procedures using locks and makes locks
safe against exceptions.
6 years ago
Fernando Sahmkow
94a51e6b21
Core/Common: Address Feedback.
6 years ago
Fernando Sahmkow
a4e7d0b106
CoreTiming: Correct rebase bugs and other miscellaneous things.
6 years ago
Fernando Sahmkow
fb07639438
General: Tune the priority of main emulation threads so they have higher priority than less important helper threads.
6 years ago
Fernando Sahmkow
afb6d31c02
CoreTiming/CycleTimer: Correct Idling.
6 years ago
Fernando Sahmkow
f0f2fc4243
SingleCore: Use Cycle Timing instead of Host Timing.
6 years ago
Fernando Sahmkow
287ea2d3b4
SingleCore: Move Host Timing from a sepparate thread to main cpu thread.
6 years ago
Fernando Sahmkow
cb974be3ce
General: Fix Stop function
6 years ago
Fernando Sahmkow
47c01e68da
Kernel: Corrections to Scheduling.
6 years ago
Fernando Sahmkow
fb1d75a788
HostTiming: Pause the hardware clock on pause.
6 years ago
Fernando Sahmkow
9846f5822d
General: Setup yuzu threads' microprofile, naming and registry.
6 years ago
Fernando Sahmkow
7ee76003ad
General: Recover Prometheus project from harddrive failure
This commit: Implements CPU Interrupts, Replaces Cycle Timing for Host
Timing, Reworks the Kernel's Scheduler, Introduce Idle State and
Suspended State, Recreates the bootmanager, Initializes Multicore
system.
6 years ago
Fernando Sahmkow
6fc0790f3a
Core: Set all hardware emulation constants in a single file.
6 years ago
bunnei
8b35acbd29
core_timing: Use better reference tracking for EventType. ( #3159 )
* core_timing: Use better reference tracking for EventType.
- Moves ownership of the event to the caller, ensuring we don't fire events for destroyed objects.
- Removes need for unique names - we won't be using this for save states anyways.
6 years ago