metal: scan out in more circumstances
This commit is contained in:
parent
9e3ad38948
commit
58cdfbcb26
10 changed files with 169 additions and 22 deletions
|
|
@ -187,6 +187,7 @@ impl GlRenderContext {
|
|||
ctx: self.clone(),
|
||||
gl,
|
||||
resv: Default::default(),
|
||||
format,
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -587,4 +587,8 @@ impl GfxTexture for VulkanImage {
|
|||
fn reservations(&self) -> &TextureReservations {
|
||||
&self.resv
|
||||
}
|
||||
|
||||
fn format(&self) -> &'static Format {
|
||||
self.format
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue