metal: handle gpu reset
Unfortunately this doesn't seem to work on amdgpu [1]. I've tested that it works on i915. [1] https://gitlab.freedesktop.org/drm/amd/-/issues/1749
This commit is contained in:
parent
4584dee160
commit
d2913449ea
21 changed files with 377 additions and 120 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use std::ops::Deref;
|
||||
use {
|
||||
crate::{
|
||||
client::{Client, ClientError},
|
||||
|
|
@ -114,7 +115,7 @@ impl ZwlrScreencopyFrameV1 {
|
|||
return Err(ZwlrScreencopyFrameV1Error::InvalidBufferFormat);
|
||||
}
|
||||
buffer.update_framebuffer()?;
|
||||
if let WlBufferStorage::Shm { stride, .. } = &buffer.storage {
|
||||
if let Some(WlBufferStorage::Shm { stride, .. }) = buffer.storage.borrow_mut().deref() {
|
||||
if *stride != self.rect.width() * 4 {
|
||||
return Err(ZwlrScreencopyFrameV1Error::InvalidBufferStride);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue