shiny/driver/mtldriver: update to GLFW v3.3

GLFW v3.2 was old and started generating some warnings on macOS 10.15
Catalina (and warnings get upgraded to errors on builders). Update to
GLFW v3.3 that was recently released to resolve the problem.

There is a small regression affecting the newer version of GLFW that is
being tracked in issues https://github.com/glfw/glfw/issues/1543 and
https://github.com/go-gl/glfw/issues/262. It causes the application to
crash when glfwWaitEvents is called before the first window is opened:

	$ go run -tags='example metal' .../shiny/example/basic
	2019-11-25 22:19:24.715 basic[9412:69556] *** Assertion failure in -[NSApplication run], /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1894.10.126/AppKit.subproj/NSApplication.m:3313
	2019-11-25 22:19:24.715 basic[9412:69556] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSApp with wrong _running count'
	*** First throw call stack:
	(
		0   CoreFoundation                      0x00007fff30503f53 __exceptionPreprocess + 250
		1   libobjc.A.dylib                     0x00007fff665c9835 objc_exception_throw + 48
		2   CoreFoundation                      0x00007fff3051f810 +[NSException raise:format:arguments:] + 88
		3   Foundation                          0x00007fff32bff5d1 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
		4   AppKit                              0x00007fff2d657ed3 -[NSApplication run] + 1007
		5   basic                               0x00000000040d473d _glfwPlatformCreateWindow + 77
		6   basic                               0x00000000040cd945 glfwCreateWindow + 485
		7   basic                               0x00000000040da71b _cgo_78603e0816ec_Cfunc_glfwCreateWindow + 43
		8   basic                               0x0000000004058430 runtime.asmcgocall + 112
	)
	libc++abi.dylib: terminating with uncaught exception of type NSException
	SIGABRT: abort
	PC=0x7fff67a7b49a m=0 sigcode=0
	signal arrived during cgo execution
	[...]

Work around it by waiting for the first window open request before
entering the main loop. That way, glfwWaitEvents is not called
before a window has been created, and the crash does not occur.
This temporary workaround can be removed after the bug is fixed.

Fixes golang/go#35766
Updates go-gl/glfw#256
Updates glfw/glfw#1543
Updates go-gl/glfw#262

Change-Id: Ie9b15ab6632af39871d94993a3e3097ea798a7e2
Reviewed-on: https://go-review.googlesource.com/c/exp/+/208877
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
5 files changed
tree: a629684472348341468581929e07f6ce9e0fd1e0
  1. apidiff/
  2. cmd/
  3. ebnf/
  4. ebnflint/
  5. errors/
  6. fsnotify/
  7. inotify/
  8. io/
  9. mmap/
  10. rand/
  11. shiny/
  12. shootout/
  13. sumdb/
  14. utf8string/
  15. winfsnotify/
  16. .gitattributes
  17. .gitignore
  18. AUTHORS
  19. codereview.cfg
  20. CONTRIBUTING.md
  21. CONTRIBUTORS
  22. go.mod
  23. go.sum
  24. LICENSE
  25. PATENTS
  26. README.md
README.md

exp

This subrepository holds experimental and deprecated (in the old directory) packages.

The idea for this subrepository originated as the pkg/exp directory of the main repository, but its presence there made it unavailable to users of the binary downloads of the Go installation. The subrepository has therefore been created to make it possible to go get these packages.

Warning: Packages here are experimental and unreliable. Some may one day be promoted to the main repository or other subrepository, or they may be modified arbitrarily or even disappear altogether.

In short, code in this subrepository is not subject to the Go 1 compatibility promise. (No subrepo is, but the promise is even more likely to be violated by go.exp than the others.)

Caveat emptor.