diff --git a/internal/shaderir/metal/metal.go b/internal/shaderir/metal/metal.go index 9c06232ef..df92a138c 100644 --- a/internal/shaderir/metal/metal.go +++ b/internal/shaderir/metal/metal.go @@ -321,8 +321,8 @@ func (c *compileContext) metalBlock(p *shaderir.Program, topBlock, block *shader var lines []string for i, t := range block.LocalVars { // The type is None e.g., when the variable is a for-loop counter. - name := localVariableName(p, topBlock, block.LocalVarIndexOffset+i) if t.Main != shaderir.None { + name := localVariableName(p, topBlock, block.LocalVarIndexOffset+i) lines = append(lines, fmt.Sprintf("%s%s = %s;", idt, c.metalVarDecl(p, &t, name, false, false), c.metalVarInit(p, &t))) } }