Commit graph

73 commits

Author SHA1 Message Date
Georg Lehmann
d0605bef22 rendervulkan: Add fsr shaders. 2022-01-31 23:41:04 +00:00
Simon Ser
c110515345 build: bump min meson version to 0.58.0
Fixes the following warning:

    ../meson.build:59: WARNING: Project targeting '>=0.55.0' but tried to use feature introduced in '0.58.0': Positional argument to dep.get_variable().
2022-01-31 14:39:34 +01:00
Simon Ser
429107e193 build: set check: false in run_command()
Fixes this warning:

    WARNING: You should add the boolean check kwarg to the run_command call.
             It currently defaults to false,
             but it will default to true in future releases of meson.
             See also: https://github.com/mesonbuild/meson/issues/9300
2022-01-31 14:38:12 +01:00
Tobias Jakobi
1f5c56ba6d build: link to librt since the pipewire code uses shm_open() 2022-01-28 21:19:15 +01:00
Georg Lehmann
83cf86bcc1 build: rebuild shaders when included files changed 2022-01-23 05:10:41 +00:00
Georg Lehmann
5bfc27576d build: preparations for more shaders 2022-01-23 05:10:41 +00:00
Joshua Ashton
905889bc39 build: Disable -Winvalid-offsetof
Clang gets annoyed when doing offsetof for wl_container_of on a
non POD structure -- but there's no virtual inheritance of anything
fancy going on so it should shut up.
2022-01-20 07:11:40 +00:00
Aleksei Bavshin
40b456ac56 Fix build without subprojects
In absence of subprojects meson has no reason to look for a C compiler.
But the protocol files require it to compile and thus the build would
fail with
```
meson.build:114:0: ERROR: No host machine compiler for "gamescope-xwayland-protocol.c"
```
Addres that by adding 'c' language to the project.
2022-01-11 15:31:33 +01:00
FlightlessMango
0b6d3607e4 mangoapp: frametime message queue
Co-Authored-By: Martin Roukala <martin.roukala@mupuf.org>
2022-01-11 00:09:33 +00:00
Simon Ser
8be45451d9 Introduce --generate-drm-mode 2021-11-20 16:01:39 -08:00
Simon Ser
93bd0e6740 build: bump min Meson version to 0.55.0
Otherwise we get this warning:

    WARNING: Project specifies a minimum meson_version '>=0.54.0' but uses features which were added in newer versions:
     * 0.55.0: {'Wrap files with patch_directory'}
2021-10-26 14:32:24 +02:00
Simon Ser
dd45be8eec build: check vulkan-headers dependency 2021-10-19 15:20:45 +02:00
Simon Ser
49da53db55 Implement a subset of input-method-unstable-v2
This allows a Wayland client to send arbitrary UTF-8 text to the
currently focused X11 client. Useful for virtual keyboards.

We generate a keymap on-the-fly suitable for the text to type.
2021-10-08 22:55:01 -07:00
Simon Ser
a5a31d46e3 Upgrade libliftoff 2021-09-30 11:22:40 +02:00
Simon Ser
0d8afd8e51 ci: turn on werror 2021-09-15 19:03:37 +02:00
Simon Ser
1cf749c43b build: ensure wlroots has been built with libinput support 2021-09-15 18:57:44 +02:00
Simon Ser
0687d241a1 build: simplify have_xwayland check 2021-09-15 18:55:39 +02:00
Simon Ser
033695da64 build: disable unused wlroots backends and renderers 2021-09-15 18:44:36 +02:00
Simon Ser
9593ef0bfe build: bump wlroots version requirement 2021-09-15 13:35:42 +02:00
Joshua Ashton
2cea675db0 meta: Use wrap file for STB rather than submodule
Allows us to use this as a Meson subproject which means that recursive cloning doesn't matter (Meson resolves it for subprojects).

Given this subproject doesn't have a meson file, doing subproject() on it would fail, so:
Make a wrap file with an overlay that declares a proper dependency.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-09-11 02:55:21 +02:00
Simon Ser
6557cdce18 build: specify explicit C++ edition 2021-09-10 10:50:41 +02:00
Simon Ser
ef64b60cec Add gamescope-pipewire protocol
Can be tested with:

https://git.sr.ht/~emersion/gamescope-pipewire-demo
2021-08-31 17:06:49 +02:00
Simon Ser
bb3d5a4edb pipewire: initialize stream 2021-08-31 17:06:49 +02:00
Simon Ser
a54b5c9ee0 Introduce basic logging module 2021-08-25 17:20:11 +02:00
Simon Ser
c9af23c750 drm: use drmIsKMS to detect KMS-capable devices 2021-07-20 21:20:34 +02:00
Simon Ser
f021460c90 build: lookup a native glslangValidator executable 2021-07-20 18:56:05 +02:00
Simon Ser
a691f08171 build: remove C from language list 2021-07-20 18:43:09 +02:00
Simon Ser
0c33a70f11 build: stop linking against math 2021-07-20 18:41:16 +02:00
Simon Ser
bfd02dc550 build: whitespace inconsistency fixes 2021-07-20 18:40:09 +02:00
Simon Ser
09980c11fd build: remove duplicate cc assignment 2021-07-20 18:38:24 +02:00
Simon Ser
cf395c765b build: use force_fallback_for
This allows users to more easily control how dependencies are
looked up. By default, a subproject is used, but users can pass
--force_fallback_for=[] to use system deps.
2021-07-20 18:33:51 +02:00
Simon Ser
17ba657dd6 build: cleanup source files indent 2021-07-20 18:25:36 +02:00
Simon Ser
b380f3fbf2 drm: allow to switch refresh rate at runtime
References: https://github.com/Plagman/gamescope/issues/206
2021-07-20 17:53:38 +02:00
Joshua Ashton
e818aec744 Move to combined samplers and rewrite composite shader in GLSL
Cleans up the composite shader significantly as well as it uses
arrays of descriptors/samplers now.

