dmitri.shuralyov.com/gpu/mtl/...

link to CoreGraphics framework

This wasn't needed in the past, but by now it is neccessary
for MTLCreateSystemDefaultDevice to work.¹

¹ https://developer.apple.com/documentation/metal/1433401-mtlcreatesystemdefaultdevice
dmitshur committed 4 years ago commit d42048ed14fdc83bd0e48f4b2a5e13c593e88cb6
Collapse all
mtl.go
@@ -15,11 +15,11 @@ import (
	"fmt"
	"unsafe"
)

/*
#cgo LDFLAGS: -framework Metal -framework Foundation
#cgo LDFLAGS: -framework Metal -framework CoreGraphics -framework Foundation
#include <stdlib.h>
#include "mtl.h"
struct Library Go_Device_MakeLibrary(void * device, _GoString_ source) {
	return Device_MakeLibrary(device, _GoStringPtr(source), _GoStringLen(source));
}