Commit Graph

169 Commits

Author SHA1 Message Date
Geoffrey McRae
0bd19cfd38 [c-host] dxgi: fix segfault with maxTextures=1 on client reconnect 2019-12-17 20:56:14 +11:00
Geoffrey McRae
8ada29e25f [c-host] nvfbc: fix build attempt 2 :) 2019-12-17 16:42:48 +11:00
Geoffrey McRae
3b5c1bd09c [c-host] nvfbc: fix failure to build due to new event interface 2019-12-17 16:41:02 +11:00
Geoffrey McRae
c82a5e0523 [c-host] dxgi: futher event improvements 2019-12-17 16:36:43 +11:00
Geoffrey McRae
9c5f9906fa [c-host] add spinlock support to events and alter dxgi to use them 2019-12-17 14:59:58 +11:00
Geoffrey McRae
db2f5b85a9 [c-host] dxgi: added new useAcquireLock option for quirked GPUs 2019-12-17 13:45:08 +11:00
Geoffrey McRae
711fbc549a [c-host] dxgi: interlock so we can map outside of the capture thread 2019-12-16 15:18:26 +11:00
Geoffrey McRae
f85c017184 [c-host] DXGI profiled and tuned again :) 2019-12-15 16:21:21 +11:00
Geoffrey McRae
2d9f578719 [c-host] windows: don't attach to the debuggers console 2019-12-13 23:33:11 +11:00
Geoffrey McRae
e75f3a7278 [c-host] windows: fix --help output in command prompt 2019-12-13 23:22:11 +11:00
Geoffrey McRae
26fa5c8860 [c-host] readme: change windows instructions to use MSYS2 2019-12-13 21:55:34 +11:00
Geoffrey McRae
ed5140568a [c-host] readme: added dev setup instructions for Windows 2019-12-13 21:13:17 +11:00
Geoffrey McRae
1d7a2ccf82 [c-host] windows: update ivshmem driver header and usage 2019-10-24 19:46:09 +11:00
Geoffrey McRae
5f1d17ba1f [host] cosmetics 2019-10-09 19:52:31 +11:00
Geoffrey McRae
bca54ab1f6 [client/host] added new asyncronous memory copy
This changes the method of the memory copy from the host application to
the guest. Instead of performing a full copy from the capture device
into shared memory, and then flagging the new frame, we instead set a
write pointer, flag the client that there is a new frame and then copy
in chunks of 1024 bytes until the entire frame is copied. The client
upon seeing the new frame flag begins to poll at high frequency the
write pointer and upon each update copies as much as it can into the
texture.

This should improve latency but also slightly increase CPU usage on the
client due to the high frequency polling.
2019-10-09 13:53:02 +11:00
Geoffrey McRae
4cf6dec592 [all] allow disable of backtrace support during build 2019-06-19 09:13:03 +10:00
Geoffrey McRae
6d24dd52d6 [c-host] not all versions of mingw support wcstombs_s
While the _s functions are for security as they avoid exceeding the
supplied buffer, in our case they are not really required as we are
allocating a buffer large enough to store the entire result.

Fixes #171
2019-06-12 15:31:18 +10:00
Geoffrey McRae
0851fd13e6 [all] made a nicer icon, hopefully just a placeholder for now 2019-05-30 22:21:53 +10:00
Geoffrey McRae
780bb248f7 [c-host] dxgi: fix invalid cursor type define 2019-05-28 15:17:11 +10:00
Geoffrey McRae
026bdb00f2 [c-host] take just the ivshmem headers and omit the kvm-guest submodule 2019-05-28 14:51:47 +10:00
Geoffrey McRae
7d26027752 [c-host] resend the last on client reconnect if a timeout occurs 2019-05-28 14:24:48 +10:00
Geoffrey McRae
3d426ccef8 [all] fix missing cursor when client reconnects 2019-05-28 14:06:15 +10:00
Geoffrey McRae
5e201a32ca [c-host] dxgi: allow out of order frame mapping 2019-05-27 15:26:58 +10:00
Geoffrey McRae
21b02efb4d [c-host] dxgi: don't stall the GPU pipeline to map textures to ram
ID3D11DeviceContext_Map by default will force a CPU sync if the prior call to
CopyResource has not completed, this change defers the mapping and sets the
D3D11_MAP_FLAG_DO_NOT_WAIT when attempting to map the texture allowing the
capture to continue without incurring an expensive CPU/GPU sync.

A new tuneable has also been added

  * dxgi:maxTextures
