Files
DroidDeck/tools/gamescope/patches/0127-shm-buffers-upload-every-commit.patch
T
The412BannerandDersim Abbas 9035dd1dc2 Mali (Venus): David Cimo's Venus route sources and recipes
From DavidCimo/droiddeck-mali, branch mali-venus @ 4f838891 (prototype 13; his 12 commits on top
of DroidDeck 0.3.1, GPL-3.0), by David Cimo:
- tools/venus: Mesa Venus vtest patch (incl. the per-queue submit_mutex fix and the cached-memory
  frame readback), virglrenderer Android patch, the Mali compatibility layer (the six features
  DXVK needs: fill modes, multi-viewport, robustness2, clip/cull distance, BC1-BC7) and his tools.
- tools/linuxfs/preload/venus.c: keeps Zink's kopper under Venus.
- tools/gamescope/patches/0127 (his 0114): shm buffers uploaded on every commit.
- docs/development/mali-venus.md: his design notes.
- tools/venus/ci-build.sh and build-venus.yml: his build recipes as one CI job that packs the
  component (vtest server, ICD, layer) as venus.tzst for the apk.

Co-authored-by: Dersim Abbas <derabb0620@gmail.com>
2026-10-12 23:41:52 -04:00

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;
}