gnif / LookingGlass

An extremely low latency KVMFR (KVM FrameRelay) implementation for guests with VGA PCI Passthrough.
GNU General Public License v2.0
4.72k stars 262 forks source link

[host] dxgi: add microsecond-scale sleep capability to d3d12 #971

Closed VMFortress closed 2 years ago

VMFortress commented 2 years ago

The usleep() call lets d3d12 match the sleep calls of d3d11 while maintaining the current millisecond-scale sleep interface in the configuration file.

gnif commented 2 years ago

We opted to not use usleep here due to system resolution issues. If you truly need sub ms accuracy please use nsleep.

VMFortress commented 2 years ago

Updated to nsleep(). Apologies as I was using d3d11.c as reference but I think we've discussed some of this before.

Also, I fixed the type define in dxgi.c.