mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +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() {
|
||||
device, err := mtl.CreateSystemDefaultDevice()
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
device, ok := mtl.CreateSystemDefaultDevice()
|
||||
if !ok {
|
||||
log.Fatalln("Metal is not supported")
|
||||
}
|
||||
printJSON("preferred system default Metal device = ", device)
|
||||
|
||||
@ -87,9 +87,9 @@ func printJSON(label string, v interface{}) {
|
||||
}
|
||||
|
||||
func Example_renderTriangle() {
|
||||
device, err := mtl.CreateSystemDefaultDevice()
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
device, ok := mtl.CreateSystemDefaultDevice()
|
||||
if !ok {
|
||||
log.Fatalln("Metal is not supported")
|
||||
}
|
||||
|
||||
// Create a render pipeline state.
|
||||
|
@ -30,9 +30,9 @@ import (
|
||||
)
|
||||
|
||||
func Disabled_TestRenderTriangle(t *testing.T) {
|
||||
device, err := mtl.CreateSystemDefaultDevice()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
device, ok := mtl.CreateSystemDefaultDevice()
|
||||
if !ok {
|
||||
t.Fatal("Metal is not supported")
|
||||
}
|
||||
|
||||
// Create a render pipeline state.
|
||||
|
Loading…
Reference in New Issue
Block a user