Commit graph

2920 commits

Author SHA1 Message Date
Geoffrey McRae
7349334811 [client] reworked polling logic and added GPU magic
SDL_RenderPresent calls SwapBuffers which doesn't block even with vsync
enabled until the driver/gpu has buffered several frames, this is no good
for our use case where low latency is of ultimate importance. This patch
measures the swap interval, ensures the time is consumed and then calls
glFinish to ensure that there is no buffered data. The results on NVidia
hardware are exceptional, but will need verification on AMD hardware.

Polling logic has also been improved, the client will hunt for the best
delay rather then resorting to waiting on an event from the guest, avoiding
scheduler latency caused by waiting on the irq event.
2017-12-12 03:59:57 +11:00
Geoffrey McRae
01d4d52355 [client] removed useless delay functions 2017-12-12 03:59:57 +11:00
Geoffrey McRae
e1a566bcad [client] reworked sync code to use polling for short delays 2017-12-12 03:59:57 +11:00
Geoffrey McRae
a1f574ff2f [client] added 1ms delay loop for incoming polling support 2017-12-12 03:59:57 +11:00
Geoffrey McRae
c26842cb60 [client] fixed minor issue in the makefile 2017-12-12 03:59:57 +11:00
Geoffrey McRae
51bc7631ab [host] fixed incorrect checking of difference map 2017-12-12 03:59:57 +11:00
Geoffrey McRae
2d5b633397 [client] changed ivshmem wait timeout to avoid stalls on startup 2017-12-12 03:59:57 +11:00
Geoffrey McRae
ff81f5df64 [host] removed gitmodule from testing 2017-12-12 03:59:57 +11:00
Geoffrey McRae
0b290d83d3 [host] Numerous performance improvements and minor bug fixes 2017-12-12 03:59:57 +11:00
Geoffrey McRae
c1a82e853d [client] added renderer abstratction
This moves the bulk of the rendering code into seperate rendering
modules cleaning up much of intertwined SDL & OpenGL mess.
2017-12-12 03:59:57 +11:00
Geoffrey McRae
5c335fca67 [client] Makefile rewrite from intial lazy version 2017-12-12 03:59:57 +11:00
Geoffrey McRae
310dba3620 [client] fixed incorrect texSize calculation 2017-12-12 03:59:57 +11:00
Geoffrey McRae
ec13fc161d [host] rename project to "Looking Glass" 2017-12-12 03:59:57 +11:00
Geoffrey McRae
10e6408022 [misc] common and client project rename to "Looking Glass"
See: https://forum.level1techs.com/t/headless-pci-passthrough-program-name-vote/121779/36
2017-12-12 03:59:57 +11:00
Geoffrey McRae
3156c0e0cb [client] corrected event processing
SDL_WaitEvent is useless as it runs in 10ms increments, which is way
too slow for high rate of input applications.
2017-12-12 03:59:57 +11:00
Geoffrey McRae
b61ba15a9c [client] fixed realignment when in server mode 2017-12-12 03:59:56 +11:00
Geoffrey McRae
62ab543720 [client] fixed incorrect kick timing 2017-12-12 03:59:56 +11:00
Geoffrey McRae
14efdf7314 [client] cleanup of vbo and texture allocation 2017-12-12 03:59:56 +11:00
Geoffrey McRae
7638925387 [client] code cleanup 2017-12-12 03:59:56 +11:00
Geoffrey McRae
a54f3000f5 [host] reworked capture to capture at the hosts's frame rate
This will help frame delivery to the host arrive on time, as well as
allow lower latency with a higher host refresh rate.

Data offset addresses are now also pre-calculated rather then
updated on every frame.
2017-12-12 03:59:56 +11:00
Geoffrey McRae
aa191f6c90 [client] added option to show host cursor for latency testing 2017-12-12 03:59:56 +11:00
Geoffrey McRae
d408c6c5bb [misc] added extra contributors that donated via paypal 2017-12-12 03:59:56 +11:00
Geoffrey McRae
7ef55134ef [client] enable support for dynamic vsync 2017-12-12 03:59:56 +11:00
Geoffrey McRae
9590b58f0f [client] only init ttf if fps is enabled 2017-12-12 03:59:56 +11:00
Geoffrey McRae
f2216168f4 [client] make FPS counter more accurate 2017-12-12 03:59:56 +11:00
Geoffrey McRae
a7c4cdcea1 [client] add option to disable vsync 2017-12-12 03:59:56 +11:00
Geoffrey McRae
aef0328050 [client] added FPS counter 2017-12-12 03:59:56 +11:00
Geoffrey McRae
a56724304d [misc] fixed typos 2017-12-12 03:59:56 +11:00
Geoffrey McRae
b51b5cc772 [misc] Added CONTRIBUTORS file 2017-12-12 03:59:56 +11:00
Geoffrey McRae
7bf35e44c5 [client] fixed missing getopt character for input scaling 2017-12-12 03:59:56 +11:00
Geoffrey McRae
695a7b183f [client] fix output offset when aspect ratio changes 2017-12-12 03:59:56 +11:00
Geoffrey McRae
8fdb86ae28 [client] only recalculate scales on screen or guest resize 2017-12-12 03:59:56 +11:00
Geoffrey McRae
9831de92e1 [client] add mouse input scaling feature for stretched/scaled windows 2017-12-12 03:59:56 +11:00
Geoffrey McRae
2c7e7a0a0b [client] made help for new resize option clearer 2017-12-12 03:59:56 +11:00
Geoffrey McRae
a3572b2188 [client] added option to prevent window resize 2017-12-12 03:59:56 +11:00
Geoffrey McRae
b9e3db1971 [client] enable mipmapping by default 2017-12-12 03:59:56 +11:00
Geoffrey McRae
86cf7a9cf1 [client] add the ability to maintaint the aspect ratio 2017-12-12 03:59:56 +11:00
Geoffrey McRae
3bc6f29dc3 [host] syncronization improvements 2017-12-12 03:59:56 +11:00
Geoffrey McRae
f767f32a32 [client] syncronization improvements 2017-12-12 03:59:56 +11:00
Geoffrey McRae
2da40012ca [common] corrected memcpySSE overflow error 2017-12-12 03:59:56 +11:00
Geoffrey McRae
6c9269b64f [host] removed deprecated MTMemcpy from the project 2017-12-12 03:59:56 +11:00
Geoffrey McRae
4a850f531c [host] added new CrashHandler class to project 2017-12-12 03:59:56 +11:00
Geoffrey McRae
df5aa13029 [host] Added a crash handler to write out mini dumps 2017-12-12 03:59:56 +11:00
Geoffrey McRae
d450d792e3 [host] Don't specify D3D11_CREATE_DEVICE_DEBUG in release builds 2017-12-12 03:59:56 +11:00
Geoffrey McRae
a84480470c [client] cosmetics 2017-12-12 03:59:56 +11:00
Geoffrey McRae
c75e7a0f2b [client] explcit flush buffers before using them 2017-12-12 03:59:56 +11:00
Geoffrey McRae
638f836927 [client] copy the header and kick the guest early 2017-12-12 03:59:56 +11:00
Geoffrey McRae
e8ac71263b [client] dont send up events if we didn't send a down event 2017-12-12 03:59:56 +11:00
Geoffrey McRae
3ee53dca79 [client] changed output program name 2017-12-12 03:59:56 +11:00
Geoffrey McRae
4829c0413c [client] additional security changes 2017-12-12 03:59:56 +11:00