backend: fix bug that mistakeningly selected wrong render device
This commit is contained in:
parent
381c5f8478
commit
149801520a
3 changed files with 10 additions and 0 deletions
|
|
@ -585,6 +585,9 @@ pub trait BackendDrmDevice {
|
|||
fn direct_scanout_enabled(&self) -> bool {
|
||||
false
|
||||
}
|
||||
fn gfx_fast_ram_access(&self) -> bool {
|
||||
false
|
||||
}
|
||||
fn create_lease(
|
||||
self: Rc<Self>,
|
||||
lessee: Rc<dyn BackendDrmLessee>,
|
||||
|
|
|
|||
|
|
@ -189,6 +189,10 @@ impl BackendDrmDevice for MetalDrmDevice {
|
|||
.unwrap_or(self.backend.state.direct_scanout_enabled.get())
|
||||
}
|
||||
|
||||
fn gfx_fast_ram_access(&self) -> bool {
|
||||
self.ctx.get().gfx.fast_ram_access()
|
||||
}
|
||||
|
||||
fn create_lease(
|
||||
self: Rc<Self>,
|
||||
lessee: Rc<dyn BackendDrmLessee>,
|
||||
|
|
|
|||
|
|
@ -637,6 +637,9 @@ impl State {
|
|||
{
|
||||
continue;
|
||||
}
|
||||
if dev.dev.gfx_fast_ram_access() {
|
||||
continue;
|
||||
}
|
||||
dev.make_render_device();
|
||||
if self.render_ctx.is_some() {
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue