wayland: implement linux-drm-syncobj-v1
This commit is contained in:
parent
816315170f
commit
aaf73d6fdc
29 changed files with 1507 additions and 35 deletions
|
|
@ -14,7 +14,11 @@ use {
|
|||
renderer::{framebuffer::Framebuffer, image::Image},
|
||||
GfxGlState, RenderError, Texture,
|
||||
},
|
||||
video::{dmabuf::DmaBuf, drm::Drm, gbm::GbmDevice},
|
||||
video::{
|
||||
dmabuf::DmaBuf,
|
||||
drm::{sync_obj::SyncObjCtx, Drm},
|
||||
gbm::GbmDevice,
|
||||
},
|
||||
},
|
||||
ahash::AHashMap,
|
||||
jay_config::video::GfxApi,
|
||||
|
|
@ -53,6 +57,7 @@ pub(crate) struct TexProgs {
|
|||
pub(in crate::gfx_apis::gl) struct GlRenderContext {
|
||||
pub(crate) ctx: Rc<EglContext>,
|
||||
pub gbm: Rc<GbmDevice>,
|
||||
pub sync_ctx: Rc<SyncObjCtx>,
|
||||
|
||||
pub(crate) render_node: Rc<CString>,
|
||||
|
||||
|
|
@ -128,6 +133,7 @@ impl GlRenderContext {
|
|||
Ok(Self {
|
||||
ctx: ctx.clone(),
|
||||
gbm: ctx.dpy.gbm.clone(),
|
||||
sync_ctx: Rc::new(SyncObjCtx::new(ctx.dpy.gbm.drm.fd())),
|
||||
|
||||
render_node: node.clone(),
|
||||
|
||||
|
|
@ -271,4 +277,8 @@ impl GfxContext for GlRenderContext {
|
|||
})?;
|
||||
Ok(Rc::new(Framebuffer { ctx: self, gl: fb }))
|
||||
}
|
||||
|
||||
fn sync_obj_ctx(&self) -> &Rc<SyncObjCtx> {
|
||||
&self.sync_ctx
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue