OSDN Git Service

Fix local variable hides function parameter for GLSL ES 1.0
authorNicolas Capens <capn@google.com>
Thu, 7 Apr 2016 19:12:39 +0000 (15:12 -0400)
committerNicolas Capens <capn@google.com>
Thu, 14 Apr 2016 19:55:44 +0000 (19:55 +0000)
commit0637eac3b8fd276596b303aaa7e5d59a3accccf8
tree310c845fb9642cb4a26e141880ccef5baccfc0d1
parent85c4f9e08ace0a4741e7efedc786452c1c58607c
Fix local variable hides function parameter for GLSL ES 1.0

GLSL ES 1.0 specifies that "a function body has a scope nested inside
the function’s definition". For GLSL ES 3.0, they form a single scope.
Both specs use the compound_statement_no_new_scope rule. This change
respects that while supporting both behaviors. It does not impact legacy
content since it makes things more permissive.

Change-Id: Ica40fbf4d24d441ca2288fe5d43c288161e16b89
Reviewed-on: https://swiftshader-review.googlesource.com/5055
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
src/OpenGL/compiler/glslang.y
src/OpenGL/compiler/glslang_tab.cpp