Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit 9a93514

Browse files
authored
Merge pull request #418 from fewtarius/3.6
Revert gamescope update.
2 parents bf406a1 + 85f5dad commit 9a93514

3 files changed

Lines changed: 120 additions & 2 deletions

File tree

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp
2+
index d7498e5..d1800a8 100644
3+
--- a/src/steamcompmgr.cpp
4+
+++ b/src/steamcompmgr.cpp
5+
@@ -3271,7 +3271,7 @@ found:;
6+
if ( window_has_commits( focus ) )
7+
out->focusWindow = focus;
8+
else
9+
- focus->outdatedInteractiveFocus = true;
10+
+ out->outdatedInteractiveFocus = true;
11+
12+
// Always update X's idea of focus, but still dirty
13+
// the it being outdated so we can resolve that globally later.
14+
@@ -5995,28 +5995,37 @@ bool handle_done_commit( steamcompmgr_win_t *w, xwayland_ctx_t *ctx, uint64_t co
15+
// Window just got a new available commit, determine if that's worth a repaint
16+
17+
// If this is an overlay that we're presenting, repaint
18+
- if ( w == global_focus.overlayWindow && w->opacity != TRANSLUCENT )
19+
+ if ( gameFocused )
20+
{
21+
- hasRepaintNonBasePlane = true;
22+
- }
23+
+ if ( w == global_focus.overlayWindow && w->opacity != TRANSLUCENT )
24+
+ {
25+
+ hasRepaintNonBasePlane = true;
26+
+ }
27+
28+
- if ( w == global_focus.notificationWindow && w->opacity != TRANSLUCENT )
29+
- {
30+
- hasRepaintNonBasePlane = true;
31+
+ if ( w == global_focus.notificationWindow && w->opacity != TRANSLUCENT )
32+
+ {
33+
+ hasRepaintNonBasePlane = true;
34+
+ }
35+
}
36+
-
37+
- // If this is an external overlay, repaint
38+
- if ( w == global_focus.externalOverlayWindow && w->opacity != TRANSLUCENT )
39+
+ if ( ctx )
40+
{
41+
- hasRepaintNonBasePlane = true;
42+
+ if ( ctx->focus.outdatedInteractiveFocus )
43+
+ {
44+
+ MakeFocusDirty();
45+
+ ctx->focus.outdatedInteractiveFocus = false;
46+
+ }
47+
}
48+
-
49+
- if ( w->outdatedInteractiveFocus )
50+
+ if ( global_focus.outdatedInteractiveFocus )
51+
{
52+
MakeFocusDirty();
53+
- w->outdatedInteractiveFocus = false;
54+
- }
55+
+ global_focus.outdatedInteractiveFocus = false;
56+
57+
+ // If this is an external overlay, repaint
58+
+ if ( w == global_focus.externalOverlayWindow && w->opacity != TRANSLUCENT )
59+
+ {
60+
+ hasRepaintNonBasePlane = true;
61+
+ }
62+
+ }
63+
// If this is the main plane, repaint
64+
if ( w == global_focus.focusWindow && !w->isSteamStreamingClient )
65+
{
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
From fa0832f616a1060a3311f9b41368590169ba4872 Mon Sep 17 00:00:00 2001
2+
From: nullprop <git@nullprop.sh>
3+
Date: Wed, 20 Nov 2024 18:15:30 +0200
4+
Subject: [PATCH] rendervulkan: Fix initializing drm formats
5+
6+
Gather the supported DRM formats even if backend doesn't use modifiers.
7+
---
8+
src/rendervulkan.cpp | 8 ++++----
9+
1 file changed, 4 insertions(+), 4 deletions(-)
10+
11+
diff --git a/src/rendervulkan.cpp b/src/rendervulkan.cpp
12+
index 54d7608dd2..d566bbd123 100644
13+
--- a/src/rendervulkan.cpp
14+
+++ b/src/rendervulkan.cpp
15+
@@ -2059,7 +2059,7 @@ bool CVulkanTexture::BInit( uint32_t width, uint32_t height, uint32_t depth, uin
16+
assert( drmFormat == pDMA->format );
17+
}
18+
19+
- if ( GetBackend()->UsesModifiers() && g_device.supportsModifiers() && pDMA && pDMA->modifier != DRM_FORMAT_MOD_INVALID )
20+
+ if ( g_device.supportsModifiers() && pDMA && pDMA->modifier != DRM_FORMAT_MOD_INVALID )
21+
{
22+
VkExternalImageFormatProperties externalImageProperties = {
23+
.sType = VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES,
24+
@@ -2781,14 +2781,14 @@ bool vulkan_init_format(VkFormat format, uint32_t drmFormat)
25+
uint64_t modifier = modifierProps[j].drmFormatModifier;
26+
27+
if ( !is_image_format_modifier_supported( format, drmFormat, modifier ) )
28+
- continue;
29+
+ continue;
30+
31+
if ( ( modifierProps[j].drmFormatModifierTilingFeatures & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT ) == 0 )
32+
{
33+
continue;
34+
}
35+
36+
- if ( !gamescope::Algorithm::Contains( GetBackend()->GetSupportedModifiers( drmFormat ), modifier ) )
37+
+ if ( GetBackend()->UsesModifiers() && !gamescope::Algorithm::Contains( GetBackend()->GetSupportedModifiers( drmFormat ), modifier ) )
38+
continue;
39+
40+
wlr_drm_format_set_add( &sampledDRMFormats, drmFormat, modifier );
41+
@@ -2799,7 +2799,7 @@ bool vulkan_init_format(VkFormat format, uint32_t drmFormat)
42+
}
43+
else
44+
{
45+
- if ( !GetBackend()->SupportsFormat( drmFormat ) )
46+
+ if ( GetBackend()->UsesModifiers() && !GetBackend()->SupportsFormat( drmFormat ) )
47+
return false;
48+
49+
wlr_drm_format_set_add( &sampledDRMFormats, drmFormat, DRM_FORMAT_MOD_INVALID );

PKGBUILD/gamescope/PKGBUILD

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Maintainer: Pierre-Loup A. Griffais <pgriffais@valvesoftware.com>
22

33
pkgname=gamescope
4-
_srctag=3.16.3
4+
_srctag=3.16.2
55
pkgver=${_srctag//-/.}.SteamFork
6-
pkgrel=1
6+
pkgrel=5
77
pkgdesc="gaming shell based on Xwayland, powered by Vulkan and DRM"
88
arch=(x86_64)
99
url="https://github.com/ValveSoftware/gamescope"
@@ -25,6 +25,8 @@ source=("gamescope-session"
2525
# FIXME Upstream gamescope is just selecting master branch at build time, so we are arbitrarily snapshotting a
2626
# revision when bumping the version here such that the build is reproducible.
2727
"git+https://github.com/nothings/stb.git#commit=af1a5bc352164740c1cc1354942b1c6b72eacb8a"
28+
0001-revert-299bc34.patch
29+
0002-fix-initializing-drm-formats.patch
2830
)
2931
sha256sums=('3030b7320daea3dd096dec8aed56950507f166eb358944eefc00545fa8c13771'
3032
'fe515fce8f151a6c03a89e043044bfddf8cd6ee89027d2cfbcf6f6706c78ca76'
@@ -39,6 +41,8 @@ sha256sums=('3030b7320daea3dd096dec8aed56950507f166eb358944eefc00545fa8c13771'
3941
'SKIP'
4042
'SKIP'
4143
'SKIP'
44+
'a550ef98fd55e142d2bca9f9fe893172bb9140edfc6df232698324c9d5e4625c' # 0001-revert-299bc34.patch
45+
'31d86f1ee58288d3fe7477dd0dfd23be89b1568b8e893d39ce30642785991d7a' # 0002-fix-initializing-drm-formats.patch
4246
)
4347

4448
install=gamescope.install

0 commit comments

Comments
 (0)