mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +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.
|
||||
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 {
|
||||
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 {
|
||||
return block.consts[a].name < block.consts[b].name
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user