Commit Graph

2567 Commits

Author SHA1 Message Date
Geoffrey McRae
79dcc6d4f1 Revert "[client] egl: set a default scale for textures without filters"
This reverts commit 57a74c156b.
Pushed a ton of changes that should not have been pushed
2021-08-09 18:26:30 +10:00
Geoffrey McRae
57a74c156b [client] egl: set a default scale for textures without filters 2021-08-09 18:24:33 +10:00
Geoffrey McRae
6882e5c59f [client] egl: provide the texture scale to the desktop shader
If the texture has a post-processing filter that has scaled the texture,
the desktop fragment shader needs to know this if it's doing linear
scaling.
2021-08-09 18:22:28 +10:00
Geoffrey McRae
f7f8060447 [client] egl: allow setting an output scale for a post-process shader 2021-08-09 17:57:36 +10:00
Quantum
53461d7515 [client] egl: simplify desktop vertex shader
In GLSL, using the / operator on two vectors of the same size divides the
vector component-wise, i.e. vec2(a, b) / vec2(c, d) == vec2(a / c, b / d).
2021-08-09 17:51:13 +10:00
Quantum
9b87f4ba5e [client] egl: cycle through multiple textures for dmabuf
This avoids race conditions in GL drivers when attempting to render and
call glEGLImageTargetTexture2DOES on the same texture.

Also, when using glEGLImageTargetTexture2DOES, we do not need to allocate
storage for textures.
2021-08-09 17:12:11 +10:00
Quantum
5e13549f74 [host] windows: use DEBUG_WINERROR for MsgWaitForMultipleObjects 2021-08-09 17:07:25 +10:00
Quantum
87a21f5f5e [host] windows: use DEBUG_WINERROR for CallNtPowerInformation
We need to use the function RtlNtStatusToDosError to convert NTSTATUS to
Windows error codes.
2021-08-09 17:07:25 +10:00
Quantum
9246e00163 [host] windows: use DEBUG_WINERROR for exit event opening code 2021-08-09 17:07:25 +10:00
Geoffrey McRae
1fd726eed7 [client] x11: be less sensitive to frame skips
External events like launching other applications can cause latency
spikes while X11 initializes the application, we should only start
adjusting our delay if we see excessive skips over a 1s period.
2021-08-09 15:51:01 +10:00
Geoffrey McRae
bc7e59c9d7 [client] x11: prevent present event loop underruns
Queue up and maintain a list of presentation timestamps to avoid spikes
caused by X11 event processing latency.
2021-08-09 15:24:12 +10:00
Geoffrey McRae
179eaef29d [client] x11: switch to epoll for event wait loop 2021-08-09 15:23:44 +10:00
Geoffrey McRae
f50ef4c23c [client] egl: remove includes from testing 2021-08-09 14:13:03 +10:00
Geoffrey McRae
86d6b67337 [client] egl: rework egl to accomodate post-processing filtering 2021-08-09 14:08:10 +10:00
Geoffrey McRae
30ad28ffd1 [common] CountedBuffer: cosmetics 2021-08-09 14:07:39 +10:00
Geoffrey McRae
69f6532b8d [common] ringbuffer: allow reverse iteration 2021-08-09 14:06:32 +10:00
Geoffrey McRae
91d1b8d2cd [client] egl: refactor egl_texture_free to use project naming standards 2021-08-08 17:52:13 +10:00
Geoffrey McRae
baf9661530 [client] egl: remove texture->ops indirection 2021-08-08 17:31:52 +10:00
Geoffrey McRae
2141046da9 [client] opengl: refactor to use project naming standards 2021-08-08 17:21:25 +10:00
Geoffrey McRae
266ad27998 [client] egl: refactor to use project naming standard 2021-08-08 17:16:10 +10:00
Geoffrey McRae
f4a925a750 [client] main: destroy and finish fontconfig usage
Fixes ASAN reported memory leak
2021-08-08 16:21:48 +10:00
Geoffrey McRae
30ed563504 [client] interface: refactor to use camlCase function names 2021-08-08 15:43:42 +10:00
Geoffrey McRae
d347b28481 [client] egl: implement free for texture frambuffer 2021-08-08 15:35:13 +10:00
Geoffrey McRae
f8ae291090 [client] interface: switch to using UPCAST for the renderer's data 2021-08-08 15:32:01 +10:00
Geoffrey McRae
45d1f27fb4 [client] interface: rename LG_Renderer to LG_RendererOps
Part of the standardisation of using the `Ops` suffix for all interfaces
2021-08-08 14:43:04 +10:00
Geoffrey McRae
1a8267d55a [client] interface: cleanup the renderer interface
Removes the silly typedefs and adds some basic documentation as to the
usage of each function.
2021-08-08 14:39:40 +10:00
Quantum
b822e255d8 [client] egl: attempt DMABUF import and fallback if it fails
This should deal with drivers not supporting our DMABUF without attempting
to identify the drivers and blacklist them.
2021-08-08 09:53:47 +10:00
Geoffrey McRae
037b76750a [client] egl: revert glsync changes
`process` and `bind` are called from the same thread in order, there is
no need for atomic usage here.

