mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
shader: Refactoring
This commit is contained in:
parent
e534fe8246
commit
4d20da9bc0
@ -673,10 +673,10 @@ func (cs *compileState) parseBlock(outer *block, fname string, stmts []ast.Stmt,
|
||||
offset = 0
|
||||
case outer.outer == nil:
|
||||
offset = len(inParams) + len(outParams)
|
||||
case outer.outer.outer == nil:
|
||||
offset = len(outer.outer.vars) + len(outer.vars)
|
||||
default:
|
||||
offset = outer.ir.LocalVarIndexOffset + len(outer.vars)
|
||||
for b := outer; b != nil; b = b.outer {
|
||||
offset += len(b.vars)
|
||||
}
|
||||
}
|
||||
|
||||
block := &block{
|
||||
|
Loading…
Reference in New Issue
Block a user