vulkan: make async transfers generic over upload/download
This commit is contained in:
parent
59f06dc208
commit
61c5ebb062
8 changed files with 148 additions and 63 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue