mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
internal/graphicsdriver/metal/mtl: bug fix: test compile error
This commit is contained in:
parent
176e984a58
commit
162f62f54e
@ -29,9 +29,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func Example_listDevices() {
|
func Example_listDevices() {
|
||||||
device, err := mtl.CreateSystemDefaultDevice()
|
device, ok := mtl.CreateSystemDefaultDevice()
|
||||||
if err != nil {
|
if !ok {
|
||||||
log.Fatalln(err)
|
log.Fatalln("Metal is not supported")
|
||||||
}
|
}
|
||||||
printJSON("preferred system default Metal device = ", device)
|
printJSON("preferred system default Metal device = ", device)
|
||||||
|
|
||||||
@ -87,9 +87,9 @@ func printJSON(label string, v interface{}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Example_renderTriangle() {
|
func Example_renderTriangle() {
|
||||||
device, err := mtl.CreateSystemDefaultDevice()
|
device, ok := mtl.CreateSystemDefaultDevice()
|
||||||
if err != nil {
|
if !ok {
|
||||||
log.Fatalln(err)
|
log.Fatalln("Metal is not supported")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a render pipeline state.
|
// Create a render pipeline state.
|
||||||
|
@ -30,9 +30,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func Disabled_TestRenderTriangle(t *testing.T) {
|
func Disabled_TestRenderTriangle(t *testing.T) {
|
||||||
device, err := mtl.CreateSystemDefaultDevice()
|
device, ok := mtl.CreateSystemDefaultDevice()
|
||||||
if err != nil {
|
if !ok {
|
||||||
t.Fatal(err)
|
t.Fatal("Metal is not supported")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a render pipeline state.
|
// Create a render pipeline state.
|
||||||
|
Loading…
Reference in New Issue
Block a user