Commit Graph

300 Commits

Author SHA1 Message Date
Geoffrey McRae
4f9544d61d [client] egl: added DMA texture support for direct upload
Note: This only works with the KVMFR kernel module in a VM->VM
configuration. If this causes issues it can be disabled with the new
option `app:allowDMA`
2020-10-30 02:36:45 +11:00
Geoffrey McRae
0bf73d862d [client] added initial framework for dma buffer support 2020-10-30 02:36:45 +11:00
Geoffrey McRae
58ba76a27f [client] seperate frame setup and data events 2020-10-12 19:43:29 +11:00
Geoffrey McRae
90d1ed64e4 [client] opengl: added RGBA16F support 2020-10-11 20:44:22 +11:00
Geoffrey McRae
919b77df71 [client] egl: fix RGBA16F support 2020-10-11 20:34:34 +11:00
Geoffrey McRae
98e0e5fc0b [client] egl: correct invalid value for texture row length 2020-10-11 19:59:44 +11:00
Geoffrey McRae
8a9f004ff6 [host/client] fix invalid initialization of RGBA16F 2020-10-11 19:39:47 +11:00
Geoffrey McRae
9c6bd888fd [host/client] added experimental RGBA16 float support (EGL only) 2020-10-11 19:22:31 +11:00
Jonathan Rubenstein
66df00cee2 Add option to skip splash screen fade out 2020-10-09 03:28:58 +11:00
Geoffrey McRae
c66a339bbc [client] egl: ensure overflow occurs for state value checks 2020-08-15 22:39:10 +10:00
Geoffrey McRae
76e119f8ad [client] egl: don't fade the splash when restarting 2020-08-11 14:54:48 +10:00
Geoffrey McRae
da8b2d0cec [client] egl: properly wait for a new frame on restart 2020-08-11 14:45:08 +10:00
Geoffrey McRae
74649ddb96 [client] gracefully restart if the host application restarts 2020-08-11 14:30:44 +10:00
Geoffrey McRae
06aee158de [client] egl: make better use of atomics and fix modulus bug 2020-07-24 17:39:16 +10:00
Geoffrey McRae
ede96fa486 [client] egl: don't map the texture until it's needed
The texture buffer may still be in use if we try to re-map it
immediately, instead only map when we need it mapped, and unmap
immediately after advancing the offset allowing the render thread to
continue while the unmap operation occurs
2020-05-30 16:50:27 +10:00
Geoffrey McRae
fcbdf7ba4f [client] egl: fix non-streaming texture updates 2020-05-29 16:54:25 +10:00
Geoffrey McRae
e8c949c1e7 [client] egl: dont re-setup the fps texture on each update 2020-05-29 16:47:21 +10:00
Geoffrey McRae
28c93ef5ac [client] egl: don't unmap/map all buffers for each frame 2020-05-29 15:48:59 +10:00
Geoffrey McRae
075c82b32c [client] egl: fix context binding enabling a lock free implementation 2020-05-22 17:47:19 +10:00
Geoffrey McRae
c9ff1e1949 [client] egl: alter warning about low fps as it doesn't apply anymore 2020-05-21 14:09:51 +10:00
Geoffrey McRae
e31f38eadc [client] allow frame updates to be triggered by a timed event
This is a major change to how the LG client performs it's updates. In
the past LG would operate a fixed FPS regardless of incoming update
speed and/or frequency. This change allows LG to dynamically increase
it's FPS in order to better sync with the guest as it's rate changes.
2020-05-21 13:41:59 +10:00
Geoffrey McRae
756b57400b [client] egl: move context init to lock function 2020-05-21 11:55:35 +10:00
Geoffrey McRae
01bfd2e090 [client] egl: make better use of the second thread for streaming 2020-05-21 11:44:56 +10:00
Geoffrey McRae
a6d6a49f82 [client] egl: use atomic members instead of locking the entire state 2020-05-21 08:20:30 +10:00
Geoffrey McRae
d899c26617 [client] egl: add low FPS warning when failing to keep up 2020-05-19 22:42:55 +10:00
Geoffrey McRae
73ba325072 [client] egl: reworked the streaming texture pipeline 2020-05-19 22:03:36 +10:00
Geoffrey McRae
f96f0fecda [client] egl: use proper atomics for pbo counting 2020-05-18 09:06:11 +10:00
feltcat
e7f088ef52 [client] egl: typo fix in info message
"Multsampling" to "Multisampling"
2020-04-24 19:01:42 +10:00
Geoffrey McRae
f6691a90c0 [client/obs] improve frambuffer_read functions to support copy pitch
Fixes #244
2020-04-14 13:27:07 +10:00
Mikko Rasa
ead09ed110 [client] opengl: render frame if config didn't change 2020-04-14 12:19:59 +10:00
fishery
94a35a6558 [client] fix buffer overflow in opengl_options
buffer overflow loading opengl_options
2020-04-02 00:17:19 +11:00
Geoffrey McRae
4746c89227 [all] moved time and locking methods to the common library 2020-01-17 14:35:08 +11:00
Geoffrey McRae
278d851c7c [egl] added fallback for platforms not supporting eglGetPlatformDisplay 2020-01-17 11:50:00 +11:00
Geoffrey McRae
17e05c6fd5 [all] expose the FrameBuffer struct for correct sizeof calculations 2020-01-13 19:30:49 +11:00
Andrew Sheldon
70110b4a5a [client] Use eglGetPlatformDisplay() to fix surface creation
[Why]
Recent versions of Mesa may have trouble with surface creation, resulting in
errors like:
egl.c:428  | egl_render_startup             | Failed to create EGL surface (eglError: 0x300b)

