1
0
Fork 0
forked from wry/wry

vulkan: make async transfers generic over upload/download

This commit is contained in:
Julian Orth 2024-10-06 13:23:10 +02:00
parent 59f06dc208
commit 61c5ebb062
8 changed files with 148 additions and 63 deletions

View file

@ -3,7 +3,7 @@ use {
format::Format,
gfx_api::{
AsyncShmGfxTexture, AsyncShmGfxTextureCallback, GfxError, GfxStagingBuffer, GfxTexture,
PendingShmUpload, ShmGfxTexture, ShmMemory,
PendingShmTransfer, ShmGfxTexture, ShmMemory,
},
gfx_apis::gl::{
gl::texture::GlTexture,
@ -104,7 +104,7 @@ impl AsyncShmGfxTexture for Texture {
_callback: Rc<dyn AsyncShmGfxTextureCallback>,
mem: Rc<dyn ShmMemory>,
_damage: Region,
) -> Result<Option<PendingShmUpload>, GfxError> {
) -> Result<Option<PendingShmTransfer>, GfxError> {
let mut res = Ok(());
mem.access(&mut |data| {
res = self.clone().sync_upload(data, Region::default());