1
0
Fork 0
forked from wry/wry

metal: scan out in more circumstances

This commit is contained in:
Julian Orth 2024-02-23 14:59:42 +01:00
parent 9e3ad38948
commit 58cdfbcb26
10 changed files with 169 additions and 22 deletions

View file

@ -187,6 +187,7 @@ impl GlRenderContext {
ctx: self.clone(),
gl,
resv: Default::default(),
format,
}))
}
}

View file

@ -29,6 +29,7 @@ impl Image {
ctx: self.ctx.clone(),
gl: GlTexture::import_img(&self.ctx.ctx, &self.gl)?,
resv: Default::default(),
format: self.gl.dmabuf.format,
}))
}

View file

@ -17,6 +17,7 @@ pub struct Texture {
pub(in crate::gfx_apis::gl) ctx: Rc<GlRenderContext>,
pub(in crate::gfx_apis::gl) gl: GlTexture,
pub(in crate::gfx_apis::gl) resv: TextureReservations,
pub(in crate::gfx_apis::gl) format: &'static Format,
}
impl Debug for Texture {
@ -68,4 +69,8 @@ impl GfxTexture for Texture {
fn reservations(&self) -> &TextureReservations {
&self.resv
}
fn format(&self) -> &'static Format {
self.format
}
}

View file

@ -587,4 +587,8 @@ impl GfxTexture for VulkanImage {
fn reservations(&self) -> &TextureReservations {
&self.resv
}
fn format(&self) -> &'static Format {
self.format
}
}