vulkan: implement software rendering
This commit is contained in:
parent
bb29303c98
commit
0a5ee8fa36
10 changed files with 140 additions and 31 deletions
|
|
@ -102,12 +102,15 @@ impl GlRenderContext {
|
|||
self.ctx.reset_status()
|
||||
}
|
||||
|
||||
pub(in crate::gfx_apis::gl) fn from_drm_device(drm: &Drm) -> Result<Self, RenderError> {
|
||||
pub(in crate::gfx_apis::gl) fn from_drm_device(
|
||||
drm: &Drm,
|
||||
software: bool,
|
||||
) -> Result<Self, RenderError> {
|
||||
let node = drm
|
||||
.get_render_node()?
|
||||
.ok_or(RenderError::NoRenderNode)
|
||||
.map(Rc::new)?;
|
||||
let dpy = EglDisplay::create(drm)?;
|
||||
let dpy = EglDisplay::create(drm, software)?;
|
||||
if !dpy.formats.contains_key(&XRGB8888.drm) {
|
||||
return Err(RenderError::XRGB888);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue