Commit graph

52 commits

Author SHA1 Message Date
Joshua Ashton
b5bb169889 drm, rendervulkan: Hook up composite ST2084 output 2022-12-30 03:21:55 +00:00
Joshua Ashton
dba8480d18 main: Set GamescopeUpscaleFilter::LINEAR to 0 2022-11-15 20:01:51 +00:00
Joshua Ashton
c20e14ee74 steamcompmgr: Force Steam to use FIT + LINEAR 2022-10-28 02:57:00 +01:00
Joshua Ashton
a7203603fe steamcompmgr: Add STRETCH scaling mode 2022-10-28 02:20:19 +01:00
Joshua Ashton
f302a23069 steamcompmgr: Add FILL upscaler 2022-10-28 02:18:11 +01:00
Joshua Ashton
f5f0fc8c24 steamcompmgr: Rename SMART_FIT to AUTO 2022-10-28 02:02:29 +01:00
Joshua Ashton
c9c0044250 steamcompmgr: Add regular FIT as an option 2022-10-28 02:02:06 +01:00
Joshua Ashton
4a4178075e steamcompmgr: Refactor scaling
Split out scalers and scaling filters.
2022-10-28 02:01:15 +01:00
Clément Guérin
f999685153 add --prefer-vk-device option
allows selecting a preferred Vulkan device for compositing, for example
to use the iGPU over the dGPU.

should help #498.
2022-07-14 17:26:35 +01:00
sad-goldfish
e4892543a0 Add realtime flag for SCHED_RR
Use sched_get_priority_min for priority

Accommodates other unixes with odd minimum priorities.

Manually handle save/restore of scheduling.

Add space. (formatting)

Exit on failure to get scheduler parameters.

Add missing braces.

Copy and edit existing sched_parm rather than new.

May be relevant on some exotic unixes.
2022-05-25 19:01:18 +02:00
Eric
a515153a93 rendervulkan: Add support for NVIDIA image scaling 2022-05-18 01:41:01 +00:00
James Jones
e24348da39 main: Raise the file descriptor limit at launch
Gamescope currently uses 1024 VkFence objects to
synchronize CPU and GPU work. The NVIDIA Vulkan
driver currently creates a file descriptor for
each VKFence object created. To ensure there are
sufficient file descriptors, attempt to raise the
limit to 2048 file descriptors if it is currently
lower than that. Failure to raise the limit for
any reason is non-fatal, as the increased limit
is not required on some drivers.
2022-05-06 22:45:44 +02:00
Georg Lehmann
a9dac11f15 main: FSR sharpness setting. 2022-01-31 23:41:04 +00:00
Georg Lehmann
ead46a2db0 main: Add FSR command line option and shortcut. 2022-01-31 23:41:04 +00:00
Joshua Ashton
205cfbdf87 wlserver: Add a mode for multiple xwaylands
Adds --xwayland-count to control the number of xwaylands.
2022-01-20 07:11:40 +00:00
Joshua Ashton
ca8fd6552a wlserver: Move commit queues to per-xwayland server, rather than global 2022-01-20 07:11:40 +00:00
Simon Ser
2eb520bc17 Fix BIsNested return type 2021-09-14 18:36:27 +02:00
Simon Ser
13f792ab15 Add long options
This will allow us to introduce new long options which don't have
any short option equivalent.
2021-09-01 14:51:23 +02:00
Simon Ser
f36d436a71 Enable getopt error messages
These print something like "invalid option 'foo'". Previously
disabled because of the split main/steamcompmgr option handling.
2021-09-01 14:35:47 +02:00
Simon Ser
82ef0372d5 Introduce thread-safe take_screenshot 2021-08-31 17:06:49 +02:00
Joshua Ashton
c41dd74ef5 Add integer scale option 2021-08-30 17:15:57 -07:00
Joshua Ashton
5422061746 Add a max scale parameter 2021-08-30 17:15:57 -07:00
Simon Ser
5b776be6d2 Move the run global to main.hpp
It's used by both wlserver and steamcompmgr.
2021-08-10 12:05:49 +02:00
Simon Ser
4bc7b4952b Remove unnecessary global variables 2021-08-03 15:46:24 +02:00
Simon Ser
e5e0ebf5a4 drm: allow selecting a connector via -O
References: https://github.com/Plagman/gamescope/issues/211
2021-07-22 16:50:16 +02:00
Simon Ser
127b1b510e drm: sort modes
This allows the best mode to be selected even if a constraint is
specified (such as the width or height).
2021-07-20 16:58:12 +02:00
Simon Ser
a22e9d3c0d Simplify g_nSubCommandArg logic
getopt() will eat the "--" separator if there's one. Rely on the
value of optind after the getopt() loop finishes to figure out
whether a command has been specified.
2021-07-20 13:28:24 +02:00
Simon Ser
cb0eace6d1 Use libliftoff by default
Remove the -l option. Introduce a -L option to disable libliftoff.
Don't use the same option to avoid muscle memory issues.
2021-04-22 21:55:22 +02:00
Simon Ser
3b9f845dad Unify getopt string
De-duplicate its definition, so that we don't forget to update a
string when we update the other.
2021-04-21 14:38:54 +02:00
Pierre-Loup A. Griffais
405f18b08d sdlwindow: add alternate refresh rate option when out-of-focus. 2020-09-15 14:57:11 -07:00
Oschowa
5954361cc3 Add an option to start in fullscreen if nested 2020-09-02 23:59:52 +02:00
Pierre-Loup A. Griffais
e1d4937310 Different method of bumping priority.
Calling nice() in the very beginning ensures that Mesa worker threads in
gamescope and Xwayland can properly reduce their priority without us stomping
it later.

