shaderir/metal: Bug fix: Array initialization

Updates #1285
This commit is contained in:
Hajime Hoshi 2020-08-09 04:22:09 +09:00
parent 4d1947f711
commit a536b3ee25

View File

@ -202,7 +202,7 @@ func (c *compileContext) metalVarInit(p *shaderir.Program, t *shaderir.Type) str
es = append(es, init)
}
t := typeString(t, false, false)
return fmt.Sprintf("%s(%s)", t, strings.Join(es, ", "))
return fmt.Sprintf("%s{%s}", t, strings.Join(es, ", "))
case shaderir.Struct:
panic("not implemented")
case shaderir.Bool: