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
517fe7a6
Commit
517fe7a6
authored
Nov 26, 2016
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Non-functional: Rename some entry-point variables to entryPoint, not main.
parent
fca82621
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
17 deletions
+17
-17
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+8
-8
SpvBuilder.cpp
SPIRV/SpvBuilder.cpp
+4
-4
SpvBuilder.h
SPIRV/SpvBuilder.h
+1
-1
revision.h
glslang/Include/revision.h
+1
-1
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+2
-2
hlslParseHelper.h
hlsl/hlslParseHelper.h
+1
-1
No files found.
SPIRV/GlslangToSpv.cpp
View file @
517fe7a6
...
...
@@ -182,8 +182,8 @@ protected:
// There is a 1:1 mapping between a spv builder and a module; this is thread safe
spv
::
Builder
builder
;
bool
in
Main
;
bool
main
Terminated
;
bool
in
EntryPoint
;
bool
entryPoint
Terminated
;
bool
linkageOnly
;
// true when visiting the set of objects in the AST present only for establishing interface, whether or not they were statically used
std
::
set
<
spv
::
Id
>
iOSet
;
// all input/output variables from either static use or declaration of interface
const
glslang
::
TIntermediate
*
glslangIntermediate
;
...
...
@@ -769,7 +769,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* gls
:
TIntermTraverser
(
true
,
false
,
true
),
shaderEntry
(
nullptr
),
currentFunction
(
nullptr
),
sequenceDepth
(
0
),
logger
(
buildLogger
),
builder
((
glslang
::
GetKhronosToolId
()
<<
16
)
|
GeneratorVersion
,
logger
),
in
Main
(
false
),
main
Terminated
(
false
),
linkageOnly
(
false
),
in
EntryPoint
(
false
),
entryPoint
Terminated
(
false
),
linkageOnly
(
false
),
glslangIntermediate
(
glslangIntermediate
)
{
spv
::
ExecutionModel
executionModel
=
TranslateExecutionModel
(
glslangIntermediate
->
getStage
());
...
...
@@ -902,7 +902,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* gls
// Finish creating SPV, after the traversal is complete.
void
TGlslangToSpvTraverser
::
finishSpv
()
{
if
(
!
main
Terminated
)
{
if
(
!
entryPoint
Terminated
)
{
builder
.
setBuildPoint
(
shaderEntry
->
getLastBlock
());
builder
.
leaveFunction
();
}
...
...
@@ -1383,17 +1383,17 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
case
glslang
:
:
EOpFunction
:
if
(
visit
==
glslang
::
EvPreVisit
)
{
if
(
isShaderEntryPoint
(
node
))
{
in
Main
=
true
;
in
EntryPoint
=
true
;
builder
.
setBuildPoint
(
shaderEntry
->
getLastBlock
());
currentFunction
=
shaderEntry
;
}
else
{
handleFunctionEntry
(
node
);
}
}
else
{
if
(
in
Main
)
main
Terminated
=
true
;
if
(
in
EntryPoint
)
entryPoint
Terminated
=
true
;
builder
.
leaveFunction
();
in
Main
=
false
;
in
EntryPoint
=
false
;
}
return
true
;
...
...
SPIRV/SpvBuilder.cpp
View file @
517fe7a6
...
...
@@ -64,7 +64,7 @@ Builder::Builder(unsigned int magicNumber, SpvBuildLogger* buildLogger) :
builderNumber
(
magicNumber
),
buildPoint
(
0
),
uniqueId
(
0
),
main
Function
(
0
),
entryPoint
Function
(
0
),
generatingOpCodeForSpecConst
(
false
),
logger
(
buildLogger
)
{
...
...
@@ -967,15 +967,15 @@ void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decorat
// Comments in header
Function
*
Builder
::
makeEntryPoint
(
const
char
*
entryPoint
)
{
assert
(
!
main
Function
);
assert
(
!
entryPoint
Function
);
Block
*
entry
;
std
::
vector
<
Id
>
params
;
std
::
vector
<
Decoration
>
precisions
;
main
Function
=
makeFunctionEntry
(
NoPrecision
,
makeVoidType
(),
entryPoint
,
params
,
precisions
,
&
entry
);
entryPoint
Function
=
makeFunctionEntry
(
NoPrecision
,
makeVoidType
(),
entryPoint
,
params
,
precisions
,
&
entry
);
return
main
Function
;
return
entryPoint
Function
;
}
// Comments in header
...
...
SPIRV/SpvBuilder.h
View file @
517fe7a6
...
...
@@ -564,7 +564,7 @@ public:
Module
module
;
Block
*
buildPoint
;
Id
uniqueId
;
Function
*
main
Function
;
Function
*
entryPoint
Function
;
bool
generatingOpCodeForSpecConst
;
AccessChain
accessChain
;
...
...
glslang/Include/revision.h
View file @
517fe7a6
...
...
@@ -2,5 +2,5 @@
// 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).
#define GLSLANG_REVISION "Overload400-PrecQual.16
59
"
#define GLSLANG_REVISION "Overload400-PrecQual.16
60
"
#define GLSLANG_DATE "26-Nov-2016"
hlsl/hlslParseHelper.cpp
View file @
517fe7a6
...
...
@@ -55,7 +55,7 @@ HlslParseContext::HlslParseContext(TSymbolTable& symbolTable, TIntermediate& int
TParseContextBase
(
symbolTable
,
interm
,
parsingBuiltins
,
version
,
profile
,
spvVersion
,
language
,
infoSink
,
forwardCompatible
,
messages
),
contextPragma
(
true
,
false
),
loopNestingLevel
(
0
),
annotationNestingLevel
(
0
),
structNestingLevel
(
0
),
controlFlowNestingLevel
(
0
),
post
Main
Return
(
false
),
post
EntryPoint
Return
(
false
),
limits
(
resources
.
limits
),
entryPointOutput
(
nullptr
),
nextInLocation
(
0
),
nextOutLocation
(
0
)
...
...
@@ -1141,7 +1141,7 @@ TIntermAggregate* HlslParseContext::handleFunctionDefinition(const TSourceLoc& l
intermediate
.
setAggregateOperator
(
paramNodes
,
EOpParameters
,
TType
(
EbtVoid
),
loc
);
loopNestingLevel
=
0
;
controlFlowNestingLevel
=
0
;
post
Main
Return
=
false
;
post
EntryPoint
Return
=
false
;
// Handle function attributes
if
(
inEntryPoint
)
{
...
...
hlsl/hlslParseHelper.h
View file @
517fe7a6
...
...
@@ -193,7 +193,7 @@ protected:
int
controlFlowNestingLevel
;
// 0 if outside all flow control
TList
<
TIntermSequence
*>
switchSequenceStack
;
// case, node, case, case, node, ...; ensure only one node between cases; stack of them for nesting
bool
inEntryPoint
;
// if inside a function, true if the function is the entry point
bool
post
Main
Return
;
// if inside a function, true if the function is the entry point and this is after a return statement
bool
post
EntryPoint
Return
;
// if inside a function, true if the function is the entry point and this is after a return statement
const
TType
*
currentFunctionType
;
// the return type of the function that's currently being parsed
bool
functionReturnsValue
;
// true if a non-void function has a return
TBuiltInResource
resources
;
...
...
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