Move away from posix_spawn, since there's no easy way (that seems to work)
to keep priority normal for the spawned process and get the right behaviour
for gamescope and Xwayland.

The intermediate fork() lets us simplify the logic for LD_PRELOAD rewriting.
2020-09-02 11:06:30 -07:00
Pierre-Loup A. Griffais
60ecb0f1f8 steamcompmgr: also set thread priorities for ourselves and Xwayland.
Avoid setting it for our children processes, by spawning them in a new
thread group and setting group-wide priority, which also conveniently
gets Xwayland.
2020-09-02 00:27:18 -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
c2d9b23d08 Hold buffers till steamcompmgr processes them 2020-09-01 12:36:35 -07:00
Pierre-Loup A. Griffais
df38bea747 Implement screenshot support.
Mostly in rendervulkan. Super+S or SIGUSR2.
2020-08-29 21:33:14 -07:00
Pierre-Loup A. Griffais
69bcb1b339 Revert "Hold buffers till steamcompmgr processes them"
This reverts commit 98e263c37d.
2020-07-24 15:01:33 -07:00
Simon Ser
98e263c37d Hold buffers till steamcompmgr processes them 2020-07-23 22:26:06 +02: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
1e82803574
Improve initOutput error handling
Bail out on DRM error.
2020-05-12 15:07:52 +02: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
4079d0c785 steamcompmgr: rework a couple of things to plan for decoupling paints
- Add a commit wait thread that just waits for the work associated with
   an in-bound dma-buff is done. We'd like to be getting a fence directly
   from Wayland, but in the absence of that we'll make our own by tapping
   into implicit-sync, DX11-style. gpuvis logging of the outcome of the
   waits in the thread are consistent with the end of GPU work.

 - Rework wayland commit handoff between wlserver and steamcompmgr to let
   steamcompmgr have full access to the commit queue, letting it remove
   elements in the middle and still keep going, compared to the previous
   interface. This lets steamcompmgr get one commit per window per loop,
   for now. We should be able to kick off waits and ref/unref resources
   for all pending commits soon, with some work on the accounting first.

This should also fix an issue introduced recently where the overlay
could get really starved in embedded mode, as we were just getting
the first commit in the queue for a single frame.
2020-01-23 00:52:17 -08:00
Pierre-Loup A. Griffais
7b2220003c Let it take a command to run in its DISPLAY after "--". 2020-01-18 17:14:49 -08:00
Pierre-Loup A. Griffais
90fa0770e8 nested: plumb some more output options.
Output window size, scaling filter, border.

TODO: make output dynamically resizeable, and some settings reloadable.
2020-01-18 16:05:19 -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
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
2be0bdbcbb Start of Vulkan compute rendering code. Getting FBIDs (glxgears still OK). 2020-01-01 15:30:37 +09:00
Pierre-Loup A. Griffais
bc7207c69d More DRM flipping/importing, getting half of glxgears on screen.
Lower half is getting eaten by something, presumably underflow as it's black.

Make EGL and DRM coexist; make ensure_win_resources safe to call regardless
of what resources we want, so outer code doesn't have to care.
2020-01-01 15:30:37 +09:00
Pierre-Loup A. Griffais
77d0e72c69 Make commandline coexist across both sides, plumb nested size control. 2020-01-01 15:30:37 +09:00
Pierre-Loup A. Griffais
95e132179d Chop off some more concepts that were higher-level than I thought initially. 2020-01-01 15:30:37 +09:00