Repository navigation
gpui_interop 0.1.1
A documentation and CI patch. No API changes.
The dma-buf lifetime contract
WgpuSharedBuffer::submit starts the write; it does not wait for it. The consumer samples the buffer later, on its own submission. Reusing the same export for the next frame while GPUI may still sample it causes intermittent black frames.
Documented in the repository README, the wgpu_dmabuf module docs and the crate docs:
- Keep a ring and present one frame behind the one being rendered, or attach
DmaBufHandle::releaseand wait for it before writing a slot again. - A fixed "reuse after N submissions" rule is a heuristic; a deep consumer queue or a coalesced frame can outlast it.
- GPUI polls a surface's acquire fence for 16 ms and drops the surface on timeout, which presents as a black frame. A frame that runs long is safer presented one frame late.
- Same device does not mean same submission: gate on the release, not on device identity.
- Measured cost of a full-screen overlay: ~2.4 ms at 1280x720 with 4x MSAA (~5-6 ms at 1080p) on an Intel HD 520.
Issue #1 has the reproduction, the measurements and the release-semantics answers.
Fixed
- CI and the release workflow check the
bite-gpuicore out beside the workspace, so path dependencies resolve on a clean runner. - The Windows cross-device test is gated on the
gpuifeature.
Install
gpui_interop = "0.1.1"Docs: https://docs.rs/gpui_interop/0.1.1
Full changelog: CHANGELOG.md
Full diff: v0.1.0...v0.1.1