2019-05-26 23:36:17 +10:00
Geoffrey McRae
1b031582a4 [c-host] nvfbc: expose option to disable cursor decoupling 2019-05-23 15:12:28 +10:00
Geoffrey McRae
afe072adf1 [c-host] nvfbc: print out the SDK version and enable NvFBC 2019-05-23 14:49:38 +10:00
Geoffrey McRae
09d4fea9e2 [c-host] correct NvFBC information in the README.md 2019-05-23 14:31:05 +10:00
Geoffrey McRae
58c3fba6b9 [c-host] just another minor readme update 2019-05-23 13:42:51 +10:00
Geoffrey McRae
773dd7773b [c-host] try to be more compatible with mingw headers 2019-05-22 19:46:18 +10:00
Geoffrey McRae
732ce05866 [c-host] minor readme updates 2019-05-22 18:33:04 +10:00
Geoffrey McRae
108c7d3aaa [c-host] fixed project for cross compliation for Win on Linux
Thanks @fatalis for your guidance on this
2019-05-22 14:59:19 +10:00
Geoffrey McRae
3f404905d2 [c-host] added tray icon and context menu 2019-05-21 17:52:58 +10:00
Geoffrey McRae
cc6dd58778 [c-host] windows: fix dxgi option struct syntax 2019-05-17 09:27:04 +10:00
Geoffrey McRae
0ba931cbed [c-host] windows: add log file output option 2019-05-17 09:26:42 +10:00
Geoffrey McRae
b662128708 [c-host] linux: implemented getValues support for shmDevice option 2019-05-12 16:14:25 +10:00
Geoffrey McRae
0090580a64 [c-host] be compatible with new option ABI 2019-05-11 20:59:31 +10:00
Geoffrey McRae
51ddb62126 [c-host] load config from looking-glass-host.ini if available 2019-05-11 18:23:06 +10:00
Geoffrey McRae
522bacb1f0 [c-host] linux: remove extra shm device name validation
This is now validated by the option validator callback
2019-05-11 11:59:26 +10:00
Geoffrey McRae
2ddae623b8 [c-host] update to use new option validator and tidy up output 2019-05-11 11:35:42 +10:00
Geoffrey McRae
9886316e07 [c-host] linux: fix shmDevice file size check 2019-05-11 11:23:27 +10:00
Geoffrey McRae
8a3356859c [c-host] implement shmDevice option validator and help 2019-05-11 11:21:18 +10:00
Paul Götzinger
b5975e0f05 [host] [c-host] added support to specify IVSHMEM device
[host] basic IVSHMEM device selecting implemented

Minor fixes for IVSHMEM device scanning

[c-host] added support to specify IVSHMEM device
2019-05-10 22:28:27 +10:00
Geoffrey McRae
5677117c0d [c-host] nvfbc: remove debug line from prior commit 2019-05-09 22:53:02 +10:00
Geoffrey McRae
558ae5dc45 [c-host] dxgi: initialize option to NULL for consistancy 2019-05-09 22:51:12 +10:00
Geoffrey McRae
83f63f4c42 [c-host] dxgi: add the ability to specify the adapter and/or output.
Fixes #132
2019-05-09 22:48:39 +10:00
Geoffrey McRae
63314941f6 [c-host] fix build under windows 2019-05-09 22:13:31 +10:00
Geoffrey McRae
e7345b9711 [c-host] initial agnostic option api and parser 2019-05-09 22:06:58 +10:00
Geoffrey McRae
22f9fa3938 [c-host] windows: fix errors from prior commit 2019-05-09 19:32:19 +10:00
Geoffrey McRae
4617829d41 [c-host] provide a platform agnostic method of passing args to app_main 2019-05-09 19:30:09 +10:00
Geoffrey McRae
fc907b802f [c-host] linux: updated to use the correct headers 2019-05-09 19:07:23 +10:00
Geoffrey McRae
338bc2e0dc [c-host] nvfbc: disable ARGB10 until NVIDIA fix the API (if ever) 2019-04-11 19:30:42 +10:00
Geoffrey McRae
8cedad8241 [c-host] fix NvFBC build after moving headers 2019-04-11 17:15:17 +10:00
Geoffrey McRae
611216286e [c-host] added initial crash handler stub 2019-04-11 11:34:46 +10:00
Geoffrey McRae
28b12c85f4 [build] make "common" a static library (part 1/2) 2019-04-11 11:03:30 +10:00
Geoffrey McRae
bee221c18d [c-host] add ability to provide NvFBC privData 2019-04-10 22:23:56 +10:00
Geoffrey McRae
878eb057d1 [c-host] better formatting of README.md 2019-04-10 22:08:14 +10:00
Geoffrey McRae
da7c66419a [c-host] a few build tweaks and updated README.md 2019-04-10 22:04:36 +10:00
Geoffrey McRae
d5ad53dae7 [c-host] stop the capture when stopping threads 2019-04-10 21:36:43 +10:00
Geoffrey McRae
a03075416c [c-host] cmake: fix bad method of setting CFLAGS 2019-04-10 21:20:15 +10:00
Geoffrey McRae
e4d8cf2d76 [c-host] remove extra NvFBC noise 2019-04-10 21:14:11 +10:00
Geoffrey McRae
0cac3e1c40 [c-host] tons of windows specific fixes 2019-04-10 21:07:56 +10:00
Geoffrey McRae
3f13485ced [c-host] nvfbc: continued implementation of NvFBC 2019-04-10 16:25:13 +10:00
Geoffrey McRae
24c99c4ff9 [c-host] added initial nvfbc support 2019-04-10 13:07:42 +10:00
Geoffrey McRae
4002f2716d [c-host] fix multiple re-inits due to threads flagging for reinit 2019-04-10 13:06:33 +10:00
Geoffrey McRae
f0758768b9 [c-host] show the build version 2019-04-09 16:30:07 +10:00
Geoffrey McRae
a82b1a2e2f [c-host] restructure project to use cmake 2019-04-09 16:28:11 +10:00
Geoffrey McRae
db398d41a0 [client] project restructure part 1/2 2019-03-28 11:02:36 +11:00
Geoffrey McRae
182c4752d5 [c-host] dxgi: added pointer support 2019-03-04 19:26:19 +11:00
Geoffrey McRae
273ef55857 [c-host] app: added pointer interface and support 2019-03-04 19:26:02 +11:00
Geoffrey McRae
88c2e55acf [c-host] change getFrame/Pointer to return a real status 2019-03-04 17:55:45 +11:00
Geoffrey McRae
496fd79714 [c-host] initial stubs for pointer support 2019-03-04 17:45:19 +11:00
Geoffrey McRae
40a1b860bf [c-host] linux: updated, but not working yet :) 2019-03-04 17:08:49 +11:00
Geoffrey McRae
8120913acb [c-host] dxgi: reworked for better pipelining 2019-03-04 16:56:45 +11:00
Geoffrey McRae
935eb0651d [c-host] dxgi: remove needsUnmap bool 2019-03-04 15:11:40 +11:00
Geoffrey McRae
925a93686b [c-host] dxgi: cleanup init code failure path 2019-03-04 15:09:41 +11:00
Geoffrey McRae
6f545483c9 [c-host] rework events 2019-03-04 15:03:11 +11:00
Geoffrey McRae
a8b018d5da [c-host] app: fix updateEvent race problem 2019-03-04 13:38:17 +11:00
Geoffrey McRae
6e35033f2e [c-host] app: reinit on failure to capture a frame
A failed to capture a frame should not be considered fatal as it may be due to a driver issue or bug, instead try to reinitialize first
2019-03-04 13:06:30 +11:00
Geoffrey McRae
f79a1b2533 [c-host] dxgi: fixed memory leak 2019-03-04 12:04:17 +11:00
Geoffrey McRae
79ce98116a [c-host] dxgi: allow a 2nd frame to be captured during a prior copy 2019-03-04 10:42:54 +11:00
Geoffrey McRae
942c417cbb [c-host] dxgi: only flag frame updates if there was actually an update 2019-03-04 10:17:19 +11:00
Geoffrey McRae
8df850023c [c-host] fix deadlock when there is no update 2019-03-04 10:16:51 +11:00
Geoffrey McRae
eedde4abcb [c-host] fixed build under linux 2019-03-04 09:45:45 +11:00
Geoffrey McRae
fcc06dfad4 [c-host] app: inital capture is now working 2019-03-04 09:37:50 +11:00
Geoffrey McRae
ff850c4251 [c-host] remove testing code 2019-03-03 23:47:04 +11:00
Geoffrey McRae
20f8c92bb2 [c-host] dxgi: implement getFrame 2019-03-03 23:46:03 +11:00
Geoffrey McRae
22dcb39adb [c-host] app: fix deadlock on reinit 2019-03-03 23:45:37 +11:00
Geoffrey McRae
f572a72c2a [c-host] windows: added event support 2019-03-03 23:30:02 +11:00
Geoffrey McRae
be736c48e9 [c-host] dxgi: release resources 2019-03-03 21:55:29 +11:00
Geoffrey McRae
67c7c79dae [c-host] linux: add getFrame support to xcb capture 2019-03-02 20:33:45 +11:00
Geoffrey McRae
61108ba760 [c-host] app: add initial frame capture support 2019-03-02 20:33:21 +11:00
Geoffrey McRae
7285f9e9ad [c-host] add app_quit for clean shutdown support 2019-03-02 20:31:33 +11:00
Geoffrey McRae
b29de8f370 [c-host] add platform event interface and linux support 2019-03-02 20:22:35 +11:00
Geoffrey McRae
7a828b3aee [c-host] linux: initial xcb capture 2019-03-02 11:59:03 +11:00
Geoffrey McRae
afc264e846 [c-host] linux: added initial stubs for XCB capture 2019-03-01 21:41:32 +11:00
Geoffrey McRae
37c1d7ea58 [c-host] dont use a interface that fails to create 2019-03-01 21:41:06 +11:00
Geoffrey McRae
4a72dab02a [c-host] linux: correct device name comparison 2019-03-01 21:17:16 +11:00
Geoffrey McRae
22e5b323c8 [c-host] linux: simplify read from device 2019-03-01 21:12:42 +11:00
Geoffrey McRae
b275ac5765 [c-host] linux: check the device name 2019-03-01 21:12:11 +11:00
Geoffrey McRae
1475845675 [c-host] correct buffer size for stncat 2019-03-01 21:03:10 +11:00