mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 08:55:35 +00:00
app: recover from transient Present errors
Some GPU APIs such as Direct3D can return an error after drawing a frame indicating a transient device error. Recreate device and retry if it happens. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -40,6 +40,11 @@ type Context interface {
|
||||
Unlock()
|
||||
}
|
||||
|
||||
// ErrDeviceLost is returned from Context.Present when
|
||||
// the underlying GPU device is gone and should be
|
||||
// recreated.
|
||||
var ErrDeviceLost = errors.New("GPU device lost")
|
||||
|
||||
// Driver is the interface for the platform implementation
|
||||
// of a window.
|
||||
type Driver interface {
|
||||
|
||||
Reference in New Issue
Block a user