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
ba5685a3
Commit
ba5685a3
authored
Feb 02, 2016
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Semantics: Map noise*() to an operator for PureOperatorBuiltins mode.
Fixes issue #157.
parent
32cfd49b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
220 additions
and
137 deletions
+220
-137
120.vert
Test/120.vert
+8
-0
120.vert.out
Test/baseResults/120.vert.out
+203
-137
intermediate.h
glslang/Include/intermediate.h
+2
-0
Initialize.cpp
glslang/MachineIndependent/Initialize.cpp
+5
-0
intermOut.cpp
glslang/MachineIndependent/intermOut.cpp
+2
-0
No files found.
Test/120.vert
View file @
ba5685a3
...
...
@@ -139,6 +139,14 @@ void foo2()
bool
b
=
any
(
lessThan
(
v4
,
attv4
));
// tests aggregate arg to unary built-in
}
void
noise
()
{
float
f1
=
noise1
(
1
.
0
);
vec2
f2
=
noise2
(
vec2
(
1
.
0
));
vec3
f3
=
noise3
(
vec3
(
1
.
0
));
vec4
f4
=
noise4
(
vec4
(
1
.
0
));
}
// version 130 features
uniform
int
c
;
...
...
Test/baseResults/120.vert.out
View file @
ba5685a3
...
...
@@ -45,39 +45,39 @@ ERROR: 0:108: 'overloadE' : no matching overloaded function found
ERROR: 0:111: 'overloadE' : no matching overloaded function found
ERROR: 0:117: 'overloadF' : no matching overloaded function found
ERROR: 0:121: 'gl_TexCoord array size' : must be less than gl_MaxTextureCoords (32)
ERROR: 0:1
57
: 'switch' : Reserved word.
ERROR: 0:1
63
: 'default' : Reserved word.
ERROR: 0:1
57
: 'switch statements' : not supported for this version or the enabled extensions
ERROR: 0:1
68
: 'bit shift left' : not supported for this version or the enabled extensions
ERROR: 0:1
68
: 'bit shift right' : not supported for this version or the enabled extensions
ERROR: 0:1
68
: 'bitwise and' : not supported for this version or the enabled extensions
ERROR: 0:1
68
: 'bitwise inclusive or' : not supported for this version or the enabled extensions
ERROR: 0:17
1
: 'modf' : no matching overloaded function found
ERROR: 0:17
1
: '=' : cannot convert from 'const float' to 'temp 3-component vector of float'
ERROR: 0:1
72
: 'trunc' : no matching overloaded function found
ERROR: 0:1
73
: 'round' : no matching overloaded function found
ERROR: 0:1
73
: '=' : cannot convert from 'const float' to 'temp 2-component vector of float'
ERROR: 0:1
74
: 'roundEven' : no matching overloaded function found
ERROR: 0:1
74
: '=' : cannot convert from 'const float' to 'temp 2-component vector of float'
ERROR: 0:1
75
: 'isnan' : no matching overloaded function found
ERROR: 0:1
75
: '=' : cannot convert from 'const float' to 'temp 2-component vector of bool'
ERROR: 0:1
76
: 'isinf' : no matching overloaded function found
ERROR: 0:1
76
: '=' : cannot convert from 'const float' to 'temp 4-component vector of bool'
ERROR: 0:1
78
: 'sinh' : no matching overloaded function found
ERROR: 0:1
79
: 'cosh' : no matching overloaded function found
ERROR: 0:1
79
: 'tanh' : no matching overloaded function found
ERROR: 0:18
0
: 'c4D' : undeclared identifier
ERROR: 0:18
0
: 'asinh' : no matching overloaded function found
ERROR: 0:18
0
: 'acosh' : no matching overloaded function found
ERROR: 0:18
1
: 'atanh' : no matching overloaded function found
ERROR: 0:1
83
: 'gl_VertexID' : undeclared identifier
ERROR: 0:1
83
: '=' : cannot convert from 'temp float' to 'temp int'
ERROR: 0:1
84
: 'gl_ClipDistance' : undeclared identifier
ERROR: 0:1
84
: 'gl_ClipDistance' : left of '[' is not of type array, matrix, or vector
ERROR: 0:1
84
: 'assign' : l-value required (can't modify a const)
ERROR: 0:19
0
: 'token pasting (##)' : not supported for this version or the enabled extensions
ERROR: 0:19
0
: '##' : token pasting not implemented (internal error)
ERROR: 0:19
0
: '' : syntax error
ERROR: 0:1
65
: 'switch' : Reserved word.
ERROR: 0:1
71
: 'default' : Reserved word.
ERROR: 0:1
65
: 'switch statements' : not supported for this version or the enabled extensions
ERROR: 0:1
76
: 'bit shift left' : not supported for this version or the enabled extensions
ERROR: 0:1
76
: 'bit shift right' : not supported for this version or the enabled extensions
ERROR: 0:1
76
: 'bitwise and' : not supported for this version or the enabled extensions
ERROR: 0:1
76
: 'bitwise inclusive or' : not supported for this version or the enabled extensions
ERROR: 0:17
9
: 'modf' : no matching overloaded function found
ERROR: 0:17
9
: '=' : cannot convert from 'const float' to 'temp 3-component vector of float'
ERROR: 0:1
80
: 'trunc' : no matching overloaded function found
ERROR: 0:1
81
: 'round' : no matching overloaded function found
ERROR: 0:1
81
: '=' : cannot convert from 'const float' to 'temp 2-component vector of float'
ERROR: 0:1
82
: 'roundEven' : no matching overloaded function found
ERROR: 0:1
82
: '=' : cannot convert from 'const float' to 'temp 2-component vector of float'
ERROR: 0:1
83
: 'isnan' : no matching overloaded function found
ERROR: 0:1
83
: '=' : cannot convert from 'const float' to 'temp 2-component vector of bool'
ERROR: 0:1
84
: 'isinf' : no matching overloaded function found
ERROR: 0:1
84
: '=' : cannot convert from 'const float' to 'temp 4-component vector of bool'
ERROR: 0:1
86
: 'sinh' : no matching overloaded function found
ERROR: 0:1
87
: 'cosh' : no matching overloaded function found
ERROR: 0:1
87
: 'tanh' : no matching overloaded function found
ERROR: 0:18
8
: 'c4D' : undeclared identifier
ERROR: 0:18
8
: 'asinh' : no matching overloaded function found
ERROR: 0:18
8
: 'acosh' : no matching overloaded function found
ERROR: 0:18
9
: 'atanh' : no matching overloaded function found
ERROR: 0:1
91
: 'gl_VertexID' : undeclared identifier
ERROR: 0:1
91
: '=' : cannot convert from 'temp float' to 'temp int'
ERROR: 0:1
92
: 'gl_ClipDistance' : undeclared identifier
ERROR: 0:1
92
: 'gl_ClipDistance' : left of '[' is not of type array, matrix, or vector
ERROR: 0:1
92
: 'assign' : l-value required (can't modify a const)
ERROR: 0:19
8
: 'token pasting (##)' : not supported for this version or the enabled extensions
ERROR: 0:19
8
: '##' : token pasting not implemented (internal error)
ERROR: 0:19
8
: '' : syntax error
ERROR: 79 compilation errors. No code generated.
...
...
@@ -314,66 +314,99 @@ ERROR: node is still EOpNull!
0:139 Compare Less Than (global 4-component vector of bool)
0:139 'v4' (temp 4-component vector of float)
0:139 'attv4' (in 4-component vector of float)
0:154 Function Definition: foo213( (global void)
0:154 Function Parameters:
0:156 Sequence
0:156 Sequence
0:156 move second child to first child (temp float)
0:156 'f' (temp float)
0:156 Constant:
0:156 3.000000
0:157 switch
0:157 condition
0:157 'c' (uniform int)
0:157 body
0:157 Sequence
0:158 case: with expression
0:158 Constant:
0:158 1 (const int)
0:? Sequence
0:159 move second child to first child (temp float)
0:159 'f' (temp float)
0:159 sine (global float)
0:159 'f' (temp float)
0:160 Branch: Break
0:161 case: with expression
0:161 Constant:
0:161 2 (const int)
0:? Sequence
0:162 move second child to first child (temp float)
0:162 'f' (temp float)
0:162 component-wise multiply (temp float)
0:162 'f' (temp float)
0:162 'f' (temp float)
0:163 default:
0:? Sequence
0:142 Function Definition: noise( (global void)
0:142 Function Parameters:
0:144 Sequence
0:144 Sequence
0:144 move second child to first child (temp float)
0:144 'f1' (temp float)
0:144 noise (global float)
0:144 Constant:
0:144 1.000000
0:145 Sequence
0:145 move second child to first child (temp 2-component vector of float)
0:145 'f2' (temp 2-component vector of float)
0:145 noise (global 2-component vector of float)
0:145 Constant:
0:145 1.000000
0:145 1.000000
0:146 Sequence
0:146 move second child to first child (temp 3-component vector of float)
0:146 'f3' (temp 3-component vector of float)
0:146 noise (global 3-component vector of float)
0:146 Constant:
0:146 1.000000
0:146 1.000000
0:146 1.000000
0:147 Sequence
0:147 move second child to first child (temp 4-component vector of float)
0:147 'f4' (temp 4-component vector of float)
0:147 noise (global 4-component vector of float)
0:147 Constant:
0:147 1.000000
0:147 1.000000
0:147 1.000000
0:147 1.000000
0:162 Function Definition: foo213( (global void)
0:162 Function Parameters:
0:164 Sequence
0:164 Sequence
0:164 move second child to first child (temp float)
0:164 'f' (temp float)
0:164 Constant:
0:164 3.000000
0:168 inclusive-or (temp int)
0:168 left-shift (temp int)
0:168 'i' (temp int)
0:168 Constant:
0:168 3 (const int)
0:168 Constant:
0:168 69 (const int)
0:172 Sequence
0:165 switch
0:165 condition
0:165 'c' (uniform int)
0:165 body
0:165 Sequence
0:166 case: with expression
0:166 Constant:
0:166 1 (const int)
0:? Sequence
0:167 move second child to first child (temp float)
0:167 'f' (temp float)
0:167 sine (global float)
0:167 'f' (temp float)
0:168 Branch: Break
0:169 case: with expression
0:169 Constant:
0:169 2 (const int)
0:? Sequence
0:170 move second child to first child (temp float)
0:170 'f' (temp float)
0:170 component-wise multiply (temp float)
0:170 'f' (temp float)
0:170 'f' (temp float)
0:171 default:
0:? Sequence
0:172 move second child to first child (temp float)
0:172
't
' (temp float)
0:172
'f
' (temp float)
0:172 Constant:
0:172 0.000000
0:178 Constant:
0:178 0.000000
0:172 3.000000
0:176 inclusive-or (temp int)
0:176 left-shift (temp int)
0:176 'i' (temp int)
0:176 Constant:
0:176 3 (const int)
0:176 Constant:
0:176 69 (const int)
0:180 Sequence
0:180 move second child to first child (temp float)
0:180 't' (temp float)
0:180 Constant:
0:180 0.000000
0:181 Constant:
0:181 0.000000
0:184 move second child to first child (temp float)
0:184 Constant:
0:184 0.000000
0:184 Constant:
0:184 0.300000
0:186 Constant:
0:186 0.000000
0:188 Constant:
0:188 0.000000
0:189 Constant:
0:189 0.000000
0:192 move second child to first child (temp float)
0:192 Constant:
0:192 0.000000
0:192 Constant:
0:192 0.300000
0:? Linker Objects
0:? 'i' (in 4-component vector of float)
0:? 'o' (smooth out 4-component vector of float)
...
...
@@ -633,66 +666,99 @@ ERROR: node is still EOpNull!
0:139 Compare Less Than (global 4-component vector of bool)
0:139 'v4' (temp 4-component vector of float)
0:139 'attv4' (in 4-component vector of float)
0:154 Function Definition: foo213( (global void)
0:154 Function Parameters:
0:156 Sequence
0:156 Sequence
0:156 move second child to first child (temp float)
0:156 'f' (temp float)
0:156 Constant:
0:156 3.000000
0:157 switch
0:157 condition
0:157 'c' (uniform int)
0:157 body
0:157 Sequence
0:158 case: with expression
0:158 Constant:
0:158 1 (const int)
0:? Sequence
0:159 move second child to first child (temp float)
0:159 'f' (temp float)
0:159 sine (global float)
0:159 'f' (temp float)
0:160 Branch: Break
0:161 case: with expression
0:161 Constant:
0:161 2 (const int)
0:? Sequence
0:162 move second child to first child (temp float)
0:162 'f' (temp float)
0:162 component-wise multiply (temp float)
0:162 'f' (temp float)
0:162 'f' (temp float)
0:163 default:
0:? Sequence
0:142 Function Definition: noise( (global void)
0:142 Function Parameters:
0:144 Sequence
0:144 Sequence
0:144 move second child to first child (temp float)
0:144 'f1' (temp float)
0:144 noise (global float)
0:144 Constant:
0:144 1.000000
0:145 Sequence
0:145 move second child to first child (temp 2-component vector of float)
0:145 'f2' (temp 2-component vector of float)
0:145 noise (global 2-component vector of float)
0:145 Constant:
0:145 1.000000
0:145 1.000000
0:146 Sequence
0:146 move second child to first child (temp 3-component vector of float)
0:146 'f3' (temp 3-component vector of float)
0:146 noise (global 3-component vector of float)
0:146 Constant:
0:146 1.000000
0:146 1.000000
0:146 1.000000
0:147 Sequence
0:147 move second child to first child (temp 4-component vector of float)
0:147 'f4' (temp 4-component vector of float)
0:147 noise (global 4-component vector of float)
0:147 Constant:
0:147 1.000000
0:147 1.000000
0:147 1.000000
0:147 1.000000
0:162 Function Definition: foo213( (global void)
0:162 Function Parameters:
0:164 Sequence
0:164 Sequence
0:164 move second child to first child (temp float)
0:164 'f' (temp float)
0:164 Constant:
0:164 3.000000
0:168 inclusive-or (temp int)
0:168 left-shift (temp int)
0:168 'i' (temp int)
0:168 Constant:
0:168 3 (const int)
0:168 Constant:
0:168 69 (const int)
0:172 Sequence
0:165 switch
0:165 condition
0:165 'c' (uniform int)
0:165 body
0:165 Sequence
0:166 case: with expression
0:166 Constant:
0:166 1 (const int)
0:? Sequence
0:167 move second child to first child (temp float)
0:167 'f' (temp float)
0:167 sine (global float)
0:167 'f' (temp float)
0:168 Branch: Break
0:169 case: with expression
0:169 Constant:
0:169 2 (const int)
0:? Sequence
0:170 move second child to first child (temp float)
0:170 'f' (temp float)
0:170 component-wise multiply (temp float)
0:170 'f' (temp float)
0:170 'f' (temp float)
0:171 default:
0:? Sequence
0:172 move second child to first child (temp float)
0:172
't
' (temp float)
0:172
'f
' (temp float)
0:172 Constant:
0:172 0.000000
0:178 Constant:
0:178 0.000000
0:172 3.000000
0:176 inclusive-or (temp int)
0:176 left-shift (temp int)
0:176 'i' (temp int)
0:176 Constant:
0:176 3 (const int)
0:176 Constant:
0:176 69 (const int)
0:180 Sequence
0:180 move second child to first child (temp float)
0:180 't' (temp float)
0:180 Constant:
0:180 0.000000
0:181 Constant:
0:181 0.000000
0:184 move second child to first child (temp float)
0:184 Constant:
0:184 0.000000
0:184 Constant:
0:184 0.300000
0:186 Constant:
0:186 0.000000
0:188 Constant:
0:188 0.000000
0:189 Constant:
0:189 0.000000
0:192 move second child to first child (temp float)
0:192 Constant:
0:192 0.000000
0:192 Constant:
0:192 0.300000
0:? Linker Objects
0:? 'i' (in 4-component vector of float)
0:? 'o' (smooth out 4-component vector of float)
...
...
glslang/Include/intermediate.h
View file @
ba5685a3
...
...
@@ -238,6 +238,8 @@ enum TOperator {
EOpFtransform
,
EOpNoise
,
EOpEmitVertex
,
// geometry only
EOpEndPrimitive
,
// geometry only
EOpEmitStreamVertex
,
// geometry only
...
...
glslang/MachineIndependent/Initialize.cpp
View file @
ba5685a3
...
...
@@ -3696,6 +3696,11 @@ void IdentifyBuiltIns(int version, EProfile profile, int spv, EShLanguage langua
symbolTable
.
relateToOperator
(
"textureGatherOffset"
,
EOpTextureGatherOffset
);
symbolTable
.
relateToOperator
(
"textureGatherOffsets"
,
EOpTextureGatherOffsets
);
symbolTable
.
relateToOperator
(
"noise1"
,
EOpNoise
);
symbolTable
.
relateToOperator
(
"noise2"
,
EOpNoise
);
symbolTable
.
relateToOperator
(
"noise3"
,
EOpNoise
);
symbolTable
.
relateToOperator
(
"noise4"
,
EOpNoise
);
if
(
spv
==
0
&&
(
IncludeLegacy
(
version
,
profile
,
spv
)
||
(
profile
==
EEsProfile
&&
version
==
100
)))
{
symbolTable
.
relateToOperator
(
"ftransform"
,
EOpFtransform
);
...
...
glslang/MachineIndependent/intermOut.cpp
View file @
ba5685a3
...
...
@@ -318,6 +318,8 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node)
case
EOpFindLSB
:
out
.
debug
<<
"findLSB"
;
break
;
case
EOpFindMSB
:
out
.
debug
<<
"findMSB"
;
break
;
case
EOpNoise
:
out
.
debug
<<
"noise"
;
break
;
default
:
out
.
debug
.
message
(
EPrefixError
,
"Bad unary op"
);
}
...
...
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