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
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
0 deletions
+17
-0
120.vert
Test/120.vert
+8
-0
120.vert.out
Test/baseResults/120.vert.out
+0
-0
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()
...
@@ -139,6 +139,14 @@ void foo2()
bool
b
=
any
(
lessThan
(
v4
,
attv4
));
// tests aggregate arg to unary built-in
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
// version 130 features
uniform
int
c
;
uniform
int
c
;
...
...
Test/baseResults/120.vert.out
View file @
ba5685a3
This diff is collapsed.
Click to expand it.
glslang/Include/intermediate.h
View file @
ba5685a3
...
@@ -238,6 +238,8 @@ enum TOperator {
...
@@ -238,6 +238,8 @@ enum TOperator {
EOpFtransform
,
EOpFtransform
,
EOpNoise
,
EOpEmitVertex
,
// geometry only
EOpEmitVertex
,
// geometry only
EOpEndPrimitive
,
// geometry only
EOpEndPrimitive
,
// geometry only
EOpEmitStreamVertex
,
// 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
...
@@ -3696,6 +3696,11 @@ void IdentifyBuiltIns(int version, EProfile profile, int spv, EShLanguage langua
symbolTable
.
relateToOperator
(
"textureGatherOffset"
,
EOpTextureGatherOffset
);
symbolTable
.
relateToOperator
(
"textureGatherOffset"
,
EOpTextureGatherOffset
);
symbolTable
.
relateToOperator
(
"textureGatherOffsets"
,
EOpTextureGatherOffsets
);
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
)))
{
if
(
spv
==
0
&&
(
IncludeLegacy
(
version
,
profile
,
spv
)
||
(
profile
==
EEsProfile
&&
version
==
100
)))
{
symbolTable
.
relateToOperator
(
"ftransform"
,
EOpFtransform
);
symbolTable
.
relateToOperator
(
"ftransform"
,
EOpFtransform
);
...
...
glslang/MachineIndependent/intermOut.cpp
View file @
ba5685a3
...
@@ -318,6 +318,8 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node)
...
@@ -318,6 +318,8 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node)
case
EOpFindLSB
:
out
.
debug
<<
"findLSB"
;
break
;
case
EOpFindLSB
:
out
.
debug
<<
"findLSB"
;
break
;
case
EOpFindMSB
:
out
.
debug
<<
"findMSB"
;
break
;
case
EOpFindMSB
:
out
.
debug
<<
"findMSB"
;
break
;
case
EOpNoise
:
out
.
debug
<<
"noise"
;
break
;
default
:
out
.
debug
.
message
(
EPrefixError
,
"Bad unary op"
);
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