shader: Bug fix: Wrong variable index at declaration

This commit is contained in:
Hajime Hoshi 2020-08-09 23:23:40 +09:00
parent a0494210c3
commit 240e20ad87

View File

@ -302,7 +302,7 @@ func (cs *compileState) parseDecl(b *block, d ast.Decl) ([]shaderir.Stmt, bool)
continue
}
base := len(b.vars)
base := b.totalLocalVariableNum()
b.vars = append(b.vars, vs...)
if len(inits) > 0 {