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
8ba301c7
Commit
8ba301c7
authored
Jul 21, 2015
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #28: Correctly handle a single input argument conversion when the input…
Issue #28: Correctly handle a single input argument conversion when the input argument is an aggregate.
parent
efb84617
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
3 deletions
+30
-3
functionSemantics.frag.out
Test/baseResults/functionSemantics.frag.out
+16
-0
functionSemantics.frag
Test/functionSemantics.frag
+7
-0
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+7
-3
No files found.
Test/baseResults/functionSemantics.frag.out
View file @
8ba301c7
...
@@ -187,6 +187,14 @@ Shader version: 400
...
@@ -187,6 +187,14 @@ Shader version: 400
0:62 Construct vec4 (temp 4-component vector of float)
0:62 Construct vec4 (temp 4-component vector of float)
0:62 Convert int to float (temp float)
0:62 Convert int to float (temp float)
0:62 'color' (temp int)
0:62 'color' (temp int)
0:66 Function Definition: aggCall( (global void)
0:66 Function Parameters:
0:? Sequence
0:69 Function Call: m(vf2; (global 3-component vector of float)
0:69 Convert int to float (temp 2-component vector of float)
0:69 Construct ivec2 (temp 2-component vector of int)
0:69 Convert float to int (temp int)
0:69 'F' (temp float)
0:? Linker Objects
0:? Linker Objects
0:? 'u' (uniform float)
0:? 'u' (uniform float)
...
@@ -380,6 +388,14 @@ Shader version: 400
...
@@ -380,6 +388,14 @@ Shader version: 400
0:62 Construct vec4 (temp 4-component vector of float)
0:62 Construct vec4 (temp 4-component vector of float)
0:62 Convert int to float (temp float)
0:62 Convert int to float (temp float)
0:62 'color' (temp int)
0:62 'color' (temp int)
0:66 Function Definition: aggCall( (global void)
0:66 Function Parameters:
0:? Sequence
0:69 Function Call: m(vf2; (global 3-component vector of float)
0:69 Convert int to float (temp 2-component vector of float)
0:69 Construct ivec2 (temp 2-component vector of int)
0:69 Convert float to int (temp int)
0:69 'F' (temp float)
0:? Linker Objects
0:? Linker Objects
0:? 'u' (uniform float)
0:? 'u' (uniform float)
Test/functionSemantics.frag
View file @
8ba301c7
...
@@ -61,3 +61,10 @@ void main()
...
@@ -61,3 +61,10 @@ void main()
gl_FragColor
=
vec4
(
color
);
gl_FragColor
=
vec4
(
color
);
}
}
vec3
m
(
vec2
);
void
aggCall
()
{
float
F
;
m
(
ivec2
(
F
));
// test input conversion of single argument that's an aggregate; other function tests in 120.vert
}
glslang/MachineIndependent/ParseHelper.cpp
View file @
8ba301c7
...
@@ -1239,10 +1239,14 @@ void TParseContext::addInputArgumentConversions(const TFunction& function, TInte
...
@@ -1239,10 +1239,14 @@ void TParseContext::addInputArgumentConversions(const TFunction& function, TInte
// convert to the correct type.
// convert to the correct type.
arg
=
intermediate
.
addConversion
(
EOpFunctionCall
,
*
function
[
i
].
type
,
arg
);
arg
=
intermediate
.
addConversion
(
EOpFunctionCall
,
*
function
[
i
].
type
,
arg
);
if
(
arg
)
{
if
(
arg
)
{
if
(
aggregate
)
if
(
function
.
getParamCount
()
==
1
)
aggregate
->
getSequence
()[
i
]
=
arg
;
else
arguments
=
arg
;
arguments
=
arg
;
else
{
if
(
aggregate
)
aggregate
->
getSequence
()[
i
]
=
arg
;
else
arguments
=
arg
;
}
}
}
}
}
}
}
...
...
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