-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy patherror.go
More file actions
39 lines (31 loc) · 1.05 KB
/
error.go
File metadata and controls
39 lines (31 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package wgpu
import (
"errors"
"github.com/gogpu/wgpu/core"
"github.com/gogpu/wgpu/hal"
)
// Sentinel errors re-exported from HAL.
var (
ErrDeviceLost = hal.ErrDeviceLost
ErrOutOfMemory = hal.ErrDeviceOutOfMemory
ErrSurfaceLost = hal.ErrSurfaceLost
ErrSurfaceOutdated = hal.ErrSurfaceOutdated
ErrTimeout = hal.ErrTimeout
)
// Public API sentinel errors.
var (
// ErrReleased is returned when operating on a released resource.
ErrReleased = errors.New("wgpu: resource already released")
// ErrNoAdapters is returned when no GPU adapters are found.
ErrNoAdapters = errors.New("wgpu: no GPU adapters available")
// ErrNoBackends is returned when no backends are registered.
ErrNoBackends = errors.New("wgpu: no backends registered (import a backend package)")
)
// Re-export error types from core.
type GPUError = core.GPUError
type ErrorFilter = core.ErrorFilter
const (
ErrorFilterValidation = core.ErrorFilterValidation
ErrorFilterOutOfMemory = core.ErrorFilterOutOfMemory
ErrorFilterInternal = core.ErrorFilterInternal
)