[How]
Replace eglGetDisplay() with eglGetPlatformDisplay(). Requires EGL 1.5, but should
be supported with any desktop driver released in the past few years.
2019-12-13 00:35:35 +11:00
Geoffrey McRae
a6f23f00b4 [client] opengl: handle configuration failure properly 2019-12-12 23:32:31 +11:00
Geoffrey McRae
30e3a43311 [client] opengl: fixed failure to render full frame 2019-12-12 23:04:58 +11:00
Geoffrey McRae
66891aa536 [client] don't require wayland-egl, fixes #204 2019-10-26 11:23:04 +11:00
Geoffrey McRae
4c0ca1c8e7 [client] fix xor support for masked color cursors
fixes #200
2019-10-09 19:48:42 +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
6d2c464436 [client] egl: improved streaming texture syncronization 2019-08-30 12:09:05 +10:00
Geoffrey McRae
da94075e7b [client] egl: more verbose error on texture egl failures 2019-08-30 11:40:38 +10:00
Geoffrey McRae
fce88fc72c [EGL] add debug printf helper 2019-08-30 11:33:43 +10:00
Geoffrey McRae
b979752989 [client] added missing include 2019-07-15 18:30:39 +10:00
Geoffrey McRae
607539a2af [client] improve streaming texture performance 2019-06-13 08:54:51 +10:00
Geoffrey McRae
3d426ccef8 [all] fix missing cursor when client reconnects 2019-05-28 14:06:15 +10:00
Geoffrey McRae
b31e8e1cee [client] egl: remove accidental commit of debug code 2019-05-27 18:46:05 +10:00
Geoffrey McRae
f0923c4ed7 [client] egl: expose a few new tuneables 2019-05-27 18:42:46 +10:00
Geoffrey McRae
4cf2c7a350 [client] check for failure to map pbo memory 2019-05-27 01:39:01 +10:00
Geoffrey McRae
dba9764c5e [egl] alert: fix fuzzy font bug and make alerts a little more plesant 2019-05-23 19:58:12 +10:00
Geoffrey McRae
d2d427b533 [client] egl: query maximum multisample support for MSAA context
Based on @rLink234's work in 4ac781b4516678b6c59d9ecf4a61df64a01ec8c1

Fixes #128
2019-05-23 16:56:50 +10:00
Geoffrey McRae
3585e02993 [client] egl: add options for maximum NV level and initial level
Adds options:

 * egl:nvGain
 * egl:nvGainMax

Fixes #153
2019-05-23 16:33:40 +10:00
Geoffrey McRae
86f4256b5a [client] egl: fix streaming texture re-init crash 2019-05-22 12:19:03 +10:00
Geoffrey McRae
fc66a4a19c [client] egl: use persistant mapped texture buffers
While it is recommended to use memory barriers when updating a buffer
like we are, since we double buffer it is unlikely we will corrupt a
prior frame, and even if we do since it's just texture data at worst
we might see a tear.
2019-05-22 11:37:27 +10:00
Geoffrey McRae
087387087e [client] fix race condition on initial uniform access 2019-05-22 11:36:47 +10:00
Geoffrey McRae
e3c98ddc35 [client] port all configuration parsing to use the new option helper 2019-05-21 15:03:59 +10:00
Geoffrey McRae
ba50fbdc3e [client] egl: implement pixel perfect upscaling 2019-04-19 11:23:51 +10:00
Geoffrey McRae
d8915dbfc9 [build] make "common" a static library (part 2/2) 2019-04-11 11:12:59 +10:00
Geoffrey McRae
1fbba5cf2d [client] egl: make nightvision enhance luminosity before gain 2019-03-31 00:08:52 +11:00
Geoffrey McRae
35094a57cb [client] more cleanup and added alerts for new events 2019-03-30 12:26:06 +11:00
Geoffrey McRae
c4001c727a [client] egl: added new super+N binding to increase image gain
This feture is to allow the use of the key combination <super>+N to
increase the brightness of the screen when using monitors with poor
backlighting. Can help in some games.