This reverts commit 3d7dbd6371.
This reverts commit b3db1ba10b.
2021-08-08 09:44:59 +10:00
Geoffrey McRae
e949f2f8d2 [client] egl: texture_framebuffer should call the stream init 2021-08-08 09:43:28 +10:00
Geoffrey McRae
88c91d4752 [egl] texture: use more appropriate vairable names (parent & this) 2021-08-08 09:35:56 +10:00
Geoffrey McRae
3d7dbd6371 [client] egl: sync is now an atomic, access it as such 2021-08-08 09:26:36 +10:00
Quantum
b3db1ba10b [client] egl: eliminate GLsync object leaks
It used to be the case that we overwrite this->sync even if it was non-zero
when updating the texture, without deleting the sync object. If we update
faster than we render, the result would be leaking sync objects.

This commit ensures that sync objects are deleted when they are replaced.
2021-08-08 09:19:04 +10:00
Geoffrey McRae
16f68d6b1b [client] main: don't call stopWaitFrame if jitRender is not enabled 2021-08-08 09:01:48 +10:00
Geoffrey McRae
64da3465b8 [client] x11: invalidate the full window after timeout from expose
Invalidating the entire window on an Expose event causes poor WM
performance when dragging the window around. Instead flag to redraw and
wait for the expose events to stop for 100ms before doing it.
2021-08-08 08:49:46 +10:00
Geoffrey McRae
12d256c7c8 [client] egl: do a full redraw if nightvision is toggled 2021-08-08 08:42:08 +10:00
Quantum
3e32e01c30 [client] egl/imgui: use imgui for night vision gain configuration 2021-08-08 08:42:01 +10:00
Quantum
ac3677d9ae [client] egl: implement partial copies for framebuffer textures
This uses the same line sweep algorithm originally created to copy DXGI
textures to IVSHMEM to implement the copy from IVSHMEM to memory-mapped
pixel buffer objects.
2021-08-08 08:30:11 +10:00
Quantum
0462cee9db [common] rects: implement routine to copy rectangles from framebuffer 2021-08-08 08:30:11 +10:00
Quantum
cab95c5eed [common] rects: refactor rect buffer copy code to common module
This also fixes a bug of accidentally multiplying the stride by 4 when
the stride is already in bytes and not pixels.
2021-08-08 08:30:11 +10:00
Quantum
4205e49786 [common] appstrings: add blurb for quantum 2021-08-07 08:54:56 +10:00
Geoffrey McRae
e755f0befa [client] egl: correct letterbox area clear attempt #3 - sigh 2021-08-07 04:00:18 +10:00
Geoffrey McRae
3e08e7aafa [client] x11: prevent skew from enter/leave/focus and fullscreen events 2021-08-07 03:49:32 +10:00
Geoffrey McRae
9f6ad864ed [client] egl: correct letterbox area clear attempt #2 :) 2021-08-07 03:44:47 +10:00
Geoffrey McRae
ec56b2760a [client] x11: don't allow window manager events to skew cal timing 2021-08-07 03:39:11 +10:00
Geoffrey McRae
e5a138d854 [client] egl: properly clear the letterbox areas 2021-08-07 03:28:52 +10:00
Geoffrey McRae
ad256e0b00 [client] x11: improve presentation sync calibration 2021-08-07 02:36:11 +10:00
Geoffrey McRae
162b1b93db [client] main: don't include the swap into the render timings
If vsync is enabled the swap will block until vblank skewing the timing
metrics.
2021-08-07 01:45:42 +10:00
Geoffrey McRae
0ec66ba210 [client] main: increase render graph max scale to 10ms
Some GPUs (like my K1200) easly exceed 2ms on the render time making
this graph useless.
2021-08-07 01:45:42 +10:00
Quantum
3d29967a8d [host] dxgi: copy only damaged regions to IVSHMEM
This implementation uses a line sweep algorithm to copy the precisely the
intersection of all accumulated damage rectangles, ensuring that every
pixel is copied exactly once, and no pixel is ever copied multiple times.
Furthermore, once a row has been swept, we update the framebuffer write
pointer immediately.
2021-08-06 22:55:15 +10:00
Quantum
5d3c00717a [client] egl/imgui: use imgui for scaling algorithm selection 2021-08-06 22:49:49 +10:00