Commit graph

38 commits

Author SHA1 Message Date
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
Simon Ser
267036754c Build wlroots as a static subproject 2020-05-08 22:17:07 +02:00
Oschowa
2a74683c11 Use build in glslangValidator functionally to generate shader include
file.
This removes the xxd dependency.
2020-01-28 21:30:20 +01:00
Pierre-Loup A. Griffais
4ca73da9f6 vblankmanager: initial system to let steamcompmgr know when to repaint
For now just mark one repaint per refresh interval without any particular
alignment, as that can be hard to get in nested. We'll use the display
timing extensions for that later.

We'll have it align properly in embedded mode soon.
2020-01-26 14:59:51 -08:00
Pierre-Loup A. Griffais
1830b53c2e steamcompmgr.cpp: rise 2020-01-22 21:50:01 -08:00
Pierre-Loup A. Griffais
3ca59feabd inputsdl: grab cursor when focused, send mouse input through X.
This more or less makes everything pretty playable.
2020-01-18 20:37:11 -08:00
Pierre-Loup A. Griffais
e1c4298d2a Rename project and executable to gamescope.
We're a superset of steamcompmgr now, but have a wider scope, so new
name to reflect it.
2020-01-14 17:35:36 -08:00
Pierre-Loup A. Griffais
6b3e2ddf68 DRM: multi-plane support via libliftoff.
Import libliftoff as subproject and plumb our planes through it.

Wait for a flip to complete immediately after queuing it for now.

Also immediately wait for cursor image uploads, as we don't have to
do Vulkan rendering anymore after queuing an upload.

Cursor shows up with format hack, but is badly corrupt. We might need
to use a DRM dumb_fb rather than going through the same Vulkan image.

Alpha bits of surfaces are ignored again, need to make Steam select
an ARGB visual for overlay windows, probably.

Setting up the "alpha" plane property somehow makes overlays not
show up at all despite liftoff happily letting us go with scanout.
2020-01-05 22:19:04 -08:00
Pierre-Loup A. Griffais
d357278b98 Add SDL input handling in the nested case, plumb basic mouse stuff.
Relative mouse broken right now.
2020-01-02 19:26:53 -08:00
Pierre-Loup A. Griffais
c70e71d1e2 I think I've come to terms with not building wlr stuff as C++.
Might as well clean up some of the initial madness.
2020-01-01 15:30:38 +09:00
Roman Gilg
bc042c70f5 build: do install executable
In order to launch the binary with for example Mesa being installed not into
the regular /usr prefix but into something like /opt the binary needs to be
launched from the install directory and not only directly from the build
directory.

So actually do install the executable.
2020-01-01 15:30:38 +09:00
Pierre-Loup A. Griffais
30d8582b62 Ding dong the witch is dead! 2020-01-01 15:30:38 +09:00
Pierre-Loup A. Griffais
445844e83f Bas rightfully points out the system wlroots dep isn't needed anymore. 2020-01-01 15:30:38 +09:00
Pierre-Loup A. Griffais
bfd02982ab Kill EGL with fire, rest of GL will follow shortly.
Working nested Vulkan path now using surface from SDL2 window.

For some definition of working, tile corruption there too.
2020-01-01 15:30:37 +09:00
Pierre-Loup A. Griffais
e61b20710e Enough Vulkan stuff to render to an image and flip it on screen.
No texturing yet, that's next after some surgery on the lump of code.
2020-01-01 15:30:37 +09:00
Pierre-Loup A. Griffais
2be0bdbcbb Start of Vulkan compute rendering code. Getting FBIDs (glxgears still OK). 2020-01-01 15:30:37 +09:00
Pierre-Loup A. Griffais
df5244f547 Keep track of in-flight flips in DRM-land to defer frees of fbids if needed.
This makes output sane now for Xwayland buffers.
2020-01-01 15:30:37 +09:00
Pierre-Loup A. Griffais
67c5affe47 Start of some DRM plumbing, make it work again outside of X. 2020-01-01 15:30:37 +09:00
Pierre-Loup A. Griffais
2bdbd01902 Some cleanup, 2020-01-01 15:30:37 +09:00
Pierre-Loup A. Griffais
11d50c1618 CHOP 2020-01-01 15:30:37 +09:00
Pierre-Loup A. Griffais
7e9bc2a6a0 Use patched static wlroots as a submodule and subproject.
That should help setting it up on a machine that might want to use normal
wlroots for other things. Resolve a GL symbol conflict now that we're
colocated with wlroots' dynamic loading code.
2020-01-01 15:30:37 +09:00
Pierre-Loup A. Griffais
b39c5a67d4 Hook up steamcompmgr output pipeline.
Get steamcompmgr's GL context from EGL and rip out GLX, as we need EGL to
import dma-bufs.

When new buffers are committed to surfaces, push their information to
steamcompmgr (without any feedback for now, fire-and-forget).

Can render games now.
2020-01-01 15:30:37 +09:00
Pierre-Loup A. Griffais
86efc186c5 Merge with rootston.
Enable C++ for bits of the code, but nothing that includes wlroots as that
doesn't want to build as C++.

Enable SubstructureRedirectMask mode and handle MapRequest for now; this lets
us get the WL_SURFACE_ID ClientMessages.

This uses a build of wlroots that has its internal XWM ripped out.
2020-01-01 15:30:37 +09:00
Pierre-Loup A. Griffais
137f0838e5 Add initial Meson build system, no install target yet. 2020-01-01 15:28:10 +09:00