From 1786be55f70c8300afab29ea7c8758e40742723c Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Tue, 8 Sep 2020 02:43:41 +0900 Subject: [PATCH] shader: Refactoring --- internal/shaderir/metal/metal.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))) } }