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
7e3e4863
Commit
7e3e4863
authored
Apr 06, 2016
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Memory: Don't use pool memory to store the entry point name in the intermediate representation.
This might address issue #221, which I couldn't reproduce.
parent
78a6b788
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+1
-1
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+1
-1
localintermediate.h
glslang/MachineIndependent/localintermediate.h
+2
-2
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+1
-1
No files found.
SPIRV/GlslangToSpv.cpp
View file @
7e3e4863
...
@@ -2126,7 +2126,7 @@ bool TGlslangToSpvTraverser::isShaderEntrypoint(const glslang::TIntermAggregate*
...
@@ -2126,7 +2126,7 @@ bool TGlslangToSpvTraverser::isShaderEntrypoint(const glslang::TIntermAggregate*
{
{
// have to ignore mangling and just look at the base name
// have to ignore mangling and just look at the base name
int
firstOpen
=
node
->
getName
().
find
(
'('
);
int
firstOpen
=
node
->
getName
().
find
(
'('
);
return
node
->
getName
().
compare
(
0
,
firstOpen
,
glslangIntermediate
->
getEntryPoint
())
==
0
;
return
node
->
getName
().
compare
(
0
,
firstOpen
,
glslangIntermediate
->
getEntryPoint
()
.
c_str
()
)
==
0
;
}
}
// Make all the functions, skeletally, without actually visiting their bodies.
// Make all the functions, skeletally, without actually visiting their bodies.
...
...
glslang/MachineIndependent/ParseHelper.cpp
View file @
7e3e4863
...
@@ -986,7 +986,7 @@ TIntermAggregate* TParseContext::handleFunctionDefinition(const TSourceLoc& loc,
...
@@ -986,7 +986,7 @@ TIntermAggregate* TParseContext::handleFunctionDefinition(const TSourceLoc& loc,
//
//
// Raise error message if main function takes any parameters or returns anything other than void
// Raise error message if main function takes any parameters or returns anything other than void
//
//
if
(
function
.
getName
()
==
intermediate
.
getEntryPoint
())
{
if
(
function
.
getName
()
==
intermediate
.
getEntryPoint
()
.
c_str
()
)
{
if
(
function
.
getParamCount
()
>
0
)
if
(
function
.
getParamCount
()
>
0
)
error
(
loc
,
"function cannot take any parameter(s)"
,
function
.
getName
().
c_str
(),
""
);
error
(
loc
,
"function cannot take any parameter(s)"
,
function
.
getName
().
c_str
(),
""
);
if
(
function
.
getType
().
getBasicType
()
!=
EbtVoid
)
if
(
function
.
getType
().
getBasicType
()
!=
EbtVoid
)
...
...
glslang/MachineIndependent/localintermediate.h
View file @
7e3e4863
...
@@ -149,7 +149,7 @@ public:
...
@@ -149,7 +149,7 @@ public:
void
setSource
(
EShSource
s
)
{
source
=
s
;
}
void
setSource
(
EShSource
s
)
{
source
=
s
;
}
EShSource
getSource
()
const
{
return
source
;
}
EShSource
getSource
()
const
{
return
source
;
}
void
setEntryPoint
(
const
char
*
ep
)
{
entryPoint
=
ep
;
}
void
setEntryPoint
(
const
char
*
ep
)
{
entryPoint
=
ep
;
}
const
TS
tring
&
getEntryPoint
()
const
{
return
entryPoint
;
}
const
std
::
s
tring
&
getEntryPoint
()
const
{
return
entryPoint
;
}
void
setVersion
(
int
v
)
{
version
=
v
;
}
void
setVersion
(
int
v
)
{
version
=
v
;
}
int
getVersion
()
const
{
return
version
;
}
int
getVersion
()
const
{
return
version
;
}
void
setProfile
(
EProfile
p
)
{
profile
=
p
;
}
void
setProfile
(
EProfile
p
)
{
profile
=
p
;
}
...
@@ -347,7 +347,7 @@ protected:
...
@@ -347,7 +347,7 @@ protected:
const
EShLanguage
language
;
// stage, known at construction time
const
EShLanguage
language
;
// stage, known at construction time
EShSource
source
;
// source language, known a bit later
EShSource
source
;
// source language, known a bit later
TS
tring
entryPoint
;
std
::
s
tring
entryPoint
;
EProfile
profile
;
EProfile
profile
;
int
version
;
int
version
;
int
spv
;
int
spv
;
...
...
hlsl/hlslParseHelper.cpp
View file @
7e3e4863
...
@@ -709,7 +709,7 @@ TIntermAggregate* HlslParseContext::handleFunctionDefinition(const TSourceLoc& l
...
@@ -709,7 +709,7 @@ TIntermAggregate* HlslParseContext::handleFunctionDefinition(const TSourceLoc& l
currentFunctionType
=
new
TType
(
EbtVoid
);
currentFunctionType
=
new
TType
(
EbtVoid
);
functionReturnsValue
=
false
;
functionReturnsValue
=
false
;
inEntrypoint
=
(
function
.
getName
()
==
intermediate
.
getEntryPoint
());
inEntrypoint
=
(
function
.
getName
()
==
intermediate
.
getEntryPoint
()
.
c_str
()
);
//
//
// New symbol table scope for body of function plus its arguments
// New symbol table scope for body of function plus its arguments
...
...
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