This all gets unrolled as the loop is spec-constant sized.
2021-05-01 16:50:51 -07:00
Simon Ser
6f8e25dc89 Add gamescope-xwayland protocol 2021-04-20 09:13:10 +02:00
Simon Ser
bee939e691 build: force-enable xwayland in wlroots subproject
This should give a better error message if xwayland deps are missing.
2021-04-10 10:23:24 +02:00
Simon Ser
e76d82828b build: update wlroots system dep version 2021-04-08 09:27:10 +02:00
Simon Ser
25a0a75811 build: simplify wlroots xwayland check 2021-04-08 09:26:17 +02:00
Sefa Eyeoglu
72c629638d fix: update libliftoff pkg-config dependency
emersion/libliftoff@470af77869 changed the
name of the pkg-config dependency to libliftoff
2021-02-25 14:59:02 +01:00
Simon Ser
70af2c38f0 Query window PID via XRes
References: https://github.com/Plagman/gamescope/issues/17
2021-02-12 22:16:04 +01:00
Jan Beich
1488ccc923 build: abort if wlroots is too old or lacks xwayland
src/wlserver.cpp:28:10: fatal error: 'wlr/xwayland.h' file not found
 #include <wlr/xwayland.h>
          ^~~~~~~~~~~~~~~~
src/drm.cpp:666:9: error: use of undeclared identifier 'wlr_buffer_lock'; did you mean 'wlr_buffer_ref'?
                buf = wlr_buffer_lock( buf );
                      ^~~~~~~~~~~~~~~
                      wlr_buffer_ref
/usr/include/wlr/types/wlr_buffer.h:55:20: note: 'wlr_buffer_ref' declared here
struct wlr_buffer *wlr_buffer_ref(struct wlr_buffer *buffer);
                   ^
src/drm.cpp:691:3: error: use of undeclared identifier 'wlr_buffer_unlock'; did you mean 'wlr_buffer_unref'?
                wlr_buffer_unlock( fb->buf );
                ^~~~~~~~~~~~~~~~~
                wlr_buffer_unref
/usr/include/wlr/types/wlr_buffer.h:60:6: note: 'wlr_buffer_unref' declared here
void wlr_buffer_unref(struct wlr_buffer *buffer);
     ^
src/steamcompmgr.cpp:593:2: error: use of undeclared identifier 'wlr_buffer_unlock'; did you mean 'wlr_buffer_unref'?
        wlr_buffer_unlock( commit.buf );
        ^~~~~~~~~~~~~~~~~
        wlr_buffer_unref
/usr/include/wlr/types/wlr_buffer.h:60:6: note: 'wlr_buffer_unref' declared here
void wlr_buffer_unref(struct wlr_buffer *buffer);
     ^
src/steamcompmgr.cpp:2491:4: error: use of undeclared identifier 'wlr_buffer_unlock'; did you mean 'wlr_buffer_unref'?
                        wlr_buffer_unlock( buf );
                        ^~~~~~~~~~~~~~~~~
                        wlr_buffer_unref
/usr/include/wlr/types/wlr_buffer.h:60:6: note: 'wlr_buffer_unref' declared here
void wlr_buffer_unref(struct wlr_buffer *buffer);
     ^
src/steamcompmgr.cpp:2507:46: error: member access into incomplete type 'struct wlr_client_buffer'
                        result = wlr_texture_to_dmabuf( client_buf->texture, &dmabuf );
                                                                  ^
src/steamcompmgr.cpp:2506:11: note: forward declaration of 'wlr_client_buffer'
                        struct wlr_client_buffer *client_buf = (struct wlr_client_buffer *) buf;
                               ^
2020-10-21 17:40:40 +02:00
Jan Beich
50093f7ee6 build: rename _dep vars to match pkg-config name
- wlroots_static_dep is wrong when dynamically linking system wlroots
- liftoff_dep contains a typo and `lib` prefix not present in pkg-config
2020-10-21 17:40:40 +02:00
Jan Beich
fc8c8fcfa8 build: fall back to system system deps without subprojects
`git archive` and `git clone` don't include submodules by default.
Downstream with up-to-date wlroots package may want to skip
populating subprojects/wlroots.
2020-10-21 17:40:40 +02:00
Jan Beich
6250685f0a build: drop unused dependencies per -Wl,--as-needed
- pixman and libinput are only used by wlroots
- xfixes is used directly, not just via xdamage
2020-10-20 23:53:54 +02:00
Pierre-Loup A. Griffais
22f20882b9 rendervulkan: use realtime priority async compute if CAP_SYS_NICE is set.
Fixes: https://github.com/Plagman/gamescope/issues/20.
2020-09-01 23:25:53 -07:00
Pierre-Loup A. Griffais
79cb130dcc sdlwindow: put all the SDL I/O code in the same spot. 2020-09-01 23:00:06 -07:00
Simon Ser
bae255ee1a
Get rid of C_SIDE
wlroots headers can mostly be included with extern "C" blocks. Two
exceptions are the use of `static` for array args and `class` as a
struct field. These can be #define'ed to avoid C++ build errors.

This allows the whole project to be built as a single C++ codebase,
without having to maintain hybrid header files.
2020-06-11 12:44:36 +02:00
Simon Ser
51259bba1c
Silence -Wunused-parameter for C code too 2020-05-15 10:20:59 +02:00
Simon Ser
b84750e775
Enable more warnings
Makes it easier to spot mistakes.
2020-05-15 10:03:55 +02:00
Simon Ser
fc72bda2cf Build libliftoff as a static library 2020-05-08 22:17:07 +02:00