From 47bfd0db9e6c98e57bc8b3b1f82b001581c5f6f8 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Thu, 10 Mar 2022 00:08:36 +0900 Subject: [PATCH] internal/shaderir/metal: rename to msl Closes #2010 --- internal/graphicsdriver/metal/shader_darwin.go | 2 +- internal/shader/shader_test.go | 2 +- internal/shaderir/ir_test.go | 2 +- internal/shaderir/{metal/metal.go => msl/msl.go} | 2 +- internal/shaderir/{metal => msl}/type.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename internal/shaderir/{metal/metal.go => msl/msl.go} (99%) rename internal/shaderir/{metal => msl}/type.go (98%) diff --git a/internal/graphicsdriver/metal/shader_darwin.go b/internal/graphicsdriver/metal/shader_darwin.go index 91f6c383a..1d7c26a8c 100644 --- a/internal/graphicsdriver/metal/shader_darwin.go +++ b/internal/graphicsdriver/metal/shader_darwin.go @@ -20,7 +20,7 @@ import ( "github.com/hajimehoshi/ebiten/v2/internal/graphicsdriver" "github.com/hajimehoshi/ebiten/v2/internal/graphicsdriver/metal/mtl" "github.com/hajimehoshi/ebiten/v2/internal/shaderir" - "github.com/hajimehoshi/ebiten/v2/internal/shaderir/metal" + "github.com/hajimehoshi/ebiten/v2/internal/shaderir/msl" ) type shaderRpsKey struct { diff --git a/internal/shader/shader_test.go b/internal/shader/shader_test.go index 5527fd8f9..3d2fc72d8 100644 --- a/internal/shader/shader_test.go +++ b/internal/shader/shader_test.go @@ -26,7 +26,7 @@ import ( "github.com/hajimehoshi/ebiten/v2/internal/shader" "github.com/hajimehoshi/ebiten/v2/internal/shaderir/glsl" - "github.com/hajimehoshi/ebiten/v2/internal/shaderir/metal" + "github.com/hajimehoshi/ebiten/v2/internal/shaderir/msl" ) func glslVertexNormalize(str string) string { diff --git a/internal/shaderir/ir_test.go b/internal/shaderir/ir_test.go index 7b15efa8a..d11517ea1 100644 --- a/internal/shaderir/ir_test.go +++ b/internal/shaderir/ir_test.go @@ -20,7 +20,7 @@ import ( "github.com/hajimehoshi/ebiten/v2/internal/shaderir" "github.com/hajimehoshi/ebiten/v2/internal/shaderir/glsl" - "github.com/hajimehoshi/ebiten/v2/internal/shaderir/metal" + "github.com/hajimehoshi/ebiten/v2/internal/shaderir/msl" ) func block(localVars []shaderir.Type, offset int, stmts ...shaderir.Stmt) *shaderir.Block { diff --git a/internal/shaderir/metal/metal.go b/internal/shaderir/msl/msl.go similarity index 99% rename from internal/shaderir/metal/metal.go rename to internal/shaderir/msl/msl.go index 896882af3..8c6864626 100644 --- a/internal/shaderir/metal/metal.go +++ b/internal/shaderir/msl/msl.go @@ -36,7 +36,7 @@ type compileContext struct { func (c *compileContext) structName(p *shaderir.Program, t *shaderir.Type) string { if t.Main != shaderir.Struct { - panic("metal: the given type at structName must be a struct") + panic("msl: the given type at structName must be a struct") } s := t.String() if n, ok := c.structNames[s]; ok { diff --git a/internal/shaderir/metal/type.go b/internal/shaderir/msl/type.go similarity index 98% rename from internal/shaderir/metal/type.go rename to internal/shaderir/msl/type.go index 51cb6f004..67ad2dc4a 100644 --- a/internal/shaderir/metal/type.go +++ b/internal/shaderir/msl/type.go @@ -30,7 +30,7 @@ func typeString(t *shaderir.Type, packed bool, ref bool) string { } return t case shaderir.Struct: - panic("metal: a struct is not implemented") + panic("msl: a struct is not implemented") default: t := basicTypeString(t.Main, packed) if ref {