N = Night vision
2019-03-29 00:15:14 +11:00
Geoffrey McRae
ee09594190 [client] cmake: cosmetics 2019-03-28 20:15:13 +11:00
Geoffrey McRae
66c3c0115f [client] added options to disable/enable interfaces 2019-03-28 20:12:18 +11:00
Geoffrey McRae
3e021f3a6b [client] use cmake to generate renderers/fonts/clipboards headers/code
This is in preperation of cmake options to enable/disable various
functionallity.
2019-03-28 19:56:14 +11:00
Geoffrey McRae
b524c077a4 [client] egl: remove the rest of the shaders into seperate files 2019-03-28 15:53:15 +11:00
Geoffrey McRae
10f7efecb2 [client] cmake: fix inconsistent versioning 2019-03-28 15:03:35 +11:00
Geoffrey McRae
f09ee0bdb3 [client] egl: fix minor error in CMakeLists 2019-03-28 15:01:52 +11:00
Geoffrey McRae
d5a52241b0 [client] egl: move shaders into seperate files and build into objects 2019-03-28 14:59:54 +11:00
Geoffrey McRae
52c4e15c76 [client] project restructure part 2/2 2019-03-28 12:42:41 +11:00
Geoffrey McRae
fdba14691c [client] egl: requires gl 2019-03-28 12:31:28 +11:00
Geoffrey McRae
db398d41a0 [client] project restructure part 1/2 2019-03-28 11:02:36 +11:00
Geoffrey McRae
7cbaf8b5be [egl] don't assume SDL is compiled with Wayland support 2019-03-26 17:30:16 +11:00
Geoffrey McRae
08bf01b649 [all] update copyright dates 2019-02-22 22:16:14 +11:00
Geoffrey McRae
e4ae9134ae [client] egl: fix graphical glitch with splash 2019-01-02 10:36:17 +11:00
Geoffrey McRae
640bc03c6b [client] [Patch 2/2] fixes #106 2019-01-02 10:30:55 +11:00
Geoffrey McRae
667aed635d [client] egl: added untested support for wayland 2019-01-02 00:04:40 +11:00
Geoffrey McRae
507732587e [client] egl: fixed uninitialized variable bug 2018-12-16 12:17:12 +11:00
Geoffrey McRae
de5795e368 [client] egl: implemented alerts and some minor fixes to fps 2018-12-16 10:57:01 +11:00
Geoffrey McRae
fca71e2b95 [client] egl: slight correction to splash 2018-12-16 00:56:35 +11:00
Geoffrey McRae
0e2b371e59 [client] egl: added splash screen rendering 2018-12-16 00:54:37 +11:00
Geoffrey McRae
e1fa6b4057 [client] egl: fix cursor regression 2018-12-13 02:11:37 +11:00
Geoffrey McRae
b6c8d3fae5 [client] egl: fix mono cursor double height regression 2018-12-13 01:39:52 +11:00
Geoffrey McRae
5fe2db7e56 [client] rename fps variables to be more correct 2018-12-12 23:59:22 +11:00
Geoffrey McRae
42fa0e1d1f [client] egl: corrected fps alpha blending 2018-12-12 22:38:08 +11:00
Geoffrey McRae
abfe3a9b4d [client] egl: moved desktop rendering into seperate unit 2018-12-12 21:41:51 +11:00
Geoffrey McRae
b9f8f1a0ad [client] egl: add and use default quad helper for models 2018-12-12 20:08:52 +11:00
Geoffrey McRae
608b67af77 [client] egl: moved fps code into seperate unit 2018-12-12 20:04:43 +11:00
Geoffrey McRae
2a65e39848 [client] egl: added missing files from last commit 2018-12-12 18:57:31 +11:00
Geoffrey McRae
c23bf6a0c4 [client] egl: migrate cursor code into seperate unit 2018-12-12 18:53:55 +11:00
Geoffrey McRae
50c460df5a [client] define GL_GLEXT_PROTOTYPES globally 2018-12-12 16:53:30 +11:00
Geoffrey McRae
61f0577ab2 [client] egl: costmetics 2018-12-12 16:41:29 +11:00
Geoffrey McRae
a9aab3c1ee [client] egl: moved egl sources into subdirectory 2018-12-12 16:39:04 +11:00
Geoffrey McRae
73da86ac0e [client] egl: add checking to egl_shader_get_uniform_location 2018-12-12 16:32:16 +11:00
Geoffrey McRae
43d08df6b3 [client] egl: rename "shader" to "this" for consistancy 2018-12-12 16:31:25 +11:00
Geoffrey McRae
4654f317ca [client] opengl: fixed incorrect colors and added 10-bit RGBA support 2018-12-12 10:55:18 +11:00
Geoffrey McRae
d2b83027b4 [client] egl: removed accidental commit of test code 2018-12-11 16:35:53 +11:00
Geoffrey McRae
7be930a69c [client] removed use of now removed frame type, fixed #105 2018-12-11 16:34:41 +11:00
Geoffrey McRae
75ffcacfe4 [client] added support for RGBA, BGRA and 10-bit RGBA 2018-12-04 21:24:01 +11:00
Geoffrey McRae
1beeac545d [client] added missing lg-fonts.c to the repo 2018-11-20 22:34:01 +11:00
Geoffrey McRae
ab98c87e7c [client] egl: added FPS rendering 2018-11-20 09:50:09 +11:00
Geoffrey McRae
5b453d604e [client] remove other render modes from font ABI 2018-11-20 05:50:22 +11:00
Geoffrey McRae
90fc2a8164 [client] move FPS calculations out of renderers 2018-11-20 05:26:51 +11:00
Geoffrey McRae
0ed9301ed9 [client] font: implemented font ABI and updated OpenGL to use it 2018-11-20 04:38:53 +11:00
Geoffrey McRae
4e7de236d3 [egl] implement window positioning 2018-10-04 02:31:37 +10:00
Geoffrey McRae
741dfd418d [egl] improve texture upload performance 2018-10-04 00:09:47 +10:00
Geoffrey McRae
e70928d603 [egl] fix incorrect xor blending for monochrome cursors 2018-09-25 23:32:45 +10:00
Geoffrey McRae
e2b33348f3 [egl] added monochrome cursor rendering 2018-09-25 23:04:29 +10:00
Geoffrey McRae
3ff712fea5 [egl] fix performance issue with cursor updates and add todo message 2018-09-24 20:26:31 +10:00
Geoffrey McRae
2db26ae37e [egl] fix incorrect mouse size and position scaling 2018-09-24 20:11:42 +10:00
Geoffrey McRae
375b97ca6f [egl] fix incorrect mouse colors 2018-09-24 19:52:44 +10:00
Geoffrey McRae
d331a3dd5a [egl] added intial cursor support 2018-09-24 19:48:11 +10:00
Geoffrey McRae
c0c63fd93b [egl] simplify yuv to rgb shader 2018-09-23 20:56:18 +10:00
Geoffrey McRae
b5a47cae25 [egl] implemented YUV420 decode support in hardware 2018-09-23 20:45:20 +10:00
Geoffrey McRae
1f1c9dfa59 [egl] don't re-create the buffer each frame 2018-09-23 16:56:09 +10:00
Geoffrey McRae
884ad6557b [egl] cleanup texture API 2018-09-23 15:56:47 +10:00
Geoffrey McRae
00658f3d64 [egl] split out texture code into it's own object 2018-09-23 15:48:44 +10:00
Geoffrey McRae
fff3ec30b8 [egl] added basic shaders and use dma to xfer buffer to the gpu 2018-09-22 18:00:52 +10:00
Geoffrey McRae
26434f7baf [egl] initial commit of new modern OpenGL ES renderer 2018-09-22 16:26:55 +10:00
Geoffrey McRae
83592f7e4a [client] cleanup of renderer API for better usage
* Added new on_render_start for render initialization
* Changed on_resize to execute inside the render thread
2018-07-28 14:49:37 +10:00
Geoffrey McRae
13cd50f92c [client] disable multisample after logo is gone
We only use multisample to smooth out the edges of the LG logo, it is
pointless to leave it on after the logo is gone.
2018-07-28 10:36:41 +10:00
Geoffrey McRae
05bd587c74 [client] implemented initial slow yuv420 support 2018-07-28 08:41:39 +10:00
Geoffrey McRae
60070e6076 [client] implement stream paused alert 2018-07-24 01:09:53 +10:00
Geoffrey McRae
d839026ade [opengl] added fade out to wait screen 2018-07-20 01:01:16 +10:00
Geoffrey McRae
34de213926 [opengl] render alerts and fps on wait screen 2018-07-20 00:10:29 +10:00
Geoffrey McRae
b5ec4dd305 [client] scale up the logo and put a gradient behind it 2018-07-19 23:48:35 +10:00
Geoffrey McRae
023d3f811b [client] render the looking glass logo (almost) 2018-07-19 23:33:51 +10:00
Geoffrey McRae
53c32cc5a4 [client] enable multisampling 2018-07-19 23:33:26 +10:00
Geoffrey McRae
eb6ee8ea46 [client] allow window resize event's before startup 2018-07-19 23:32:42 +10:00
Geoffrey McRae
14954cc426 [client] fix too early release of OpenGL context
Fixes a problem where resolution changes would require a restart of
the client
2018-05-31 18:54:29 +10:00
Geoffrey McRae
fbbee1cdac [opengl] added support for alerts 2018-05-29 11:08:25 +10:00
Geoffrey McRae
a647a602bf [opengl] render a blue screen while waiting for sync 2018-05-28 15:30:31 +10:00
Geoffrey McRae
882b31aeaa [client] add support for masked colour cursors (fixes #61)
Also allows early SDL usage for cursor and keyboard control before
the host application starts
2018-05-28 11:40:56 +10:00
Geoffrey McRae
b3aadccfc4 [client] use glFinish to prevent buffering and re-enable by default 2018-05-21 23:16:16 +10:00
Geoffrey McRae
adb1ca58b9 [opengl-basic] removed basic renderer as it is no longer needed 2018-05-16 18:13:20 +10:00
Geoffrey McRae
cf4d16b528 [opengl] numerous improvements to buffer transfer 2018-05-16 17:58:36 +10:00
Geoffrey McRae
4fd59ce8c9 [opengl] fix free bug with new contiguous buffer 2018-05-15 19:25:22 +10:00
Geoffrey McRae
adca879fb9 [opengl] use a single contiguous buffer for the AMD pinned buffer 2018-05-15 19:23:57 +10:00
Geoffrey McRae
3a2d612b41 [decoders] change the API to allow more flexability in the future 2018-05-15 19:19:39 +10:00
Geoffrey McRae
332d53e016 [opengl] Add support for AMD_pinned_memory if it is available 2018-05-15 13:23:44 +10:00
Geoffrey McRae
ae382949c8 [opengl] glxWaitVideoSyncSGI is not well supported in Mesa 18
It seems Mesa 18 has problems with the glxWaitVideoSyncSGI API so
we disable the 'preventBuffer' option by default
2018-05-15 09:54:24 +10:00
Geoffrey McRae
7648ea712c [client] opengl: fix termination on configure failure 2018-01-04 09:25:42 +11:00
Geoffrey McRae
fbf08b94aa [client] initial vaapi h264 decode support (unfinished) 2017-12-31 00:27:26 +11:00
Geoffrey McRae
076a45acc5 [client] added initial decoder framework 2017-12-29 22:48:21 +11:00
Geoffrey McRae
c239306d82 [client] initial support for compressed frames 2017-12-29 21:20:51 +11:00
Geoffrey McRae
db52a55b36 [client] opengl: remove deprecated glScissor, fixes FPS display 2017-12-23 17:40:50 +11:00
Geoffrey McRae
0574daca13 [client] removed unused function argument 2017-12-23 17:38:25 +11:00
Geoffrey McRae
a08aad8009 [client] opengl: don't scale the FPS readout 2017-12-21 06:50:57 +11:00
Geoffrey McRae
58ed978767 [client] opengl: switch to SDL_mutex locking 2017-12-21 01:23:25 +11:00
Geoffrey McRae
c098967293 [client] opengl: update FPS even when there is no updates 2017-12-21 01:17:45 +11:00
Geoffrey McRae
5501d22a2d [client] fixed missed usage of new locking semantics 2017-12-21 01:03:21 +11:00