internal/graphicsdriver/metal: bug fix: compile error

This commit is contained in:
Hajime Hoshi 2023-03-04 01:25:43 +09:00
parent 7998e4d31d
commit 36bd3329b3
2 changed files with 9 additions and 9 deletions

View File

@ -39,9 +39,9 @@ func init() {
}
func Example_listDevices() {
device, ok := mtl.CreateSystemDefaultDevice()
if !ok {
log.Fatalln("Metal is not supported")
device, err := mtl.CreateSystemDefaultDevice()
if err != nil {
log.Fatal(err)
}
printJSON("preferred system default Metal device = ", device)
@ -86,9 +86,9 @@ func printJSON(label string, v any) {
}
func Example_renderTriangle() {
device, ok := mtl.CreateSystemDefaultDevice()
if !ok {
log.Fatalln("Metal is not supported")
device, err := mtl.CreateSystemDefaultDevice()
if err != nil {
log.Fatal(err)
}
// Create a render pipeline state.

View File

@ -30,9 +30,9 @@ import (
)
func Disabled_TestRenderTriangle(t *testing.T) {
device, ok := mtl.CreateSystemDefaultDevice()
if !ok {
t.Fatal("Metal is not supported")
device, err := mtl.CreateSystemDefaultDevice()
if err != nil {
t.Fatal(err)
}
// Create a render pipeline state.