mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 09:25:38 +00:00
app,gpu: move errDeviceLost from package app to package gpu
The Vulkan backend can return device lost error from more than just Present. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-2
@@ -153,7 +153,7 @@ func (w *Window) validateAndProcess(frameStart time.Time, size image.Point, sync
|
||||
})
|
||||
if err != nil {
|
||||
w.destroyGPU()
|
||||
if err == errDeviceLost {
|
||||
if errors.Is(err, gpu.ErrDeviceLost) {
|
||||
continue
|
||||
}
|
||||
return err
|
||||
@@ -175,7 +175,7 @@ func (w *Window) validateAndProcess(frameStart time.Time, size image.Point, sync
|
||||
if w.gpu != nil {
|
||||
if err := w.render(frame, size); err != nil {
|
||||
w.destroyGPU()
|
||||
if err == errDeviceLost {
|
||||
if errors.Is(err, gpu.ErrDeviceLost) {
|
||||
continue
|
||||
}
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user