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
3c1e0805
Commit
3c1e0805
authored
May 04, 2016
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Front-end precise: Propagate noContraction up the AST when dereferencing structs.
This should be the last commit in this sequence to form the base of the work in pull request #222.
parent
17f07864
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
specExamples.vert.out
Test/baseResults/specExamples.vert.out
+10
-10
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+5
-1
No files found.
Test/baseResults/specExamples.vert.out
View file @
3c1e0805
...
@@ -110,7 +110,7 @@ ERROR: node is still EOpNull!
...
@@ -110,7 +110,7 @@ ERROR: node is still EOpNull!
0:161 'c' (in 4-component vector of float)
0:161 'c' (in 4-component vector of float)
0:161 'd' (in 4-component vector of float)
0:161 'd' (in 4-component vector of float)
0:162 move second child to first child (temp 3-component vector of float)
0:162 move second child to first child (temp 3-component vector of float)
0:162 vector swizzle (temp 3-component vector of float)
0:162 vector swizzle (
noContraction
temp 3-component vector of float)
0:162 'v' (noContraction smooth out 4-component vector of float)
0:162 'v' (noContraction smooth out 4-component vector of float)
0:162 Sequence
0:162 Sequence
0:162 Constant:
0:162 Constant:
...
@@ -123,7 +123,7 @@ ERROR: node is still EOpNull!
...
@@ -123,7 +123,7 @@ ERROR: node is still EOpNull!
0:162 'r' (temp 3-component vector of float)
0:162 'r' (temp 3-component vector of float)
0:162 's' (temp 3-component vector of float)
0:162 's' (temp 3-component vector of float)
0:163 move second child to first child (temp float)
0:163 move second child to first child (temp float)
0:163 direct index (temp float)
0:163 direct index (
noContraction
temp float)
0:163 'v' (noContraction smooth out 4-component vector of float)
0:163 'v' (noContraction smooth out 4-component vector of float)
0:163 Constant:
0:163 Constant:
0:163 3 (const int)
0:163 3 (const int)
...
@@ -147,7 +147,7 @@ ERROR: node is still EOpNull!
...
@@ -147,7 +147,7 @@ ERROR: node is still EOpNull!
0:163 Constant:
0:163 Constant:
0:163 3 (const int)
0:163 3 (const int)
0:164 move second child to first child (temp float)
0:164 move second child to first child (temp float)
0:164 direct index (temp float)
0:164 direct index (
noContraction
temp float)
0:164 'v' (noContraction smooth out 4-component vector of float)
0:164 'v' (noContraction smooth out 4-component vector of float)
0:164 Constant:
0:164 Constant:
0:164 0 (const int)
0:164 0 (const int)
...
@@ -169,7 +169,7 @@ ERROR: node is still EOpNull!
...
@@ -169,7 +169,7 @@ ERROR: node is still EOpNull!
0:164 Constant:
0:164 Constant:
0:164 0 (const int)
0:164 0 (const int)
0:166 move second child to first child (temp float)
0:166 move second child to first child (temp float)
0:166 direct index (temp float)
0:166 direct index (
noContraction
temp float)
0:166 'v' (noContraction smooth out 4-component vector of float)
0:166 'v' (noContraction smooth out 4-component vector of float)
0:166 Constant:
0:166 Constant:
0:166 0 (const int)
0:166 0 (const int)
...
@@ -209,7 +209,7 @@ ERROR: node is still EOpNull!
...
@@ -209,7 +209,7 @@ ERROR: node is still EOpNull!
0:167 'd' (in 4-component vector of float)
0:167 'd' (in 4-component vector of float)
0:167 Constant:
0:167 Constant:
0:167 0 (const int)
0:167 0 (const int)
0:167 direct index (temp float)
0:167 direct index (
noContraction
temp float)
0:167 'v' (noContraction smooth out 4-component vector of float)
0:167 'v' (noContraction smooth out 4-component vector of float)
0:167 Constant:
0:167 Constant:
0:167 0 (const int)
0:167 0 (const int)
...
@@ -394,7 +394,7 @@ ERROR: node is still EOpNull!
...
@@ -394,7 +394,7 @@ ERROR: node is still EOpNull!
0:161 'c' (in 4-component vector of float)
0:161 'c' (in 4-component vector of float)
0:161 'd' (in 4-component vector of float)
0:161 'd' (in 4-component vector of float)
0:162 move second child to first child (temp 3-component vector of float)
0:162 move second child to first child (temp 3-component vector of float)
0:162 vector swizzle (temp 3-component vector of float)
0:162 vector swizzle (
noContraction
temp 3-component vector of float)
0:162 'v' (noContraction smooth out 4-component vector of float)
0:162 'v' (noContraction smooth out 4-component vector of float)
0:162 Sequence
0:162 Sequence
0:162 Constant:
0:162 Constant:
...
@@ -407,7 +407,7 @@ ERROR: node is still EOpNull!
...
@@ -407,7 +407,7 @@ ERROR: node is still EOpNull!
0:162 'r' (temp 3-component vector of float)
0:162 'r' (temp 3-component vector of float)
0:162 's' (temp 3-component vector of float)
0:162 's' (temp 3-component vector of float)
0:163 move second child to first child (temp float)
0:163 move second child to first child (temp float)
0:163 direct index (temp float)
0:163 direct index (
noContraction
temp float)
0:163 'v' (noContraction smooth out 4-component vector of float)
0:163 'v' (noContraction smooth out 4-component vector of float)
0:163 Constant:
0:163 Constant:
0:163 3 (const int)
0:163 3 (const int)
...
@@ -431,7 +431,7 @@ ERROR: node is still EOpNull!
...
@@ -431,7 +431,7 @@ ERROR: node is still EOpNull!
0:163 Constant:
0:163 Constant:
0:163 3 (const int)
0:163 3 (const int)
0:164 move second child to first child (temp float)
0:164 move second child to first child (temp float)
0:164 direct index (temp float)
0:164 direct index (
noContraction
temp float)
0:164 'v' (noContraction smooth out 4-component vector of float)
0:164 'v' (noContraction smooth out 4-component vector of float)
0:164 Constant:
0:164 Constant:
0:164 0 (const int)
0:164 0 (const int)
...
@@ -453,7 +453,7 @@ ERROR: node is still EOpNull!
...
@@ -453,7 +453,7 @@ ERROR: node is still EOpNull!
0:164 Constant:
0:164 Constant:
0:164 0 (const int)
0:164 0 (const int)
0:166 move second child to first child (temp float)
0:166 move second child to first child (temp float)
0:166 direct index (temp float)
0:166 direct index (
noContraction
temp float)
0:166 'v' (noContraction smooth out 4-component vector of float)
0:166 'v' (noContraction smooth out 4-component vector of float)
0:166 Constant:
0:166 Constant:
0:166 0 (const int)
0:166 0 (const int)
...
@@ -493,7 +493,7 @@ ERROR: node is still EOpNull!
...
@@ -493,7 +493,7 @@ ERROR: node is still EOpNull!
0:167 'd' (in 4-component vector of float)
0:167 'd' (in 4-component vector of float)
0:167 Constant:
0:167 Constant:
0:167 0 (const int)
0:167 0 (const int)
0:167 direct index (temp float)
0:167 direct index (
noContraction
temp float)
0:167 'v' (noContraction smooth out 4-component vector of float)
0:167 'v' (noContraction smooth out 4-component vector of float)
0:167 Constant:
0:167 Constant:
0:167 0 (const int)
0:167 0 (const int)
...
...
glslang/MachineIndependent/ParseHelper.cpp
View file @
3c1e0805
...
@@ -781,7 +781,7 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm
...
@@ -781,7 +781,7 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm
//
//
// .length() can't be resolved until we later see the function-calling syntax.
// .length() can't be resolved until we later see the function-calling syntax.
// Save away the name in the AST for now. Processing is comp
e
leted in
// Save away the name in the AST for now. Processing is completed in
// handleLengthMethod().
// handleLengthMethod().
//
//
if
(
field
==
"length"
)
{
if
(
field
==
"length"
)
{
...
@@ -879,6 +879,10 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm
...
@@ -879,6 +879,10 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm
}
else
}
else
error
(
loc
,
"does not apply to this type:"
,
field
.
c_str
(),
base
->
getType
().
getCompleteString
().
c_str
());
error
(
loc
,
"does not apply to this type:"
,
field
.
c_str
(),
base
->
getType
().
getCompleteString
().
c_str
());
// Propagate noContraction up the dereference chain
if
(
base
->
getQualifier
().
noContraction
)
result
->
getWritableType
().
getQualifier
().
noContraction
=
true
;
return
result
;
return
result
;
}
}
...
...
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