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
016e47f7
Commit
016e47f7
authored
Oct 22, 2017
by
John Kessenich
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'only-parse-inf-constant-in-hlsl' of…
Merge branch 'only-parse-inf-constant-in-hlsl' of
https://github.com/xorgy/glslang
into xorgy-only-parse-inf-constant-in-hlsl
parents
6e33b787
60312662
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
36 deletions
+4
-36
numeral.frag.out
Test/baseResults/numeral.frag.out
+3
-35
PpScanner.cpp
glslang/MachineIndependent/preprocessor/PpScanner.cpp
+1
-1
No files found.
Test/baseResults/numeral.frag.out
View file @
016e47f7
...
@@ -11,7 +11,9 @@ ERROR: 0:50: '' : hexadecimal literal too big
...
@@ -11,7 +11,9 @@ ERROR: 0:50: '' : hexadecimal literal too big
ERROR: 0:88: '' : float literal needs a decimal point or exponent
ERROR: 0:88: '' : float literal needs a decimal point or exponent
ERROR: 0:98: '' : numeric literal too big
ERROR: 0:98: '' : numeric literal too big
ERROR: 0:101: '' : numeric literal too big
ERROR: 0:101: '' : numeric literal too big
ERROR: 12 compilation errors. No code generated.
ERROR: 0:104: '#' : preprocessor directive cannot be preceded by another token
ERROR: 0:104: '' : syntax error, unexpected $end, expecting COMMA or SEMICOLON
ERROR: 14 compilation errors. No code generated.
Shader version: 400
Shader version: 400
...
@@ -404,21 +406,6 @@ ERROR: node is still EOpNull!
...
@@ -404,21 +406,6 @@ ERROR: node is still EOpNull!
0:103 'g6' ( global int)
0:103 'g6' ( global int)
0:103 Constant:
0:103 Constant:
0:103 -2 (const int)
0:103 -2 (const int)
0:104 Sequence
0:104 move second child to first child ( temp float)
0:104 'inf1' ( global float)
0:104 Constant:
0:104 -1.#INF
0:105 Sequence
0:105 move second child to first child ( temp float)
0:105 'inf2' ( global float)
0:105 Constant:
0:105 +1.#INF
0:106 Sequence
0:106 move second child to first child ( temp float)
0:106 'inf3' ( global float)
0:106 Constant:
0:106 +1.#INF
0:? Linker Objects
0:? Linker Objects
0:? 'c2' (layout( location=2) out 4-component vector of float)
0:? 'c2' (layout( location=2) out 4-component vector of float)
0:? 'c3' (layout( location=3) out 4-component vector of float)
0:? 'c3' (layout( location=3) out 4-component vector of float)
...
@@ -433,8 +420,6 @@ ERROR: node is still EOpNull!
...
@@ -433,8 +420,6 @@ ERROR: node is still EOpNull!
0:? 'g5' ( global int)
0:? 'g5' ( global int)
0:? 'g6' ( global int)
0:? 'g6' ( global int)
0:? 'inf1' ( global float)
0:? 'inf1' ( global float)
0:? 'inf2' ( global float)
0:? 'inf3' ( global float)
Linked fragment stage:
Linked fragment stage:
...
@@ -830,21 +815,6 @@ ERROR: node is still EOpNull!
...
@@ -830,21 +815,6 @@ ERROR: node is still EOpNull!
0:103 'g6' ( global int)
0:103 'g6' ( global int)
0:103 Constant:
0:103 Constant:
0:103 -2 (const int)
0:103 -2 (const int)
0:104 Sequence
0:104 move second child to first child ( temp float)
0:104 'inf1' ( global float)
0:104 Constant:
0:104 -1.#INF
0:105 Sequence
0:105 move second child to first child ( temp float)
0:105 'inf2' ( global float)
0:105 Constant:
0:105 +1.#INF
0:106 Sequence
0:106 move second child to first child ( temp float)
0:106 'inf3' ( global float)
0:106 Constant:
0:106 +1.#INF
0:? Linker Objects
0:? Linker Objects
0:? 'c2' (layout( location=2) out 4-component vector of float)
0:? 'c2' (layout( location=2) out 4-component vector of float)
0:? 'c3' (layout( location=3) out 4-component vector of float)
0:? 'c3' (layout( location=3) out 4-component vector of float)
...
@@ -859,6 +829,4 @@ ERROR: node is still EOpNull!
...
@@ -859,6 +829,4 @@ ERROR: node is still EOpNull!
0:? 'g5' ( global int)
0:? 'g5' ( global int)
0:? 'g6' ( global int)
0:? 'g6' ( global int)
0:? 'inf1' ( global float)
0:? 'inf1' ( global float)
0:? 'inf2' ( global float)
0:? 'inf3' ( global float)
glslang/MachineIndependent/preprocessor/PpScanner.cpp
View file @
016e47f7
...
@@ -128,7 +128,7 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken)
...
@@ -128,7 +128,7 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken)
ch
=
getChar
();
ch
=
getChar
();
// 1.#INF or -1.#INF
// 1.#INF or -1.#INF
if
(
ch
==
'#'
)
{
if
(
parseContext
.
intermediate
.
getSource
()
==
EShSourceHlsl
&&
ch
==
'#'
)
{
if
((
len
<
2
)
||
if
((
len
<
2
)
||
(
len
==
2
&&
ppToken
->
name
[
0
]
!=
'1'
)
||
(
len
==
2
&&
ppToken
->
name
[
0
]
!=
'1'
)
||
(
len
==
3
&&
ppToken
->
name
[
1
]
!=
'1'
&&
!
(
ppToken
->
name
[
0
]
==
'-'
||
ppToken
->
name
[
0
]
==
'+'
))
||
(
len
==
3
&&
ppToken
->
name
[
1
]
!=
'1'
&&
!
(
ppToken
->
name
[
0
]
==
'-'
||
ppToken
->
name
[
0
]
==
'+'
))
||
...
...
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