From febdc46ad52a6d40627b9aca971831a693cdd869 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 9 Aug 2020 04:40:12 +0900 Subject: [PATCH] shaderir/metal: Better array initialization Updates #1285 --- internal/shaderir/metal/metal.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/internal/shaderir/metal/metal.go b/internal/shaderir/metal/metal.go index 0da703eb5..53e765dba 100644 --- a/internal/shaderir/metal/metal.go +++ b/internal/shaderir/metal/metal.go @@ -196,15 +196,9 @@ func (c *compileContext) metalVarInit(p *shaderir.Program, t *shaderir.Type) str case shaderir.None: return "?(none)" case shaderir.Array: - init := c.metalVarInit(p, &t.Sub[0]) - es := make([]string, 0, t.Length) - for i := 0; i < t.Length; i++ { - es = append(es, init) - } - t := typeString(t, false, false) - return fmt.Sprintf("%s{%s}", t, strings.Join(es, ", ")) + return "{}" case shaderir.Struct: - panic("not implemented") + return "{}" case shaderir.Bool: return "false" case shaderir.Int: