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
273060c2
Commit
273060c2
authored
Oct 01, 2016
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Non-functional: Rationalizing parse helper hierarchy, step 1 (effected memory of HLSL keyword map).
parent
a08c929d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
31 deletions
+4
-31
revision.h
glslang/Include/revision.h
+1
-1
ShaderLang.cpp
glslang/MachineIndependent/ShaderLang.cpp
+3
-0
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+0
-30
No files found.
glslang/Include/revision.h
View file @
273060c2
...
@@ -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.154
5
"
#define GLSLANG_REVISION "Overload400-PrecQual.154
6
"
#define GLSLANG_DATE "01-Oct-2016"
#define GLSLANG_DATE "01-Oct-2016"
glslang/MachineIndependent/ShaderLang.cpp
View file @
273060c2
...
@@ -51,6 +51,7 @@
...
@@ -51,6 +51,7 @@
#include "../../hlsl/hlslParseables.h"
#include "../../hlsl/hlslParseables.h"
#include "Scan.h"
#include "Scan.h"
#include "ScanContext.h"
#include "ScanContext.h"
#include "../../hlsl/hlslScanContext.h"
#include "../Include/ShHandle.h"
#include "../Include/ShHandle.h"
#include "../../OGLCompilersDLL/InitializeDll.h"
#include "../../OGLCompilersDLL/InitializeDll.h"
...
@@ -1049,6 +1050,7 @@ int ShInitialize()
...
@@ -1049,6 +1050,7 @@ int ShInitialize()
PerProcessGPA
=
new
TPoolAllocator
();
PerProcessGPA
=
new
TPoolAllocator
();
glslang
::
TScanContext
::
fillInKeywordMap
();
glslang
::
TScanContext
::
fillInKeywordMap
();
glslang
::
HlslScanContext
::
fillInKeywordMap
();
return
1
;
return
1
;
}
}
...
@@ -1141,6 +1143,7 @@ int __fastcall ShFinalize()
...
@@ -1141,6 +1143,7 @@ int __fastcall ShFinalize()
}
}
glslang
::
TScanContext
::
deleteKeywordMap
();
glslang
::
TScanContext
::
deleteKeywordMap
();
glslang
::
HlslScanContext
::
deleteKeywordMap
();
return
1
;
return
1
;
}
}
...
...
hlsl/hlslParseHelper.cpp
View file @
273060c2
...
@@ -117,8 +117,6 @@ bool HlslParseContext::parseShaderStrings(TPpContext& ppContext, TInputScanner&
...
@@ -117,8 +117,6 @@ bool HlslParseContext::parseShaderStrings(TPpContext& ppContext, TInputScanner&
currentScanner
=
&
input
;
currentScanner
=
&
input
;
ppContext
.
setInput
(
input
,
versionWillBeError
);
ppContext
.
setInput
(
input
,
versionWillBeError
);
HlslScanContext
::
fillInKeywordMap
();
// TODO: right place, and include the delete too
HlslScanContext
scanContext
(
*
this
,
ppContext
);
HlslScanContext
scanContext
(
*
this
,
ppContext
);
HlslGrammar
grammar
(
scanContext
,
*
this
);
HlslGrammar
grammar
(
scanContext
,
*
this
);
if
(
!
grammar
.
parse
())
{
if
(
!
grammar
.
parse
())
{
...
@@ -4774,34 +4772,6 @@ void HlslParseContext::declareBlock(const TSourceLoc& loc, TType& type, const TS
...
@@ -4774,34 +4772,6 @@ void HlslParseContext::declareBlock(const TSourceLoc& loc, TType& type, const TS
if
(
arraySizes
)
if
(
arraySizes
)
blockType
.
newArraySizes
(
*
arraySizes
);
blockType
.
newArraySizes
(
*
arraySizes
);
//
// Don't make a user-defined type out of block name; that will cause an error
// if the same block name gets reused in a different interface.
//
// "Block names have no other use within a shader
// beyond interface matching; it is a compile-time error to use a block name at global scope for anything
// other than as a block name (e.g., use of a block name for a global variable name or function name is
// currently reserved)."
//
// Use the symbol table to prevent normal reuse of the block's name, as a variable entry,
// whose type is EbtBlock, but without all the structure; that will come from the type
// the instances point to.
//
//??TType blockNameType(EbtBlock, blockType.getQualifier().storage);
//??TVariable* blockNameVar = new TVariable(blockName, blockNameType);
//if (! symbolTable.insert(*blockNameVar)) {
// TSymbol* existingName = symbolTable.find(*blockName);
// if (existingName->getType().getBasicType() == EbtBlock) {
// if (existingName->getType().getQualifier().storage == blockType.getQualifier().storage) {
// error(loc, "Cannot reuse block name within the same interface:", blockName->c_str(), blockType.getStorageQualifierString());
// return;
// }
// } else {
// error(loc, "block name cannot redefine a non-block name", blockName->c_str(), "");
// return;
// }
//}
// Add the variable, as anonymous or named instanceName.
// Add the variable, as anonymous or named instanceName.
// Make an anonymous variable if no name was provided.
// Make an anonymous variable if no name was provided.
if
(
!
instanceName
)
if
(
!
instanceName
)
...
...
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