Update smithay, and adjust to use sync points from blit calls

This commit is contained in:
Ian Douglas Scott 2025-08-20 10:03:51 -07:00 committed by Victoria Brekenfeld
parent 7f7ab8bcbe
commit f0e0084608
4 changed files with 10 additions and 6 deletions

2
Cargo.lock generated
View file

@ -4792,7 +4792,7 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
[[package]]
name = "smithay"
version = "0.7.0"
source = "git+https://github.com/smithay/smithay.git?rev=ae1faae#ae1faaeb71e2664f4ddb3db7423a5ec746a6a51d"
source = "git+https://github.com/smithay/smithay.git?rev=20d2dac#20d2dacd71394b5f96f6ace0a70a6f20dc62c0c6"
dependencies = [
"aliasable",
"appendlist",

View file

@ -146,4 +146,4 @@ cosmic-protocols = { git = "https://github.com/pop-os//cosmic-protocols", branch
cosmic-client-toolkit = { git = "https://github.com/pop-os//cosmic-protocols", branch = "main" }
[patch.crates-io]
smithay = { git = "https://github.com/smithay/smithay.git", rev = "ae1faae" }
smithay = { git = "https://github.com/smithay/smithay.git", rev = "20d2dac" }

View file

@ -1729,7 +1729,8 @@ fn send_screencopy_result<'a>(
if let Some(fb) = fb.as_mut() {
for rect in adjusted.iter().copied() {
renderer
// TODO: On Vulkan, may need to combine sync points instead of just using latest?
sync = renderer
.blit(&mut tex_fb, fb, rect, rect, TextureFilter::Linear)
.map_err(
RenderError::<<GlMultiRenderer as RendererSuper>::Error>::Rendering,

View file

@ -1379,14 +1379,17 @@ where
elements.truncate(old_len);
}
let mut sync = SyncPoint::default();
if let (Some(damage), _) = &res {
// TODO: On Vulkan, may need to combine sync points instead of just using latest?
let blit_to_buffer =
|renderer: &mut R, blit_from: &mut R::Framebuffer<'_>| {
if let Ok(dmabuf) = get_dmabuf(buffer) {
let mut dmabuf_clone = dmabuf.clone();
let mut fb = renderer.bind(&mut dmabuf_clone)?;
for rect in damage.iter() {
renderer.blit(
sync = renderer.blit(
blit_from,
&mut fb,
*rect,
@ -1398,7 +1401,7 @@ where
let fb = offscreen
.expect("shm buffers should have offscreen target");
for rect in damage.iter() {
renderer.blit(
sync = renderer.blit(
blit_from,
fb,
*rect,
@ -1425,7 +1428,7 @@ where
Ok(RenderOutputResult {
damage: res.0,
sync: SyncPoint::default(),
sync,
states: res.1,
})
},