Commit Graph

2552 Commits

Author SHA1 Message Date
Quantum
f4daa9f527 [all] cmake: fix OptimizeForNative
1. Correctly detect ON state so that host is not built as -march=native by
   default.
2. Merge OFF and GENERIC options as we need at least -march=nehalem to build
   properly.
2021-07-25 13:46:13 +10:00
arcnmx
2c745db544 [host] windows: use CMAKE_DLLTOOL if available
cmake automatically finds dlltool as of version 3.16
2021-07-24 14:52:32 +10:00
arcnmx
3b37898eb2 [all] use cmake FindPkgConfig IMPORTED_TARGETs 2021-07-24 12:35:48 +10:00
arcnmx
aa2ea05af9 [client] removed unused GMP dependency 2021-07-24 12:35:48 +10:00
arcnmx
7316c1c46c [all] include OPTIMIZE_FOR_NATIVE in feature summary 2021-07-24 12:35:17 +10:00
arcnmx
38cb348201 [all] make OPTIMIZE_FOR_NATIVE a tristate option 2021-07-24 12:35:17 +10:00
arcnmx
be664c49c8 [all] cmake: use -march=x86-64-v2 when it becomes available
Moves the logic in 0525515 to a common cmake include, and applies it to
the other binaries.
2021-07-24 12:35:17 +10:00
Quantum
f09738678e [client] fonts: remove font rendering machinery 2021-07-23 20:18:12 +10:00
Quantum
0c35d9b057 [client] opengl: remove font management 2021-07-23 20:18:12 +10:00
Quantum
cb9774bbd2 [client] egl: remove font management 2021-07-23 20:18:12 +10:00
Quantum
dd0edc1394 [client] renderers: remove alert handling 2021-07-23 20:18:12 +10:00
Quantum
be44249c05 [client] imgui: converted alerts to use imgui 2021-07-23 20:18:12 +10:00
Quantum
efb5019176 [client] overlay/help: switch to using ImGui's table facility 2021-07-23 18:04:05 +10:00
Quantum
5153d35bb5 [client] renderer: remove on_help from renderer interface 2021-07-23 18:04:05 +10:00
Quantum
036f16b9ef [client] imgui: convert help overlay to use imgui 2021-07-23 18:04:05 +10:00
Quantum
436986d182 [client] imgui: make UI font and size configurable 2021-07-23 16:07:42 +10:00
Quantum
5d053128ac [client] imgui: use improved high DPI rendering
This actually makes imgui render at a higher resolution, avoiding scaling
and resulting blurriness.
2021-07-23 16:07:42 +10:00
Quantum
b5c5ecc074 [client] imgui: support high DPI by scaling framebuffer
This allows overlays to render at correct positions on high DPI displays.
2021-07-23 16:07:42 +10:00
Quantum
56308fcbd1 [client] overlay: use utility function to get ImGui rectangle 2021-07-23 15:54:18 +10:00
Quantum
628bdab21b [client] overlay: remove space checking
Every overlay is now guaranteed to be able to write MAX_OVERLAY_RECTS rects,
and running out of space is now an error.
2021-07-23 15:54:18 +10:00
Quantum
df0397b10b [client] imgui: track last rectangles for overlays
This is necessary in case overlays change size. When this happens, we must
damage the larger of the overlays' rectangles this frame and last frame.
This erases the overlay from where it is no longer appears.

