gpu,app/internal/wm: add Metal port

The OpenGL (ES) implementations on Apple platforms are deprecated and
don't support GPU compute programs. This change adds support for the
replacement, the Metal GPU API.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-08-03 16:53:42 +02:00
parent a7f08eedf3
commit 3b2992c37e
21 changed files with 1603 additions and 151 deletions
+2 -1
View File
@@ -36,6 +36,7 @@ import (
// Register backends.
_ "gioui.org/gpu/internal/d3d11"
_ "gioui.org/gpu/internal/metal"
_ "gioui.org/gpu/internal/opengl"
)
@@ -135,7 +136,7 @@ type imageOp struct {
// shaderModuleVersion is the exact version of gioui.org/shader expected by
// this package. Shader programs are not backwards or forwards compatible.
const shaderModuleVersion = "v0.0.0-20210820085839-484f7c0305de"
const shaderModuleVersion = "v0.0.0-20210821062758-133bba6632c7"
func decodeStrokeOp(data []byte) clip.StrokeStyle {
_ = data[4]