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
e19e68d4
Commit
e19e68d4
authored
Oct 28, 2016
by
John Kessenich
Committed by
GitHub
Oct 28, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #571 from baldurk/explicit-lambda-returns
Add explicit lambda return types, for compilers without C++14 support
parents
95078855
ca735704
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+5
-5
No files found.
hlsl/hlslParseHelper.cpp
View file @
e19e68d4
...
...
@@ -154,7 +154,7 @@ TLayoutFormat HlslParseContext::getLayoutFromTxType(const TSourceLoc& loc, const
{
const
int
components
=
txType
.
getVectorSize
();
const
auto
selectFormat
=
[
this
,
&
components
](
TLayoutFormat
v1
,
TLayoutFormat
v2
,
TLayoutFormat
v4
)
{
const
auto
selectFormat
=
[
this
,
&
components
](
TLayoutFormat
v1
,
TLayoutFormat
v2
,
TLayoutFormat
v4
)
->
TLayoutFormat
{
if
(
intermediate
.
getNoStorageFormat
())
return
ElfNone
;
...
...
@@ -260,7 +260,7 @@ TIntermTyped* HlslParseContext::handleLvalue(const TSourceLoc& loc, const char*
};
// Helper to complete sequence by adding trailing variable, so we evaluate to the right value.
const
auto
finishSequence
=
[
&
](
TIntermSymbol
*
rhsTmp
,
const
TType
&
derefType
)
{
const
auto
finishSequence
=
[
&
](
TIntermSymbol
*
rhsTmp
,
const
TType
&
derefType
)
->
TIntermAggregate
*
{
// Add a trailing use of the temp, so the sequence returns the proper value.
sequence
=
intermediate
.
growAggregate
(
sequence
,
intermediate
.
addSymbol
(
*
rhsTmp
));
sequence
->
setOperator
(
EOpSequence
);
...
...
@@ -279,7 +279,7 @@ TIntermTyped* HlslParseContext::handleLvalue(const TSourceLoc& loc, const char*
};
// helper to create a temporary variable
const
auto
addTmpVar
=
[
&
](
const
char
*
name
,
const
TType
&
derefType
)
{
const
auto
addTmpVar
=
[
&
](
const
char
*
name
,
const
TType
&
derefType
)
->
TIntermSymbol
*
{
TVariable
*
tmpVar
=
makeInternalVariable
(
name
,
derefType
);
tmpVar
->
getWritableType
().
getQualifier
().
makeTemporary
();
return
intermediate
.
addSymbol
(
*
tmpVar
,
loc
);
...
...
@@ -1440,7 +1440,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
if
(
!
node
||
!
node
->
getAsOperator
())
return
;
const
auto
clampReturn
=
[
&
loc
,
&
node
,
this
](
TIntermTyped
*
result
,
const
TSampler
&
sampler
)
{
const
auto
clampReturn
=
[
&
loc
,
&
node
,
this
](
TIntermTyped
*
result
,
const
TSampler
&
sampler
)
->
TIntermTyped
*
{
// Sampler return must always be a vec4, but we can construct a shorter vector
result
->
setType
(
TType
(
node
->
getType
().
getBasicType
(),
EvqTemporary
,
node
->
getVectorSize
()));
...
...
@@ -2073,7 +2073,7 @@ void HlslParseContext::decomposeIntrinsic(const TSourceLoc& loc, TIntermTyped*&
};
// Return true if this is an imageLoad, which we will change to an image atomic.
const
auto
isImageParam
=
[](
TIntermTyped
*
image
)
{
const
auto
isImageParam
=
[](
TIntermTyped
*
image
)
->
bool
{
TIntermAggregate
*
imageAggregate
=
image
->
getAsAggregate
();
return
imageAggregate
!=
nullptr
&&
imageAggregate
->
getOp
()
==
EOpImageLoad
;
};
...
...
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