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
548ec2c1
Commit
548ec2c1
authored
Jan 07, 2015
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include ?: in the tests for flow control.
git-svn-id:
https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@29348
e7fa87d3-cd2b-0410-9028-fcbf551c1848
parent
05a62bf5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
9 deletions
+63
-9
400.tesc
Test/400.tesc
+1
-1
150.tesc.out
Test/baseResults/150.tesc.out
+26
-1
400.tesc.out
Test/baseResults/400.tesc.out
+26
-1
glslang.y
glslang/MachineIndependent/glslang.y
+10
-6
No files found.
Test/400.tesc
View file @
548ec2c1
...
@@ -51,7 +51,7 @@ void main()
...
@@ -51,7 +51,7 @@ void main()
barrier(); // ERROR
barrier(); // ERROR
break;
break;
}
}
a < 12 ? a : (barrier(), a); // ERROR
{
{
barrier();
barrier();
}
}
...
...
Test/baseResults/150.tesc.out
View file @
548ec2c1
...
@@ -223,6 +223,7 @@ ERROR: 0:39: '' : tessellation control barrier() cannot be placed within flow co
...
@@ -223,6 +223,7 @@ ERROR: 0:39: '' : tessellation control barrier() cannot be placed within flow co
ERROR: 0:41: '' : tessellation control barrier() cannot be placed within flow control
ERROR: 0:41: '' : tessellation control barrier() cannot be placed within flow control
ERROR: 0:46: '' : tessellation control barrier() cannot be placed within flow control
ERROR: 0:46: '' : tessellation control barrier() cannot be placed within flow control
ERROR: 0:51: '' : tessellation control barrier() cannot be placed within flow control
ERROR: 0:51: '' : tessellation control barrier() cannot be placed within flow control
ERROR: 0:54: '' : tessellation control barrier() cannot be placed within flow control
ERROR: 0:61: '' : tessellation control barrier() cannot be placed after a return from main()
ERROR: 0:61: '' : tessellation control barrier() cannot be placed after a return from main()
ERROR: 0:64: 'vertices' : can only apply to 'out'
ERROR: 0:64: 'vertices' : can only apply to 'out'
ERROR: 0:65: 'vertices' : cannot change previously set layout value
ERROR: 0:65: 'vertices' : cannot change previously set layout value
...
@@ -232,7 +233,7 @@ ERROR: 0:74: 'in' : type must be an array: ina
...
@@ -232,7 +233,7 @@ ERROR: 0:74: 'in' : type must be an array: ina
ERROR: 0:76: '[]' : tessellation input array size must be gl_MaxPatchVertices or implicitly sized
ERROR: 0:76: '[]' : tessellation input array size must be gl_MaxPatchVertices or implicitly sized
ERROR: 0:83: 'location' : overlapping use of location 4
ERROR: 0:83: 'location' : overlapping use of location 4
ERROR: 0:87: 'location' : overlapping use of location 4
ERROR: 0:87: 'location' : overlapping use of location 4
ERROR: 1
7
compilation errors. No code generated.
ERROR: 1
8
compilation errors. No code generated.
Shader version: 400
Shader version: 400
...
@@ -366,6 +367,18 @@ ERROR: node is still EOpNull!
...
@@ -366,6 +367,18 @@ ERROR: node is still EOpNull!
0:? Sequence
0:? Sequence
0:51 Barrier (void)
0:51 Barrier (void)
0:52 Branch: Break
0:52 Branch: Break
0:54 Test condition and select (int)
0:54 Condition
0:54 Compare Less Than (bool)
0:54 'a' (int)
0:54 Constant:
0:54 12 (const int)
0:54 true case
0:54 'a' (int)
0:54 false case
0:54 Comma (int)
0:54 Barrier (void)
0:54 'a' (int)
0:56 Sequence
0:56 Sequence
0:56 Barrier (void)
0:56 Barrier (void)
0:59 Branch: Return
0:59 Branch: Return
...
@@ -1100,6 +1113,18 @@ vertices = 4
...
@@ -1100,6 +1113,18 @@ vertices = 4
0:? Sequence
0:? Sequence
0:51 Barrier (void)
0:51 Barrier (void)
0:52 Branch: Break
0:52 Branch: Break
0:54 Test condition and select (int)
0:54 Condition
0:54 Compare Less Than (bool)
0:54 'a' (int)
0:54 Constant:
0:54 12 (const int)
0:54 true case
0:54 'a' (int)
0:54 false case
0:54 Comma (int)
0:54 Barrier (void)
0:54 'a' (int)
0:56 Sequence
0:56 Sequence
0:56 Barrier (void)
0:56 Barrier (void)
0:59 Branch: Return
0:59 Branch: Return
...
...
Test/baseResults/400.tesc.out
View file @
548ec2c1
...
@@ -8,6 +8,7 @@ ERROR: 0:39: '' : tessellation control barrier() cannot be placed within flow co
...
@@ -8,6 +8,7 @@ ERROR: 0:39: '' : tessellation control barrier() cannot be placed within flow co
ERROR: 0:41: '' : tessellation control barrier() cannot be placed within flow control
ERROR: 0:41: '' : tessellation control barrier() cannot be placed within flow control
ERROR: 0:46: '' : tessellation control barrier() cannot be placed within flow control
ERROR: 0:46: '' : tessellation control barrier() cannot be placed within flow control
ERROR: 0:51: '' : tessellation control barrier() cannot be placed within flow control
ERROR: 0:51: '' : tessellation control barrier() cannot be placed within flow control
ERROR: 0:54: '' : tessellation control barrier() cannot be placed within flow control
ERROR: 0:61: '' : tessellation control barrier() cannot be placed after a return from main()
ERROR: 0:61: '' : tessellation control barrier() cannot be placed after a return from main()
ERROR: 0:64: 'vertices' : can only apply to 'out'
ERROR: 0:64: 'vertices' : can only apply to 'out'
ERROR: 0:65: 'vertices' : cannot change previously set layout value
ERROR: 0:65: 'vertices' : cannot change previously set layout value
...
@@ -17,7 +18,7 @@ ERROR: 0:74: 'in' : type must be an array: ina
...
@@ -17,7 +18,7 @@ ERROR: 0:74: 'in' : type must be an array: ina
ERROR: 0:76: '[]' : tessellation input array size must be gl_MaxPatchVertices or implicitly sized
ERROR: 0:76: '[]' : tessellation input array size must be gl_MaxPatchVertices or implicitly sized
ERROR: 0:83: 'location' : overlapping use of location 4
ERROR: 0:83: 'location' : overlapping use of location 4
ERROR: 0:87: 'location' : overlapping use of location 4
ERROR: 0:87: 'location' : overlapping use of location 4
ERROR: 1
7
compilation errors. No code generated.
ERROR: 1
8
compilation errors. No code generated.
Shader version: 400
Shader version: 400
...
@@ -151,6 +152,18 @@ ERROR: node is still EOpNull!
...
@@ -151,6 +152,18 @@ ERROR: node is still EOpNull!
0:? Sequence
0:? Sequence
0:51 Barrier (void)
0:51 Barrier (void)
0:52 Branch: Break
0:52 Branch: Break
0:54 Test condition and select (int)
0:54 Condition
0:54 Compare Less Than (bool)
0:54 'a' (int)
0:54 Constant:
0:54 12 (const int)
0:54 true case
0:54 'a' (int)
0:54 false case
0:54 Comma (int)
0:54 Barrier (void)
0:54 'a' (int)
0:56 Sequence
0:56 Sequence
0:56 Barrier (void)
0:56 Barrier (void)
0:59 Branch: Return
0:59 Branch: Return
...
@@ -337,6 +350,18 @@ ERROR: node is still EOpNull!
...
@@ -337,6 +350,18 @@ ERROR: node is still EOpNull!
0:? Sequence
0:? Sequence
0:51 Barrier (void)
0:51 Barrier (void)
0:52 Branch: Break
0:52 Branch: Break
0:54 Test condition and select (int)
0:54 Condition
0:54 Compare Less Than (bool)
0:54 'a' (int)
0:54 Constant:
0:54 12 (const int)
0:54 true case
0:54 'a' (int)
0:54 false case
0:54 Comma (int)
0:54 Barrier (void)
0:54 'a' (int)
0:56 Sequence
0:56 Sequence
0:56 Barrier (void)
0:56 Barrier (void)
0:59 Branch: Return
0:59 Branch: Return
...
...
glslang/MachineIndependent/glslang.y
View file @
548ec2c1
...
@@ -568,15 +568,19 @@ logical_or_expression
...
@@ -568,15 +568,19 @@ logical_or_expression
conditional_expression
conditional_expression
: logical_or_expression { $$ = $1; }
: logical_or_expression { $$ = $1; }
| logical_or_expression QUESTION expression COLON assignment_expression {
| logical_or_expression QUESTION {
++parseContext.controlFlowNestingLevel;
}
expression COLON assignment_expression {
--parseContext.controlFlowNestingLevel;
parseContext.boolCheck($2.loc, $1);
parseContext.boolCheck($2.loc, $1);
parseContext.rValueErrorCheck($2.loc, "?", $1);
parseContext.rValueErrorCheck($2.loc, "?", $1);
parseContext.rValueErrorCheck($
4.loc, ":", $3
);
parseContext.rValueErrorCheck($
5.loc, ":", $4
);
parseContext.rValueErrorCheck($
4.loc, ":", $5
);
parseContext.rValueErrorCheck($
5.loc, ":", $6
);
$$ = parseContext.intermediate.addSelection($1, $
3, $5
, $2.loc);
$$ = parseContext.intermediate.addSelection($1, $
4, $6
, $2.loc);
if ($$ == 0) {
if ($$ == 0) {
parseContext.binaryOpError($2.loc, ":", $
3->getCompleteString(), $5
->getCompleteString());
parseContext.binaryOpError($2.loc, ":", $
4->getCompleteString(), $6
->getCompleteString());
$$ = $
5
;
$$ = $
6
;
}
}
}
}
;
;
...
...
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