1
0
Fork 0
forked from wry/wry

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:
Julian Orth 2022-05-06 13:09:29 +02:00
parent 4584dee160
commit d2913449ea
21 changed files with 377 additions and 120 deletions

View file

@ -76,6 +76,7 @@ bitflags::bitflags! {
const MESA_CONFIGLESS_CONTEXT = 1 << 4;
const KHR_SURFACELESS_CONTEXT = 1 << 5;
const IMG_CONTEXT_PRIORITY = 1 << 6;
const EXT_CREATE_CONTEXT_ROBUSTNESS = 1 << 7;
}
}
@ -103,6 +104,10 @@ pub(super) unsafe fn get_display_ext(dpy: EGLDisplay) -> DisplayExt {
DisplayExt::KHR_SURFACELESS_CONTEXT,
),
("EGL_IMG_context_priority", DisplayExt::IMG_CONTEXT_PRIORITY),
(
"EGL_EXT_create_context_robustness",
DisplayExt::EXT_CREATE_CONTEXT_ROBUSTNESS,
),
];
match get_dpy_extensions(dpy) {
Some(exts) => get_typed_ext(&exts, DisplayExt::empty(), &map),