OSDN Git Service

Fix scoping of function parameters for GLSL ES 1.0
authorNicolas Capens <capn@google.com>
Tue, 26 Apr 2016 14:18:31 +0000 (14:18 +0000)
committerNicolas Capens <capn@google.com>
Sat, 30 Apr 2016 05:32:42 +0000 (05:32 +0000)
This reverts commit 0637eac3b8fd276596b303aaa7e5d59a3accccf8.
It's considered a spec bug:
https://cvs.khronos.org/bugzilla/show_bug.cgi?id=8656

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

index 1ecf468..3030144 100644 (file)
@@ -1591,11 +1591,9 @@ external_declaration
 function_definition
     : function_prototype {
         context->parseFunctionPrototype(@1, $1.function, &$1.intermAggregate);
-        if (context->getShaderVersion() == 100) context->symbolTable.push();
     }
     compound_statement_no_new_scope {
         $$ = context->addFunctionDefinition(*($1.function), $1.intermAggregate, $3, @1);
-        if (context->getShaderVersion() == 100) context->symbolTable.pop();
     }
     ;
 
index ad7bd4d..2e23afe 100644 (file)
@@ -4831,7 +4831,6 @@ yyreduce:
 
     {
         context->parseFunctionPrototype((yylsp[0]), (yyvsp[0].interm).function, &(yyvsp[0].interm).intermAggregate);
-        if (context->getShaderVersion() == 100) context->symbolTable.push();
     }
 
     break;
@@ -4840,7 +4839,6 @@ yyreduce:
 
     {
         (yyval.interm.intermNode) = context->addFunctionDefinition(*((yyvsp[-2].interm).function), (yyvsp[-2].interm).intermAggregate, (yyvsp[0].interm.intermAggregate), (yylsp[-2]));
-        if (context->getShaderVersion() == 100) context->symbolTable.pop();
     }
 
     break;