In order to do this, we must keep track of the rectangles for every overlay
with no exception. We cannot short-circuit the generation of rectangles if
we run out of buffer space, and we must allocate space for MAX_OVERLAY_RECTS
rectangles for every frame. Otherwise, we will not know where to erase the
overlay if it disappears.
2021-07-23 15:54:18 +10:00
Quantum
334bfeecea [client] egl: correctly handle mixing imgui and non-imgui overlays
This allows the full frame to be damaged when both types are visible.
2021-07-23 15:53:59 +10:00
Quantum
3cf0257f34 [host] windows: do not complain about failed timer destruction at exit
When our window is destroyed, our timers are also destroyed. This causes our
attempt at destruction to fail. Instead, set MessageHWND to NULL in the
WM_DESTROY handler and don't try destroying the timers if the window is gone.
2021-07-23 15:52:45 +10:00
Quantum
6382fc11af [client] ci: run all build combinations to completion
This is desirable because certain uncommon configurations like libdecor or
clang may break, and this shouldn't stop us from seeing if unrelated changes
pass.
2021-07-23 15:52:22 +10:00
Quantum
b26067b0a0 [client] wayland: use new libdecor pkgconfig package name 2021-07-23 15:52:05 +10:00
Quantum
947eac52f6 [client] renderers: treat -1 as full damage and 0 as no overlay
This makes everything consistent.
2021-07-22 18:57:34 +10:00
Quantum
4c60409aaf [host] windows: use WM_CLOSE to signal window destruction
DestroyWindow can only be invoked on the thread that created the window.
All other threads must use WM_CLOSE or another message to signal tell the
window to destroy itself.
2021-07-22 18:55:11 +10:00
Geoffrey McRae
eb5c588af9 [client] overlay: call igEnd before return 2021-07-22 18:38:32 +10:00
Geoffrey McRae
3b6ad957e3 [client] overlay: increment totalRects 2021-07-22 18:38:00 +10:00
Geoffrey McRae
4acbf2e9a0 [client] overlay: rework the interface to avoid possible race conditions 2021-07-22 18:33:50 +10:00
Geoffrey McRae
50f7a1a99c [client] overlay: properly free the graphs before ll free 2021-07-22 18:32:28 +10:00
Quantum
515f08d2da [client] egl: transform overlay damage coordinates
EGL uses bottom-up y-coordinate while we use top-down.
2021-07-22 18:32:18 +10:00
Quantum
58ab77d237 [client] egl: avoid overflowing damage buffer
We allocate 10 rectangles for overlay damage as agreed on Discord.
2021-07-22 18:32:18 +10:00
Geoffrey McRae
fdbdf6f167 [client] app: implement new overlay rendering framework
This change set implements a framework for overlays to be registered
that make use of ImGui. See `overlay/fps` for a simple implementation
example.
2021-07-22 17:27:30 +10:00
Geoffrey McRae
30c4a4786b [client] overlay: cosmetic, fix typo 2021-07-22 14:50:10 +10:00
Geoffrey McRae
a34d3bbab4 [client] overlay: windowRects is not an array of pointers 2021-07-22 14:48:08 +10:00
Geoffrey McRae
2310920e79 [client] overlay: added new interface for overlay windows using ImGui 2021-07-22 14:42:54 +10:00
Quantum
85f34602f4 [client] wayland: do not leak wp_presentation_feedback objects 2021-07-22 13:12:47 +10:00
Quantum
4b016b441c [client] ci: test libdecor build as part of matrix
We source libdecor packages from a PPA.
2021-07-22 13:12:28 +10:00
Quantum
27e3be3778 [client] egl: free desktop damage after rendering 2021-07-22 13:12:07 +10:00
Quantum
4954687a52 [client] ci: remove SDL dependencies and -DENABLE_SDL=ON 2021-07-22 12:04:29 +10:00
Quantum
bb60107a3b [client] wayland: dispatch events through libdecor when using it
Currently, we dispatch the events on the wayland display server ourselves.
This is fine when using the cairo backend of libdecor, as it does the same
thign we do, but other backends may require other things to be dispatched.

This commit lets libdecor dispatch events instead through libdecor_get_fd
and libdecor_dispatch, which should hopefully makes things less sketchy.
2021-07-22 12:03:55 +10:00
Quantum
ed18ead1ff [client] ci: fix clang build
Our code to generate object files from shaders with the linker seems to
depend on GNU ld. More accurately, it works with lld, but we must specify
the correct object format via -m, which is very difficult to detect in a
satisfactory manner. Therefore we simply force use of GNU ld.
2021-07-22 11:38:20 +10:00
Quantum
e58506f1a5 [all] copyright: refresh copyright notice for .nsi and .rc files 2021-07-21 18:19:46 +10:00
Geoffrey McRae
08293c8721 [egl] damage: only update the damage vbo if there was a new frame 2021-07-21 17:29:46 +10:00
Geoffrey McRae
6389a06903 [client] main: let the renderer know if it's rendering a whole new frame
While the renderer can internally track this it would be better to
simply provide this information to the renderer directly so it can make
better decisions on how best to update the screen.
2021-07-21 17:26:48 +10:00
Geoffrey McRae
8cf444ef31 [client] main: sync to the ups if the ups exceeds minFrameTime 2021-07-21 16:56:49 +10:00
Geoffrey McRae
1c8af28f26 Revert "[client] main: increase the ups/fps update rate to once per 100ms"
This reverts commit b877bab48f.
There is no need for this anymore after the prior commit which removed
this faulty implementation
2021-07-21 16:50:49 +10:00
Geoffrey McRae
9b472d62a9 [client] main: remove/fix faulty upsTime code
The implementation was flawed, instead we just update the presentation
time if there was not an early wakeup.
2021-07-21 16:47:37 +10:00
Quantum
f5dfc264ba [host] windows: trick MinGW into not using memcpy from ntdll
MinGW seems to decide at random whether it wants to use memcpy from
mscvrt.dll or ntdll.dll. Currently, on Debian buster, ntdll.dll is chosen,
while on sid, mscvrt.dll is chosen.

This commit declares a new .def file for ntdll containing only the
functions we want to link from ntdll.dll, and generates ntdll.a from it
with dlltool. This way, MinGW will never be tempted to link functions
like memcpy from ntdll.dll.
2021-07-21 15:45:59 +10:00