ryujinx/src/Ryujinx.HLE/HOS/Services/SurfaceFlinger
riperiperi 1be668e68a
HLE: Add OS-specific precise sleep methods to reduce spinwaiting (#5948)
* feat: add nanosleep for linux and macos

* Add Windows 0.5ms sleep

- Imprecise waits for longer waits with clock alignment
- 1/4 the spin time on vsync timer

* Remove old experiment

* Fix event leak

* Tweaking for MacOS

* Linux tweaks, nanosleep vsync improvement

* Fix overbias

* Cleanup

* Fix realignment

* Add some docs and some cleanup

NanosleepPool needs more, Nanosleep has some benchmark code that needs removed.

* Rename "Microsleep" to "PreciseSleep"

Might have been confused with "microseconds", which no measurement is performed in.

* Remove nanosleep measurement

* Remove unused debug logging

* Nanosleep Pool Documentation

* More cleanup

* Whitespace

* Formatting

* Address Feedback

* Allow SleepUntilTimePoint to take EventWaitHandle

* Remove `_chrono` stopwatch in SurfaceFlinger

* Move spinwaiting logic to PreciseSleepHelper

Technically, these achieve different things, but having them here makes them easier to reuse or tune.
2023-11-30 15:39:42 -03:00
..
Types [Ryujinx.HLE] Address dotnet-format issues (#5380) 2023-07-16 19:31:14 +02:00
BufferItemConsumer.cs [Ryujinx.HLE] Address dotnet-format issues (#5380) 2023-07-16 19:31:14 +02:00
BufferQueue.cs [Ryujinx.HLE] Address dotnet-format issues (#5380) 2023-07-16 19:31:14 +02:00
BufferQueueConsumer.cs [Ryujinx.HLE] Address dotnet-format issues (#5380) 2023-07-16 19:31:14 +02:00
BufferQueueCore.cs [Ryujinx.HLE] Address dotnet-format issues (#5380) 2023-07-16 19:31:14 +02:00
BufferQueueProducer.cs Decrement nvmap reference count on surface flinger prealloc (#5753) 2023-10-02 22:13:29 +00:00
BufferSlot.cs [Ryujinx.HLE] Address dotnet-format issues (#5380) 2023-07-16 19:31:14 +02:00
BufferSlotArray.cs [Ryujinx.HLE] Address dotnet-format issues (#5380) 2023-07-16 19:31:14 +02:00
ConsumerBase.cs [Ryujinx.HLE] Address dotnet-format issues (#5380) 2023-07-16 19:31:14 +02:00
HOSBinderDriverServer.cs [Ryujinx.HLE] Address dotnet-format issues (#5380) 2023-07-16 19:31:14 +02:00
IBinder.cs [Ryujinx.HLE] Address dotnet-format issues (#5380) 2023-07-16 19:31:14 +02:00
IConsumerListener.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
IFlattenable.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
IGraphicBufferProducer.cs [Ryujinx.HLE] Address dotnet-format issues (#5380) 2023-07-16 19:31:14 +02:00
IHOSBinderDriver.cs [Ryujinx.HLE] Address dotnet-format issues (#5380) 2023-07-16 19:31:14 +02:00
IProducerListener.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
LayerState.cs [Ryujinx.HLE] Address dotnet-format issues (#5380) 2023-07-16 19:31:14 +02:00
NativeWindowApi.cs [Ryujinx.HLE] Address dotnet-format issues (#5380) 2023-07-16 19:31:14 +02:00
NativeWindowAttribute.cs [Ryujinx.HLE] Address dotnet-format issues (#5380) 2023-07-16 19:31:14 +02:00
NativeWindowScalingMode.cs [Ryujinx.HLE] Address dotnet-format issues (#5380) 2023-07-16 19:31:14 +02:00
NativeWindowTransform.cs [Ryujinx.HLE] Address dotnet-format issues (#5380) 2023-07-16 19:31:14 +02:00
Parcel.cs [Ryujinx.HLE] Address dotnet-format issues (#5380) 2023-07-16 19:31:14 +02:00
ParcelHeader.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
PixelFormat.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
Status.cs [Ryujinx.HLE] Address dotnet-format issues (#5380) 2023-07-16 19:31:14 +02:00
SurfaceFlinger.cs HLE: Add OS-specific precise sleep methods to reduce spinwaiting (#5948) 2023-11-30 15:39:42 -03:00