Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
9df6aa53
Commit
9df6aa53
authored
Dec 05, 2016
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GLSL: Allow desktop shaders to call functions from outside main().
Fixes issue #239.
parent
ec2e27ad
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
110scope.vert.out
Test/baseResults/110scope.vert.out
+1
-2
revision.h
glslang/Include/revision.h
+2
-2
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+4
-3
No files found.
Test/baseResults/110scope.vert.out
View file @
9df6aa53
110scope.vert
110scope.vert
ERROR: 0:5: 'a' : redefinition
ERROR: 0:5: 'a' : redefinition
ERROR: 0:34: 'f' : can't call user function from global scope
ERROR: 0:57: 'z' : undeclared identifier
ERROR: 0:57: 'z' : undeclared identifier
ERROR: 0:57: 'z' : redefinition
ERROR: 0:57: 'z' : redefinition
ERROR:
4
compilation errors. No code generated.
ERROR:
3
compilation errors. No code generated.
Shader version: 110
Shader version: 110
...
...
glslang/Include/revision.h
View file @
9df6aa53
...
@@ -2,5 +2,5 @@
...
@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits.
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
// For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "Overload400-PrecQual.167
4
"
#define GLSLANG_REVISION "Overload400-PrecQual.167
6
"
#define GLSLANG_DATE "0
3
-Dec-2016"
#define GLSLANG_DATE "0
5
-Dec-2016"
glslang/MachineIndependent/ParseHelper.cpp
View file @
9df6aa53
...
@@ -1109,9 +1109,10 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
...
@@ -1109,9 +1109,10 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
// if builtIn == true, it's definitely a built-in function with EOpNull
// if builtIn == true, it's definitely a built-in function with EOpNull
if
(
!
builtIn
)
{
if
(
!
builtIn
)
{
call
->
setUserDefined
();
call
->
setUserDefined
();
if
(
symbolTable
.
atGlobalLevel
())
if
(
symbolTable
.
atGlobalLevel
())
{
error
(
loc
,
"can't call user function from global scope"
,
fnCandidate
->
getName
().
c_str
(),
""
);
requireProfile
(
loc
,
~
EEsProfile
,
"calling user function from global scope"
);
else
intermediate
.
addToCallGraph
(
infoSink
,
"main("
,
fnCandidate
->
getMangledName
());
}
else
intermediate
.
addToCallGraph
(
infoSink
,
currentCaller
,
fnCandidate
->
getMangledName
());
intermediate
.
addToCallGraph
(
infoSink
,
currentCaller
,
fnCandidate
->
getMangledName
());
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment