Geoffrey McRae
fb4bdaee2b
[client] egl: set the active preset if specified at launch
2022-01-26 16:07:17 +11:00
Geoffrey McRae
c7389285f9
[client] egl: fix null pointer access when no preset is set
2022-01-26 16:04:15 +11:00
Geoffrey McRae
aa426d13a7
[client] egl: added egl:preset
to load a default preset at startup
2022-01-26 16:00:07 +11:00
Geoffrey McRae
89c83dafc1
[client] egl: make egl less noisy unless debug is specified
2022-01-26 15:42:33 +11:00
Geoffrey McRae
22f3cf5ba6
[client] egl: fix masked color cursor blend operation for xor drawing
2022-01-26 12:23:05 +11:00
Geoffrey McRae
3067bdaa15
[client] egl: properly apply xor mask to masked color cursors
2022-01-26 12:11:43 +11:00
Geoffrey McRae
96fa8891c8
[client] egl: fixed incorrect drawing of masked color cursors
2022-01-24 06:56:32 +11:00
Quantum
9a6aa3ce66
[client] egl: remove duplicate #include "app.h"
2022-01-23 08:49:15 +11:00
Geoffrey McRae
464fee3e20
[client] overlay/graphs: allow the graph to have a custom title format
2022-01-17 22:08:56 +11:00
Chris Spencer
f635077a2c
[client] egl: increase texture processing timeout
...
On my machine (Intel UHD Graphics 770), texture processing occasionally
(about 5% of the time) takes more than 20ms (the highest I have seen is
around 32ms) when the host resolution is 2560x1440. This results in the
frame being discarded and the client displays a stale image. Increase the
timeout to 40ms.
2022-01-14 12:31:02 +11:00
Geoffrey McRae
6bba9bc25d
[client/common] move ll from the client into the common code module
2022-01-12 12:22:18 +11:00
Geoffrey McRae
1851002fc1
[client] all: remove ll_walk
and migrate over to ll_forEachNL
2022-01-12 12:17:29 +11:00
Geoffrey McRae
ec0bd6adc8
[client] imgui: update to cimgui 1.86
2022-01-08 00:26:12 +11:00
Geoffrey McRae
952ebea2c5
[all] refresh copyright dates
2022-01-05 19:42:46 +11:00
Geoffrey McRae
d708651c53
[client] egl: check for null gl strings
2022-01-05 12:38:38 +11:00
Geoffrey McRae
35efa551ef
[client] egl: determine mouse scale using both horiz and vert size
2021-12-28 19:04:24 +11:00
Quantum
136737f25b
[client] egl: simplify EGL torus code
2021-12-28 10:19:36 +11:00
Geoffrey McRae
d69069fb09
[client] egl: keep the mouse cursor 1:1 when downscaling
...
This keeps the cursor a usable size when the guest is running a high
resolution and downscaling (ie, 4K -> FHD).
2021-12-26 11:08:42 +11:00
Geoffrey McRae
adbe333414
[client] egl: dmabuf can be used without GL_EXT_buffer_storage support
2021-12-15 06:10:30 +11:00
Quantum
15066c7345
[client] egl: handle eglQuerySurface(EGL_BUFFER_AGE_EXT) error
2021-12-14 14:35:30 +11:00
Quantum
58f83da7bb
[client] egl: increase the damage box for the cursor
2021-12-02 22:07:37 +11:00
Quantum
3e9a21d3b9
[client] egl: use linear filter when not scaling
...
This appears to eliminate artifacts related to non-full screen paints
due to precision errors with the nearest filter.
2021-12-02 22:07:24 +11:00
Geoffrey McRae
8167ef2c4a
[client] egl: make use of glsl's textureSize function
2021-11-12 07:41:59 +11:00
Geoffrey McRae
67ea8e06ba
[client] egl: use alloca
instead of typecasted char array
2021-10-24 22:57:21 +11:00
Quantum
ad6e3f96e6
[client] egl: reset damage on renderer restart
2021-10-23 18:38:21 +11:00
Geoffrey McRae
fe712b7ec9
[client] egl: damage the full screen if the frame format changes
2021-10-22 18:51:49 +11:00
Geoffrey McRae
dca5da02a0
[client] egl: fix undefined behaviour with zero size array
2021-10-20 13:34:16 +11:00
Quantum
2858ad3f7e
[client] egl: fallback when EGL_RENDER_BUFFER fails
...
This allows the client to work when the OpenGL implementation fails if
EGL_RENDER_BUFFER is passed, printing a warning. This should fix issues
with Nvidia proprietary drivers on Wayland.
2021-10-20 11:31:00 +11:00
Quantum
9ddd260b22
[client] egl: log glCheckFramebufferStatus error
2021-10-20 11:30:40 +11:00
Geoffrey McRae
bc34dc9e24
[client] egl: blame NVIDIA if dmabuf fails on NVIDIA hardware
...
NVIDIA still do not implement a complete/working DMABUF implementation
yet advertise support. Best to tell the public to complain to NVIDIA
instead of assuming it's a LG bug or an issue with their system.
2021-10-20 11:28:29 +11:00
Geoffrey McRae
edc9825c04
[client] egl: check for invalid desktop render dimensions
2021-10-20 11:17:29 +11:00
Geoffrey McRae
70a751b58d
[client] egl/filters: bypass setup/prepare logic if disabled/inactive
...
filters are now not run if `egl_filterSetup` returns false, as such we
do not need additional `enable` checks in `prepare` or `run` and we can
bypass the filters even earlier if they are not enabled reducing load.
2021-10-20 10:57:53 +11:00
Quantum
fc037ccc95
[client] egl: handle filter setup returning false
...
As discussed, this should just skip the filter as if it's disabled.
2021-10-20 10:48:18 +11:00
Quantum
74418106de
[client] egl: skip downscale filter setup when not enabled
...
Since this->prepared will never be set to true unless the filter is
enabled, this results in the framebuffer setup being done every frame
for no reason, causing a lot of texture reallocations.
2021-10-20 10:47:59 +11:00
Quantum
8dcf7af791
[client] egl: fix parentheses in IDX_AGO definition
...
The old definition could break if complex expressions were passed in
as arguments.
2021-10-17 06:10:30 +11:00
Quantum
2d858da0f1
[client] egl: fix egl_bufferAge naming
2021-10-17 06:10:30 +11:00
Quantum
ee211803e4
[client] egl: fix letterbox rendering
...
Add additional half pixel in all directions to ensure erasure of
content in the letterbox area under all circumstances.
2021-10-17 06:10:30 +11:00
Quantum
148ab0278e
[client] egl: add debug options to disable damage tracking
...
This should aid in figuring out the source of damage tracking bugs.
2021-10-14 17:01:48 +11:00
Quantum
d60dcb718b
[client] cmake: correctly detect non-gawk awks
...
Forgetting NAMES meant that cmake was searching for gawk only.
2021-10-14 17:01:37 +11:00
Quantum
4a76401c34
[client] egl: make the last eglDestroyImage call indirect
...
Missed this one in the last PR.
2021-09-29 18:28:07 +10:00
Quantum
072c54977e
[client] egl: use eglCreateImage and eglDestroyImage indirectly
...
The dmabuf path is optional, so we shouldn't require those functions to
link our program.
2021-09-29 17:48:50 +10:00
Quantum
1b58f2592c
[client] egl: make filters damage aware
...
This saves a lot of GPU power for partial updates. Running testufo with
lanczos downscaling and FSR upscaling consumed over 90 W, but with this
commit, consumed only 75 W.
2021-09-04 13:30:24 +10:00
Quantum
e9bf225c75
[client] egl: remove useless RenderStep struct
2021-09-04 13:28:49 +10:00
Quantum
ac926e4458
[client] egl: support debug contexts on older EGL versions
2021-09-04 13:24:45 +10:00
Quantum
26d2feb4d8
[client] egl: remove warning disabling in ffx.c
2021-09-04 13:24:34 +10:00
Quantum
977a4f6323
[client] egl: remove useless comment in filter_downscale.c
2021-08-31 20:14:39 +10:00
Quantum
f4df690d9f
[client] egl: fix preset tooltip always showing
2021-08-30 18:47:48 +10:00
Quantum
239cb6a92b
[client] egl: add separator after presets
2021-08-30 18:45:21 +10:00
Quantum
876a4125bf
[client] egl: correctly select the preset when saving over it
2021-08-30 18:45:21 +10:00
Quantum
ffbf6cd8b4
[client] egl: make preset UI more intuitive
...
This commit makes selecting a preset load it, and changes "Create preset" to
"Save preset as...".
2021-08-30 18:45:21 +10:00
Quantum
39e42ba735
[common] option: change option_dump to option_dump_preset
...
This new function dumps all options marked as preset instead of dumping
individual sections. This should allow filter options to not be all grouped
into the [eglFilter] section.
2021-08-30 18:32:16 +10:00
Quantum
3345ff8448
[client] egl: mark all preset-only options as such
2021-08-30 18:21:54 +10:00
Quantum
8a2ae6860e
[client] egl: warn when attempting to save without preset selected
2021-08-30 18:21:54 +10:00
Quantum
1717555187
[client] egl: implement preset deletion
2021-08-30 18:21:54 +10:00
Quantum
dc27638025
[client] egl: implement loading and saving of filter order
2021-08-30 18:21:54 +10:00
Quantum
c85cc7d668
[client] egl: show preset errors as modal dialogs
2021-08-30 18:21:54 +10:00
Quantum
311f7241c6
[client] egl: implement preset loading/saving logic
2021-08-30 18:21:54 +10:00
Quantum
b7b93f624c
[client] egl: implement options loading/saving for downscale
2021-08-30 18:21:54 +10:00
Quantum
084837b936
[client] egl: add loadState and saveState for filters
2021-08-30 18:21:54 +10:00
Quantum
4adb425337
[client] egl: add UI for presets list
2021-08-30 18:21:54 +10:00
Quantum
5225d2e97f
[client] egl: fix framebuffer leaking textures
2021-08-28 19:17:24 +10:00
Quantum
e6df0acad9
[common] vector: eliminate double allocation when possible
...
This commit creates two constructor/destructor pairs for vector:
* vector_alloc/vector_free dynamically allocates the vector itself
* vector_create/vector_destroy uses existing Vector objects
2021-08-28 19:17:15 +10:00
Quantum
ceff9dca9b
[client] egl: simplify filter moving logic with memmove
...
This avoids duplicating the entire array of filters.
2021-08-25 05:35:50 +10:00
Quantum
7c7eff8dba
[client] egl: make texture_dmabuf.c use vector
...
This replaces the custom memory management code.
2021-08-24 22:10:36 +10:00
Geoffrey McRae
b118c3b681
[client] egl: implement nicer drag & drop re-ordering of filters
2021-08-24 22:05:46 +10:00
Quantum
e5e76d784e
[client] egl: allow postprocessing filters to be reordered by dragging
2021-08-22 21:36:13 +10:00
Quantum
99761b195f
[client] egl: switch postprocessing filters to use vectors
...
This will allow them to be reordered much more easily.
2021-08-22 21:36:13 +10:00
Quantum
9aa0d3ddab
[client] egl: fix context creation on EGL 1.4
...
EGL_CONTEXT_OPENGL_DEBUG is only defined in EGL 1.5, and therefore, we should
not be passing it on older versions of EGL.
2021-08-19 21:28:56 +10:00
Quantum
429620c48b
[client] egl: dynamically import glBufferStorageEXT
...
On some implementations (e.g. llvmpipe), the function can only be queried via
eglGetProcAddress.
2021-08-19 21:28:45 +10:00
Quantum
bb91b41c64
[client] egl: look at 3x3 around the pixel instead of 4x4
...
Using 4x4 means that some pixels will be outside of the lanczos window. The
ideal lanczos function should in fact be zero in those areas, so we shouldn't
waste time processing those pixels.
I can't notice any difference in the results.
2021-08-19 15:52:44 +10:00
Quantum
520460669c
[client] egl: set gl_Position.z in cursor vertex shader
2021-08-19 12:24:55 +10:00
Quantum
81c38e825c
[client] remove all casts around malloc
...
The cast is unnecessary in C and should be removed to avoid clutter.
2021-08-16 16:26:58 +10:00
Quantum
fd4a4114e6
[client] egl: pad areas of the desktop repainted to cover overlays
...
We pad the screen coordinates and then convert to desktop coordinates,
so that the padding will always be a pixel wide on screen.
2021-08-16 16:26:18 +10:00
Quantum
104141eec1
[client] use correct argument order for calloc
2021-08-16 16:25:59 +10:00
Quantum
b7d3bbbd82
[client] egl: use standard-compliant way of EGL detection
...
According to the documentation for eglQueryString:
> EGL_BAD_DISPLAY is generated if display is not an EGL display connection,
> unless display is EGL_NO_DISPLAY and name is EGL_EXTENSIONS.
Therefore, we should check EGL by doing:
eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS)
Indeed, the old way of eglQueryString(EGL_NO_DISPLAY, EGL_VERSION) works on
libglvnd but not using mesa's libEGL.so directly.
Also added a warning to make it more obvious that EGL is not available.
2021-08-16 16:25:48 +10:00
Tudor Brindus
14ad83c6b8
[client] use variable-relative sizeof where possible
2021-08-16 16:22:55 +10:00
Quantum
8f5afe1848
[client] egl: clamp sharpness settings in filters
...
While the slider does not allow you to get out of range by dragging,
the user could still type in out of range values, so we clamp the values.
2021-08-15 18:01:03 +10:00
Quantum
36073586e7
[client] egl: add tooltip about Ctrl+Click on sharpness sliders
...
With the new keymap feature, we are now able to properly support letting
the user enter exact values into the sliders. This commit adds a tooltip
to help the user discover this feature.
Note that this currently only works on Wayland. The X11 backend will need
to call app_handleKeyboardModifiers.
2021-08-15 18:01:03 +10:00
Quantum
bbd173000f
[client] egl: clamp downscale factor range
2021-08-14 14:57:33 +10:00
Quantum
96738ab9d0
[client] egl: make downscale filter use text input widget
...
The major/minor pixel size hack is too confusing. This commit replaces
that with a text input and a slider.
2021-08-14 14:44:26 +10:00
Quantum
5f3bd778c0
[client] egl: add debug prints for renderStartup errors
2021-08-14 12:20:12 +10:00
Quantum
f66486b0c7
[client] egl/downscale: implement filter switching
2021-08-14 12:19:50 +10:00
Quantum
2c02e6c4a0
[client] egl: add linear downscale filter shader
2021-08-14 12:19:50 +10:00
Quantum
94de061587
[client] egl: implement lanczos filter shader
2021-08-14 12:19:50 +10:00
Quantum
16adbab5d4
[client] all: remove needless initalization
2021-08-14 12:19:07 +10:00
Quantum
579f998519
[client] all: replace assert with DEBUG_ASSERT
2021-08-14 12:19:07 +10:00
Quantum
85a96d1e06
[client] all: use DEBUG_UNREACHABLE instead of assert
...
Due to the way assert is defined in standard C, compilers in release mode
will not treat it as unreachable. This explains a lot about those pesky
uninitialized variable bugs, actually.
2021-08-14 12:19:07 +10:00
Quantum
8c18817e2d
[client] egl: don't generate mipmaps in downscale filter
...
When using DMABUF, the mipmaps can cause driver hangs and crashes.
2021-08-12 17:03:18 +10:00
Geoffrey McRae
117e88c240
[client] egl: add new downscale filter
2021-08-12 15:54:16 +10:00
Geoffrey McRae
6387bf2d2e
[client] rework the configuration overlay to allow for tabs
2021-08-12 09:04:45 +10:00
Geoffrey McRae
fe6339fc77
[client] egl: re-order CAS to before FSR for better results
2021-08-12 06:56:16 +10:00
Quantum
3f8c7c8d0d
[client] egl: fix buffer overflow in desktop_rects module
...
The module has been changed to support variable amount of rectangles,
so we should just allocate a VLA.
2021-08-11 21:23:13 +10:00
Quantum
543c97987b
[client] egl: remove needless precision quantifiers
...
We simply use precision mediump float; for everything. We don't actually
need highp anyways, and we don't use it for stuff like CAS or FSR.
2021-08-11 20:47:46 +10:00
Geoffrey McRae
06da52acfc
[client] egl/fsr: release consts
when no longer needed
2021-08-11 20:47:03 +10:00
Geoffrey McRae
5a2f34d71c
[client] egl/cas: release consts
when no longer needed
2021-08-11 20:42:56 +10:00
Quantum
8b2db071d8
[client] egl: precompute CAS filter constants on CPU
2021-08-11 20:38:42 +10:00
Quantum
3a1a9121eb
[client] egl: make FSR filter show inactive in config when disabled
2021-08-11 20:17:17 +10:00
Quantum
f80b67bc50
[client] egl: precompute FSR filter constants on CPU
2021-08-11 20:16:39 +10:00
Quantum
fe823b6172
[client] egl: display FSR equivalent quality mode
...
This also displays a tooltip to explain that quality can be changed by
altering guest resolution and also show the resolutions needed to achieve
each quality mode.
2021-08-11 20:05:27 +10:00
Quantum
c4c60fd330
[client] egl: update FSR filter state upon resolution change
2021-08-11 20:05:27 +10:00