mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-13 12:32:05 +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
|
offset = 0
|
||||||
case outer.outer == nil:
|
case outer.outer == nil:
|
||||||
offset = len(inParams) + len(outParams)
|
offset = len(inParams) + len(outParams)
|
||||||
case outer.outer.outer == nil:
|
|
||||||
offset = len(outer.outer.vars) + len(outer.vars)
|
|
||||||
default:
|
default:
|
||||||
offset = outer.ir.LocalVarIndexOffset + len(outer.vars)
|
for b := outer; b != nil; b = b.outer {
|
||||||
|
offset += len(b.vars)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
block := &block{
|
block := &block{
|
||||||
|
Loading…
Reference in New Issue
Block a user