mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 11:48:55 +01:00
shader: Do not sort variables since the order matters
This commit is contained in:
parent
eaf93a532f
commit
1a7da0bc63
@ -121,9 +121,6 @@ func (sh *Shader) parse(f *ast.File) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: This is duplicated with parseBlock.
|
// TODO: This is duplicated with parseBlock.
|
||||||
sort.Slice(sh.global.vars, func(a, b int) bool {
|
|
||||||
return sh.global.vars[a].name < sh.global.vars[b].name
|
|
||||||
})
|
|
||||||
sort.Slice(sh.global.consts, func(a, b int) bool {
|
sort.Slice(sh.global.consts, func(a, b int) bool {
|
||||||
return sh.global.consts[a].name < sh.global.consts[b].name
|
return sh.global.consts[a].name < sh.global.consts[b].name
|
||||||
})
|
})
|
||||||
@ -372,9 +369,6 @@ func (sh *Shader) parseBlock(b *ast.BlockStmt) *block {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sort.Slice(block.vars, func(a, b int) bool {
|
|
||||||
return block.vars[a].name < block.vars[b].name
|
|
||||||
})
|
|
||||||
sort.Slice(block.consts, func(a, b int) bool {
|
sort.Slice(block.consts, func(a, b int) bool {
|
||||||
return block.consts[a].name < block.consts[b].name
|
return block.consts[a].name < block.consts[b].name
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user