1
0
Fork 0
forked from wry/wry

metal: track per-framebuffer damage

This commit is contained in:
Julian Orth 2025-02-18 16:43:30 +01:00
parent f80ac20220
commit 07fb198eb4
17 changed files with 334 additions and 151 deletions

View file

@ -99,12 +99,13 @@ impl GfxFramebuffer for Framebuffer {
(self.gl.width, self.gl.height)
}
fn render(
fn render_with_region(
&self,
acquire_sync: AcquireSync,
_release_sync: ReleaseSync,
ops: &[GfxApiOpt],
clear: Option<&Color>,
_region: &Region,
) -> Result<Option<SyncFile>, GfxError> {
self.render(acquire_sync, ops, clear).map_err(|e| e.into())
}

View file

@ -530,15 +530,16 @@ impl GfxFramebuffer for VulkanImage {
(self.width as _, self.height as _)
}
fn render(
fn render_with_region(
&self,
acquire_sync: AcquireSync,
release_sync: ReleaseSync,
ops: &[GfxApiOpt],
clear: Option<&Color>,
region: &Region,
) -> Result<Option<SyncFile>, GfxError> {
self.renderer
.execute(self, acquire_sync, release_sync, ops, clear)
.execute(self, acquire_sync, release_sync, ops, clear, region)
.map_err(|e| e.into())
}

View file

@ -27,6 +27,7 @@ use {
VulkanError,
},
io_uring::IoUring,
rect::Region,
theme::Color,
utils::{copyhashmap::CopyHashMap, errorfmt::ErrorFmt, numcell::NumCell, stack::Stack},
video::dmabuf::{dma_buf_export_sync_file, DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE},
@ -965,6 +966,7 @@ impl VulkanRenderer {
fb_release_sync: ReleaseSync,
opts: &[GfxApiOpt],
clear: Option<&Color>,
_region: &Region,
) -> Result<Option<SyncFile>, VulkanError> {
zone!("execute");
let res = self.try_execute(fb, fb_acquire_sync, fb_release_sync, opts, clear);