mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 06:15:58 +00:00
Main now has its own 0121-0125 (window override walk, host-event wake, commit fences, done at import, HUD frame times), which sorted in between this branch's 0120-0135. The branch's sixteen patches move to 0920-0935 with the same last two digits, so they apply after main's set and stay clear of its next numbers. Applying all 38 to gamescope 3.16.29 in the old order and the new one gives the same tree (checked with patch -p1, as build-in-arch.sh does). PATCHES.md and the one code comment that named 0130 follow the new numbers.
45 lines
1.4 KiB
Diff
45 lines
1.4 KiB
Diff
diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp
|
|
index 18b799e..b803ee0 100644
|
|
--- a/src/steamcompmgr.cpp
|
|
+++ b/src/steamcompmgr.cpp
|
|
@@ -1850,16 +1850,23 @@ import_commit (
|
|
commit->fifo = false;
|
|
}
|
|
|
|
- if ( gamescope::OwningRc<CVulkanTexture> pTexture = s_BufferMemos.LookupVulkanTexture( buf ) )
|
|
+ struct wlr_dmabuf_attributes dmabuf = {0};
|
|
+ const bool bDmabuf = wlr_buffer_get_dmabuf( buf, &dmabuf );
|
|
+
|
|
+ // Only a dma-buf's texture shows the buffer itself. A shm buffer's texture is a copy taken at
|
|
+ // import, and Xwayland without glamor commits the same shm buffers again with new pixels.
|
|
+ if ( bDmabuf )
|
|
{
|
|
- // Going from OwningRc -> Rc now.
|
|
- commit->vulkanTex = pTexture;
|
|
- return commit;
|
|
+ if ( gamescope::OwningRc<CVulkanTexture> pTexture = s_BufferMemos.LookupVulkanTexture( buf ) )
|
|
+ {
|
|
+ // Going from OwningRc -> Rc now.
|
|
+ commit->vulkanTex = pTexture;
|
|
+ return commit;
|
|
+ }
|
|
}
|
|
|
|
- struct wlr_dmabuf_attributes dmabuf = {0};
|
|
gamescope::OwningRc<gamescope::IBackendFb> pBackendFb;
|
|
- if ( wlr_buffer_get_dmabuf( buf, &dmabuf ) )
|
|
+ if ( bDmabuf )
|
|
{
|
|
pBackendFb = GetBackend()->ImportDmabufToBackend( &dmabuf );
|
|
}
|
|
@@ -1873,7 +1880,8 @@ import_commit (
|
|
|
|
commit->vulkanTex = pOwnedTexture;
|
|
|
|
- s_BufferMemos.MemoizeBuffer( buf, std::move( pOwnedTexture ) );
|
|
+ if ( bDmabuf )
|
|
+ s_BufferMemos.MemoizeBuffer( buf, std::move( pOwnedTexture ) );
|
|
|
|
return commit;
|
|
}
|