From 1a7da0bc63755494fd5ee83246bd45a109c5d7b4 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 10 May 2020 01:21:34 +0900 Subject: [PATCH] shader: Do not sort variables since the order matters --- internal/shader/shader.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/internal/shader/shader.go b/internal/shader/shader.go index a0e57a9cf..6b6ecba30 100644 --- a/internal/shader/shader.go +++ b/internal/shader/shader.go @@ -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 })