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
6714bcc2
Commit
6714bcc2
authored
Sep 21, 2016
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HLSL: Fix result type of passing a flattened-aggregate to a function.
parent
6873f3d8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
hlsl.entry-in.frag.out
Test/baseResults/hlsl.entry-in.frag.out
+3
-3
revision.h
glslang/Include/revision.h
+2
-2
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+8
-0
No files found.
Test/baseResults/hlsl.entry-in.frag.out
View file @
6714bcc2
...
@@ -54,7 +54,7 @@ gl_FragCoord origin is upper left
...
@@ -54,7 +54,7 @@ gl_FragCoord origin is upper left
0:17 move second child to first child (temp float)
0:17 move second child to first child (temp float)
0:17 'ret2' (temp float)
0:17 'ret2' (temp float)
0:17 Function Call: fun(struct-InParam-vf2-vf4-vi21; (global float)
0:17 Function Call: fun(struct-InParam-vf2-vf4-vi21; (global float)
0:? Comma (temp
float
)
0:? Comma (temp
structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2}
)
0:? Sequence
0:? Sequence
0:? move second child to first child (temp 2-component vector of float)
0:? move second child to first child (temp 2-component vector of float)
0:? v: direct index for structure (temp 2-component vector of float)
0:? v: direct index for structure (temp 2-component vector of float)
...
@@ -152,7 +152,7 @@ gl_FragCoord origin is upper left
...
@@ -152,7 +152,7 @@ gl_FragCoord origin is upper left
0:17 move second child to first child (temp float)
0:17 move second child to first child (temp float)
0:17 'ret2' (temp float)
0:17 'ret2' (temp float)
0:17 Function Call: fun(struct-InParam-vf2-vf4-vi21; (global float)
0:17 Function Call: fun(struct-InParam-vf2-vf4-vi21; (global float)
0:? Comma (temp
float
)
0:? Comma (temp
structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2}
)
0:? Sequence
0:? Sequence
0:? move second child to first child (temp 2-component vector of float)
0:? move second child to first child (temp 2-component vector of float)
0:? v: direct index for structure (temp 2-component vector of float)
0:? v: direct index for structure (temp 2-component vector of float)
...
@@ -256,7 +256,7 @@ gl_FragCoord origin is upper left
...
@@ -256,7 +256,7 @@ gl_FragCoord origin is upper left
48(param): 12(ptr) Variable Function
48(param): 12(ptr) Variable Function
51(ret2): 20(ptr) Variable Function
51(ret2): 20(ptr) Variable Function
52(aggShadow): 12(ptr) Variable Function
52(aggShadow): 12(ptr) Variable Function
59(param):
20
(ptr) Variable Function
59(param):
12
(ptr) Variable Function
33: 7(fvec2) Load 32(v)
33: 7(fvec2) Load 32(v)
35: 34(ptr) AccessChain 30(local) 17
35: 34(ptr) AccessChain 30(local) 17
Store 35 33
Store 35 33
...
...
glslang/Include/revision.h
View file @
6714bcc2
...
@@ -2,5 +2,5 @@
...
@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits.
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
// For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "Overload400-PrecQual.150
3
"
#define GLSLANG_REVISION "Overload400-PrecQual.150
6
"
#define GLSLANG_DATE "2
0
-Sep-2016"
#define GLSLANG_DATE "2
1
-Sep-2016"
hlsl/hlslParseHelper.cpp
View file @
6714bcc2
...
@@ -2277,6 +2277,10 @@ void HlslParseContext::addInputArgumentConversions(const TFunction& function, TI
...
@@ -2277,6 +2277,10 @@ void HlslParseContext::addInputArgumentConversions(const TFunction& function, TI
}
}
}
else
{
}
else
{
if
(
shouldFlatten
(
arg
->
getType
()))
{
if
(
shouldFlatten
(
arg
->
getType
()))
{
// Will make a two-level subtree.
// The deepest will copy member-by-member to build the structure to pass.
// The level above that will be an two-operand EOpComma sequence that follows the copy by the
// object itself.
TSourceLoc
dummyLoc
;
TSourceLoc
dummyLoc
;
dummyLoc
.
init
();
dummyLoc
.
init
();
TVariable
*
internalAggregate
=
makeInternalVariable
(
"aggShadow"
,
*
function
[
i
].
type
);
TVariable
*
internalAggregate
=
makeInternalVariable
(
"aggShadow"
,
*
function
[
i
].
type
);
...
@@ -2284,9 +2288,13 @@ void HlslParseContext::addInputArgumentConversions(const TFunction& function, TI
...
@@ -2284,9 +2288,13 @@ void HlslParseContext::addInputArgumentConversions(const TFunction& function, TI
TIntermSymbol
*
internalSymbolNode
=
new
TIntermSymbol
(
internalAggregate
->
getUniqueId
(),
TIntermSymbol
*
internalSymbolNode
=
new
TIntermSymbol
(
internalAggregate
->
getUniqueId
(),
internalAggregate
->
getName
(),
internalAggregate
->
getName
(),
internalAggregate
->
getType
());
internalAggregate
->
getType
());
// This makes the deepest level, the member-wise copy
TIntermAggregate
*
assignAgg
=
handleAssign
(
dummyLoc
,
EOpAssign
,
internalSymbolNode
,
arg
)
->
getAsAggregate
();
TIntermAggregate
*
assignAgg
=
handleAssign
(
dummyLoc
,
EOpAssign
,
internalSymbolNode
,
arg
)
->
getAsAggregate
();
// Now, pair that with the resulting aggregate.
assignAgg
=
intermediate
.
growAggregate
(
assignAgg
,
internalSymbolNode
);
assignAgg
=
intermediate
.
growAggregate
(
assignAgg
,
internalSymbolNode
);
assignAgg
->
setOperator
(
EOpComma
);
assignAgg
->
setOperator
(
EOpComma
);
assignAgg
->
setType
(
internalAggregate
->
getType
());
setArg
(
i
,
assignAgg
);
setArg
(
i
,
assignAgg
);
}
}
}
}
...
...
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