gfx: wait for idle if rendering doesn't support explicit sync
This commit is contained in:
parent
80c7a1f47c
commit
12c9b36ded
4 changed files with 7 additions and 2 deletions
|
|
@ -129,6 +129,10 @@ impl EglDisplay {
|
||||||
.exts
|
.exts
|
||||||
.contains(KHR_FENCE_SYNC | KHR_WAIT_SYNC | ANDROID_NATIVE_FENCE_SYNC);
|
.contains(KHR_FENCE_SYNC | KHR_WAIT_SYNC | ANDROID_NATIVE_FENCE_SYNC);
|
||||||
|
|
||||||
|
if !dpy.explicit_sync {
|
||||||
|
log::error!("Driver does not support explicit sync. Rendering will block.")
|
||||||
|
}
|
||||||
|
|
||||||
Ok(Rc::new(dpy))
|
Ok(Rc::new(dpy))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ dynload! {
|
||||||
glClear: unsafe fn(mask: GLbitfield),
|
glClear: unsafe fn(mask: GLbitfield),
|
||||||
glBlendFunc: unsafe fn(sfactor: GLenum, dfactor: GLenum),
|
glBlendFunc: unsafe fn(sfactor: GLenum, dfactor: GLenum),
|
||||||
glClearColor: unsafe fn(red: GLfloat, green: GLfloat, blue: GLfloat, alpha: GLfloat),
|
glClearColor: unsafe fn(red: GLfloat, green: GLfloat, blue: GLfloat, alpha: GLfloat),
|
||||||
glFlush: unsafe fn(),
|
glFinish: unsafe fn(),
|
||||||
|
|
||||||
glReadnPixels: unsafe fn(
|
glReadnPixels: unsafe fn(
|
||||||
x: GLint,
|
x: GLint,
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ impl Framebuffer {
|
||||||
let fd = run_ops(self, ops);
|
let fd = run_ops(self, ops);
|
||||||
if fd.is_none() {
|
if fd.is_none() {
|
||||||
unsafe {
|
unsafe {
|
||||||
(gles.glFlush)();
|
(gles.glFinish)();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(fd)
|
Ok(fd)
|
||||||
|
|
|
||||||
|
|
@ -747,6 +747,7 @@ impl VulkanRenderer {
|
||||||
Ok(s) => Some(s),
|
Ok(s) => Some(s),
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
log::error!("Could not export sync file from fence: {}", ErrorFmt(e));
|
log::error!("Could not export sync file from fence: {}", ErrorFmt(e));
|
||||||
|
self.block();
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue