Commit Graph

273 Commits

Author SHA1 Message Date
Geoffrey McRae
0ad1f21ffb [client] renderer interface improvements and use gl lists for opengl 2017-12-12 03:59:58 +11:00
Geoffrey McRae
fcfea1b65d [client] fixed basic renderer 2017-12-12 03:59:58 +11:00
Geoffrey McRae
e6a21d1049 [client] implemented SGI_video_sync for better frame sync 2017-12-12 03:59:58 +11:00
Geoffrey McRae
31c9693cbf [client] move remaining opengl code into the opengl renderer 2017-12-12 03:59:58 +11:00
Geoffrey McRae
5e9885bec1 [client] apply fps limiter when presentation time is too low 2017-12-12 03:59:58 +11:00
Geoffrey McRae
786b9ec723 [client] altered makefile to link fontconfig 2017-12-12 03:59:58 +11:00
Geoffrey McRae
421b091448 [client] Added fontconfig for font path detection 2017-12-12 03:59:58 +11:00
Geoffrey McRae
a4d8fd2237 [client] added rate limiting to failed kicks (guest not ready) 2017-12-12 03:59:58 +11:00
Geoffrey McRae
3899556cbf [client] added extra sanity checks to the header's data format 2017-12-12 03:59:58 +11:00
Geoffrey McRae
81f1b43581 [client] makefile, enable -O3 as the default now 2017-12-12 03:59:58 +11:00
Geoffrey McRae
79dffa047f [client] dont mipmap when enlarging smaller screens 2017-12-12 03:59:58 +11:00
Geoffrey McRae
0ccb38940e [client] make autoResize work again 2017-12-12 03:59:58 +11:00
Geoffrey McRae
59a894ae04 [client] switched srcRect to srcSize and type to SDL_Point 2017-12-12 03:59:57 +11:00
Geoffrey McRae
34f07ec77f [client] minor logical order optimization of the render loop 2017-12-12 03:59:57 +11:00
Geoffrey McRae
1d5f98db32 [client] adjusted presentation time to be more accurate 2017-12-12 03:59:57 +11:00
Geoffrey McRae
032602f336 [client] reworked the polling logic yet again 2017-12-12 03:59:57 +11:00
Geoffrey McRae
eb52ee9412 [client] added retard/resync counts for debugging 2017-12-12 03:59:57 +11:00
Geoffrey McRae
d09bb1146d [client] removed unused useBufferStorage app state variable 2017-12-12 03:59:57 +11:00
Geoffrey McRae
ea5d0ddfe0 [client] removed deprecated option to disable GL_ARB_buffer_storage 2017-12-12 03:59:57 +11:00
Geoffrey McRae
852309464f [client] more polling improvements 2017-12-12 03:59:57 +11:00
Geoffrey McRae
32c6989654 [client] removed debugging print 2017-12-12 03:59:57 +11:00
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
2d5b633397 [client] changed ivshmem wait timeout to avoid stalls on startup 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
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
aa191f6c90 [client] added option to show host cursor for latency testing 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
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
f767f32a32 [client] syncronization improvements 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
Geoffrey McRae
5a9688cd47 [client] added mipmapping support 2017-12-12 03:59:56 +11:00
Geoffrey McRae
f6bc62647f [client] fixed autoResize behaviour 2017-12-12 03:59:56 +11:00
Geoffrey McRae
f8d61da618 [client] default client size to something more reasonable 2017-12-12 03:59:55 +11:00
Geoffrey McRae
cae4fa3aa6 [client] allow texture stretch when in GL buffer mode 2017-12-12 03:59:55 +11:00
Geoffrey McRae
c0507f5a15 [client] fix incorrect texture buffer index 2017-12-12 03:59:55 +11:00
Geoffrey McRae
bed2d95ccd [client] added checks for invalid offsets by the guest 2017-12-12 03:59:55 +11:00
Geoffrey McRae
e2160a5eda [client] Added window positional options 2017-12-12 03:59:55 +11:00
Geoffrey McRae
52ad00fb0d [client] added client configuration options 2017-12-12 03:59:55 +11:00
Geoffrey McRae
4731b13a03 [client] initial parameter implementation 2017-12-12 03:59:55 +11:00
Geoffrey McRae
34e67b1b57 [client] added KVMGFX_HEADER_VERSION define 2017-12-12 03:59:55 +11:00
Geoffrey McRae
72b69a6659 [client] removed DrawFunc typedef 2017-12-12 03:59:55 +11:00
Geoffrey McRae
e774a0bb06 [client] removed deprectaed drawFunc and improved error handling 2017-12-12 03:59:55 +11:00
Geoffrey McRae
b221382420 [client] removed deprecated compression functions 2017-12-12 03:59:55 +11:00
Geoffrey McRae
96ae755856 [client] state struct rename 2017-12-12 03:59:55 +11:00
Geoffrey McRae
74403cce8c [client] kick the guest early to get the first frame faster 2017-12-12 03:59:55 +11:00
Geoffrey McRae
a413362e53 [client] added changes to Makefile to include additional GL libs 2017-12-12 03:59:55 +11:00
Geoffrey McRae
249801b52b [client] fixed RGB support 2017-12-12 03:59:55 +11:00
Geoffrey McRae
d1ef8d204a [client] Added GL_ARB_buffer_storage support
This improves client performance by 4x if the video driver supports
this extension. OpenGL 4.1 is required for this feature to be used
2017-12-12 03:59:55 +11:00
Geoffrey McRae
9c90a53871 [client] Increased spice mouse ringbuffer size to avoid input overflows
Seems that some rare conditions will overflow the buffer on window
entry/exit, confirmed by testing performed by Clemor. This should help
with this.
2017-12-12 03:59:55 +11:00
Geoffrey McRae
f75d5b7f54 [guest] reworked mouse sync to better handle resolution changes 2017-12-12 03:59:55 +11:00
Geoffrey McRae
05d83d2311 [client] added memcpySSE 2017-12-12 03:59:55 +11:00
Geoffrey McRae
6f5eba3c01 [client] removed debug message output 2017-12-12 03:59:55 +11:00
Geoffrey McRae
b6857d94f1 [client] added support for double buffering 2017-12-12 03:59:55 +11:00
Geoffrey McRae
8140d347ff [client] FRAME_TYPE_INVALID is never a valid type to compare 2017-12-12 03:59:54 +11:00
Geoffrey McRae
79c565f114 [client] cosmetics and removed unused defines 2017-12-12 03:59:54 +11:00
Geoffrey McRae
457b332d2a [client] removed multi-threaded memcpy, overheads negate any gains 2017-12-12 03:59:54 +11:00
Geoffrey McRae
ea41a0e3bc [client] added send keyboard event result checking 2017-10-31 19:11:51 +11:00
Geoffrey McRae
aa0d3d27d4 added licensing to sources 2017-10-31 19:07:16 +11:00
Geoffrey McRae
1c1d018db1 [client] removed useless/invalid define 2017-10-31 17:04:59 +11:00
Geoffrey McRae
eb4bcc8814 [client] removed useless input debugging 2017-10-31 17:04:01 +11:00
Geoffrey McRae
6e7b65023b [client] moved common headers outside of the client project's directory 2017-10-31 16:54:09 +11:00
Geoffrey McRae
0125e02499 [client] omitting repeats is incorrect when comparing with the official client 2017-10-29 17:03:06 +11:00
Geoffrey McRae
d6aceb9a5b [client] added initial YUV444P support, non functional at the moment 2017-10-29 15:50:21 +11:00
Geoffrey McRae
a080636597 [client] increase spice mouse ring buffer, was a bit too small still 2017-10-29 15:13:37 +11:00
Geoffrey McRae
3907ded0c7 [client] realign mouse on window changes 2017-10-29 15:11:37 +11:00
Geoffrey McRae
828cc1d4b7 [client] realign mouse when switching between capture modes 2017-10-29 15:08:11 +11:00
Geoffrey McRae
be792f33ce [client] sync the mouse position on startup with the host 2017-10-29 15:01:31 +11:00
Geoffrey McRae
09ce136346 [client] fixed attempt to send input message before connected 2017-10-29 13:17:30 +11:00
Geoffrey McRae
d61b26959c [client] added debug output for failure of spice message transmission 2017-10-29 13:14:49 +11:00
Geoffrey McRae
ce42f9567e [client] increased padding for debug output of function name 2017-10-29 13:08:11 +11:00
Geoffrey McRae
2dfd1c7b52 [client] cosmetics 2017-10-29 13:06:41 +11:00
Geoffrey McRae
d60f9988c9 [client] moved DEBUG define into a CFLAG 2017-10-29 13:05:39 +11:00
Geoffrey McRae
0f24d72dbb [client] reduced the spice mouse ringbuffer size, no need for it to be so large 2017-10-29 13:02:18 +11:00
Geoffrey McRae
f1fee701cf [client] added checks for connection status to input functions 2017-10-29 13:01:21 +11:00
Geoffrey McRae
7e7351ba4f [client] added specific debug output for keyboard and mouse 2017-10-29 12:58:16 +11:00
Geoffrey McRae
ee0b086927 [client] only send one in every 100 key down messages 2017-10-28 09:30:49 +11:00
Geoffrey McRae
e71f2274e4 [client] mouse warp has to be set before the mouse mode is set to take effect at launch 2017-10-27 06:38:48 +11:00
Geoffrey McRae
54df567b84 [client] moved null cursor init to the initial startup 2017-10-27 06:31:05 +11:00
Geoffrey McRae
a7df6a261e [client] implemented mouse motion event queue for flow control 2017-10-27 03:10:16 +11:00
Geoffrey McRae
e6a01d5af0 [client] cosmetics 2017-10-27 03:10:00 +11:00
Geoffrey McRae
b5ef81ff57 [client] moved sdl and window init outside of the thread, needs to happen early 2017-10-27 03:08:54 +11:00
Geoffrey McRae
3173564b4d [client] added input state debugging 2017-10-27 03:08:11 +11:00
Geoffrey McRae
68212b8609 [client] cosmetics 2017-10-26 15:19:48 +11:00
Geoffrey McRae
9e1aaa29a9 [client] kick the client sooner to help have the next frame ready in time 2017-10-26 15:18:57 +11:00
Geoffrey McRae
8b756a7b80 [client] removed obsolete comments and enabled vsync 2017-10-20 05:10:44 +11:00
Geoffrey McRae
b871d6d8d0 [client] implemented the new ivshmem interrupt sync system 2017-10-20 01:03:39 +11:00
Geoffrey McRae
3a7bff77f2 [client] added ivshmem_process thread and fixed shutdown behaviour 2017-10-19 18:50:42 +11:00
Geoffrey McRae
327a3a77cf [client] added ivshmem client tracking and removal 2017-10-19 17:54:00 +11:00
Geoffrey McRae
aaa18e595e [client] adjusted debug output to be more informative 2017-10-19 17:18:27 +11:00
Geoffrey McRae
f0affdc704 [client] removed binaries from repository 2017-10-19 17:08:40 +11:00
Geoffrey McRae
5aa8b0f24a [client] added .gitignore 2017-10-19 17:07:25 +11:00
Geoffrey McRae
3dd061b895 [client] client is now opens shared memory from ivshmem passed fd 2017-10-19 17:06:42 +11:00
Geoffrey McRae
48facb3746 [client] added initial ivshmem client implementation 2017-10-19 16:00:57 +11:00
Geoffrey McRae
314b8621ea [client] moved spice implementation into subdirectory 2017-10-19 15:18:27 +11:00
Geoffrey McRae
18a6b4f279 [client] removed unused spice-common project 2017-10-19 15:17:11 +11:00
Geoffrey McRae
202985097e Initial import of project to git 2017-10-19 15:15:49 +11:00