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
7208473c
Commit
7208473c
authored
Jul 30, 2016
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PP: Non-functional; fix typos and blank spaces.
parent
73d4fb5b
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
28 deletions
+28
-28
numeral.frag.out
Test/baseResults/numeral.frag.out
+2
-2
specExamples.frag.out
Test/baseResults/specExamples.frag.out
+1
-1
tokenLength.vert.out
Test/baseResults/tokenLength.vert.out
+2
-2
revision.h
glslang/Include/revision.h
+1
-1
Scan.cpp
glslang/MachineIndependent/Scan.cpp
+8
-8
Pp.cpp
glslang/MachineIndependent/preprocessor/Pp.cpp
+6
-6
PpScanner.cpp
glslang/MachineIndependent/preprocessor/PpScanner.cpp
+7
-7
PpTokens.h
glslang/MachineIndependent/preprocessor/PpTokens.h
+1
-1
No files found.
Test/baseResults/numeral.frag.out
View file @
7208473c
...
...
@@ -7,8 +7,8 @@ ERROR: 0:17: '' : octal literal too big
ERROR: 0:18: '' : octal literal too big
ERROR: 0:23: '' : octal literal digit too large
ERROR: 0:24: '' : octal literal digit too large
ERROR: 0:49: '' : bad digit in hex
i
decimal literal
ERROR: 0:50: '' : hex
i
decimal literal too big
ERROR: 0:49: '' : bad digit in hex
a
decimal literal
ERROR: 0:50: '' : hex
a
decimal literal too big
ERROR: 0:88: '' : float literal needs a decimal point or exponent
ERROR: 0:98: '' : numeric literal too big
ERROR: 0:101: '' : numeric literal too big
...
...
Test/baseResults/specExamples.frag.out
View file @
7208473c
...
...
@@ -2,7 +2,7 @@ specExamples.frag
Warning, version 430 is not yet complete; most version-specific features are present, but some are missing.
ERROR: 0:6: '=' : cannot convert from 'const uint' to 'global int'
ERROR: 0:20: '' : numeric literal too big
ERROR: 0:21: '' : hex
i
decimal literal too big
ERROR: 0:21: '' : hex
a
decimal literal too big
ERROR: 0:37: 'view' : redefinition
ERROR: 0:63: 'invariant' : can only apply to an output
ERROR: 0:68: 'lightPosition' : redefinition
...
...
Test/baseResults/tokenLength.vert.out
View file @
7208473c
...
...
@@ -2,10 +2,10 @@ tokenLength.vert
ERROR: 0:9: '' : numeric literal too big
ERROR: 0:10: '' : numeric literal too big
ERROR: 0:13: '' : octal literal too big
ERROR: 0:14: '' : hex
i
decimal literal too big
ERROR: 0:14: '' : hex
a
decimal literal too big
ERROR: 0:23: '' : float literal too long
ERROR: 0:32: '' : name too long
ERROR: 0:33: '' : hex
i
decimal literal too big
ERROR: 0:33: '' : hex
a
decimal literal too big
ERROR: 0:34: '' : numeric literal too long
ERROR: 0:34: '' : octal literal too big
ERROR: 0:35: '' : numeric literal too long
...
...
glslang/Include/revision.h
View file @
7208473c
...
...
@@ -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 "SPIRV99.137
0
"
#define GLSLANG_REVISION "SPIRV99.137
3
"
#define GLSLANG_DATE "30-Jul-2016"
glslang/MachineIndependent/Scan.cpp
View file @
7208473c
...
...
@@ -55,7 +55,7 @@
// Required to avoid missing prototype warnings for some compilers
int
yylex
(
YYSTYPE
*
,
glslang
::
TParseContext
&
);
namespace
glslang
{
// read past any white space
...
...
@@ -564,7 +564,7 @@ void TScanContext::fillInKeywordMap()
(
*
KeywordMap
)[
"superp"
]
=
SUPERP
;
ReservedSet
=
new
std
::
unordered_set
<
const
char
*
,
str_hash
,
str_eq
>
;
ReservedSet
->
insert
(
"common"
);
ReservedSet
->
insert
(
"partition"
);
ReservedSet
->
insert
(
"active"
);
...
...
@@ -678,7 +678,7 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token)
case
PpAtomDecrement
:
return
DEC_OP
;
case
PpAtomIncrement
:
return
INC_OP
;
case
PpAtomConstInt
:
parserToken
->
sType
.
lex
.
i
=
ppToken
.
ival
;
return
INTCONSTANT
;
case
PpAtomConstUint
:
parserToken
->
sType
.
lex
.
i
=
ppToken
.
ival
;
return
UINTCONSTANT
;
case
PpAtomConstInt64
:
parserToken
->
sType
.
lex
.
i64
=
ppToken
.
i64val
;
return
INT64CONSTANT
;
...
...
@@ -850,7 +850,7 @@ int TScanContext::tokenizeIdentifier()
case
MAT3X4
:
case
MAT4X2
:
case
MAT4X3
:
case
MAT4X4
:
case
MAT4X4
:
return
matNxM
();
case
DMAT2
:
...
...
@@ -976,7 +976,7 @@ int TScanContext::tokenizeIdentifier()
case
USAMPLER2DARRAY
:
afterType
=
true
;
return
nonreservedKeyword
(
300
,
130
);
case
ISAMPLER2DRECT
:
case
USAMPLER2DRECT
:
afterType
=
true
;
...
...
@@ -994,7 +994,7 @@ int TScanContext::tokenizeIdentifier()
if
(
parseContext
.
extensionsTurnedOn
(
Num_AEP_texture_buffer
,
AEP_texture_buffer
))
return
keyword
;
return
es30ReservedFromGLSL
(
140
);
case
SAMPLER2DMS
:
case
ISAMPLER2DMS
:
case
USAMPLER2DMS
:
...
...
@@ -1113,7 +1113,7 @@ int TScanContext::tokenizeIdentifier()
case
NOPERSPECTIVE
:
return
es30ReservedFromGLSL
(
130
);
case
SMOOTH
:
if
((
parseContext
.
profile
==
EEsProfile
&&
parseContext
.
version
<
300
)
||
(
parseContext
.
profile
!=
EEsProfile
&&
parseContext
.
version
<
130
))
...
...
@@ -1172,7 +1172,7 @@ int TScanContext::tokenizeIdentifier()
bool
reserved
=
parseContext
.
profile
==
EEsProfile
||
parseContext
.
version
>=
130
;
return
identifierOrReserved
(
reserved
);
}
default
:
parseContext
.
infoSink
.
info
.
message
(
EPrefixInternalError
,
"Unknown glslang keyword"
,
loc
);
return
0
;
...
...
glslang/MachineIndependent/preprocessor/Pp.cpp
View file @
7208473c
...
...
@@ -192,7 +192,7 @@ int TPpContext::CPPdefine(TPpToken* ppToken)
do
{
int
oldToken
;
TPpToken
oldPpToken
;
TPpToken
newPpToken
;
TPpToken
newPpToken
;
oldToken
=
ReadToken
(
symb
->
mac
.
body
,
&
oldPpToken
);
newToken
=
ReadToken
(
mac
.
body
,
&
newPpToken
);
if
(
oldToken
!=
newToken
||
oldPpToken
!=
newPpToken
)
{
...
...
@@ -250,7 +250,7 @@ int TPpContext::CPPelse(int matchelse, TPpToken* ppToken)
if
(
token
!=
'#'
)
{
while
(
token
!=
'\n'
&&
token
!=
EndOfInput
)
token
=
scanToken
(
ppToken
);
if
(
token
==
EndOfInput
)
return
token
;
...
...
@@ -495,7 +495,7 @@ int TPpContext::eval(int token, int precedence, bool shortCircuit, int& res, boo
if
(
op
<
0
||
binop
[
op
].
precedence
<=
precedence
)
break
;
int
leftSide
=
res
;
// Setup short-circuiting, needed for ES, unless already in a short circuit.
// (Once in a short-circuit, can't turn off again, until that whole subexpression is done.
if
(
!
shortCircuit
)
{
...
...
@@ -756,7 +756,7 @@ int TPpContext::CPPpragma(TPpToken* ppToken)
else
parseContext
.
handlePragma
(
loc
,
tokens
);
return
token
;
return
token
;
}
// #version: This is just for error checking: the version and profile are decided before preprocessing starts
...
...
@@ -980,7 +980,7 @@ int TPpContext::tMacroInput::scan(TPpToken* ppToken)
if
(
token
==
EndOfInput
)
mac
->
busy
=
0
;
return
token
;
}
...
...
@@ -1060,7 +1060,7 @@ int TPpContext::MacroExpand(int atom, TPpToken* ppToken, bool expandUndef, bool
if
(
sym
->
mac
.
args
)
{
token
=
scanToken
(
ppToken
);
if
(
newLineOkay
)
{
while
(
token
==
'\n'
)
while
(
token
==
'\n'
)
token
=
scanToken
(
ppToken
);
}
if
(
token
!=
'('
)
{
...
...
glslang/MachineIndependent/preprocessor/PpScanner.cpp
View file @
7208473c
...
...
@@ -298,7 +298,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
ppToken
->
name
[
len
++
]
=
(
char
)
ch
;
ch
=
getch
();
if
(
ch
==
'x'
||
ch
==
'X'
)
{
// must be hex
i
decimal
// must be hex
a
decimal
bool
isUnsigned
=
false
;
bool
isInt64
=
false
;
...
...
@@ -319,11 +319,11 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
}
else
if
(
ch
>=
'a'
&&
ch
<=
'f'
)
{
ii
=
ch
-
'a'
+
10
;
}
else
pp
->
parseContext
.
ppError
(
ppToken
->
loc
,
"bad digit in hex
i
decimal literal"
,
""
,
""
);
pp
->
parseContext
.
ppError
(
ppToken
->
loc
,
"bad digit in hex
a
decimal literal"
,
""
,
""
);
ival
=
(
ival
<<
4
)
|
ii
;
}
else
{
if
(
!
AlreadyComplained
)
{
pp
->
parseContext
.
ppError
(
ppToken
->
loc
,
"hex
i
decimal literal too big"
,
""
,
""
);
pp
->
parseContext
.
ppError
(
ppToken
->
loc
,
"hex
a
decimal literal too big"
,
""
,
""
);
AlreadyComplained
=
1
;
}
ival
=
0xffffffffffffffffull
;
...
...
@@ -333,7 +333,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
(
ch
>=
'A'
&&
ch
<=
'F'
)
||
(
ch
>=
'a'
&&
ch
<=
'f'
));
}
else
{
pp
->
parseContext
.
ppError
(
ppToken
->
loc
,
"bad digit in hex
i
decimal literal"
,
""
,
""
);
pp
->
parseContext
.
ppError
(
ppToken
->
loc
,
"bad digit in hex
a
decimal literal"
,
""
,
""
);
}
if
(
ch
==
'u'
||
ch
==
'U'
)
{
if
(
len
<
MaxTokenLength
)
...
...
@@ -405,7 +405,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
}
if
(
ch
==
'.'
||
ch
==
'e'
||
ch
==
'f'
||
ch
==
'E'
||
ch
==
'F'
)
return
pp
->
lFloatConst
(
len
,
ch
,
ppToken
);
// wasn't a float, so must be octal...
if
(
nonOctal
)
pp
->
parseContext
.
ppError
(
ppToken
->
loc
,
"octal literal digit too large"
,
""
,
""
);
...
...
@@ -447,7 +447,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
break
;
case
'1'
:
case
'2'
:
case
'3'
:
case
'4'
:
case
'5'
:
case
'6'
:
case
'7'
:
case
'8'
:
case
'9'
:
// can't be hex
i
decimal or octal, is either decimal or floating point
// can't be hex
a
decimal or octal, is either decimal or floating point
do
{
if
(
len
<
MaxTokenLength
)
...
...
@@ -705,7 +705,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
// Return 0 when no more tokens.
//
const
char
*
TPpContext
::
tokenize
(
TPpToken
*
ppToken
)
{
{
int
token
=
'\n'
;
for
(;;)
{
...
...
glslang/MachineIndependent/preprocessor/PpTokens.h
View file @
7208473c
...
...
@@ -125,7 +125,7 @@ enum EFixedAtoms {
PpAtomConstDouble
,
PpAtomConstString
,
// I
n
dentifiers
// Identifiers
PpAtomIdentifier
,
// preprocessor "keywords"
...
...
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