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
e9f18fd9
Commit
e9f18fd9
authored
Apr 10, 2017
by
John Kessenich
Committed by
GitHub
Apr 10, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #831 from steve-lunarg/isfinite
HLSL: fix return type for isfinite
parents
ae79697d
9e5a19fd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
7 deletions
+18
-7
hlsl.isfinite.frag.out
Test/baseResults/hlsl.isfinite.frag.out
+0
-0
hlsl.isfinite.frag
Test/hlsl.isfinite.frag
+10
-1
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+8
-6
No files found.
Test/baseResults/hlsl.isfinite.frag.out
View file @
e9f18fd9
This diff is collapsed.
Click to expand it.
Test/hlsl.isfinite.frag
View file @
e9f18fd9
uniform
float
f
;
uniform
float
f
;
uniform
float2
f2
;
uniform
float3
f3
;
bool
test1
(
float
v
)
{
return
!
isnan
(
v
)
&&
isfinite
(
v
);
}
float4
main
()
:
SV_Target0
float4
main
()
:
SV_Target0
{
{
isfinite
(
f
);
isfinite
(
f
);
isfinite
(
f2
);
isfinite
(
f3
);
return
0
;
return
0
;
}
}
hlsl/hlslParseHelper.cpp
View file @
e9f18fd9
...
@@ -3907,25 +3907,27 @@ void HlslParseContext::decomposeIntrinsic(const TSourceLoc& loc, TIntermTyped*&
...
@@ -3907,25 +3907,27 @@ void HlslParseContext::decomposeIntrinsic(const TSourceLoc& loc, TIntermTyped*&
TIntermAggregate
*
compoundStatement
=
intermediate
.
makeAggregate
(
tmpArgAssign
,
loc
);
TIntermAggregate
*
compoundStatement
=
intermediate
.
makeAggregate
(
tmpArgAssign
,
loc
);
const
TType
boolType
(
EbtBool
,
EvqTemporary
,
arg0
->
getVectorSize
(),
arg0
->
getMatrixCols
(),
arg0
->
getMatrixRows
());
TIntermTyped
*
isnan
=
handleUnaryMath
(
loc
,
"isnan"
,
EOpIsNan
,
intermediate
.
addSymbol
(
*
tempArg
,
loc
));
TIntermTyped
*
isnan
=
handleUnaryMath
(
loc
,
"isnan"
,
EOpIsNan
,
intermediate
.
addSymbol
(
*
tempArg
,
loc
));
isnan
->
setType
(
TType
(
EbtBool
)
);
isnan
->
setType
(
boolType
);
TIntermTyped
*
notnan
=
handleUnaryMath
(
loc
,
"!"
,
EOpLogicalNot
,
isnan
);
TIntermTyped
*
notnan
=
handleUnaryMath
(
loc
,
"!"
,
EOpLogicalNot
,
isnan
);
notnan
->
setType
(
TType
(
EbtBool
)
);
notnan
->
setType
(
boolType
);
TIntermTyped
*
isinf
=
handleUnaryMath
(
loc
,
"isinf"
,
EOpIsInf
,
intermediate
.
addSymbol
(
*
tempArg
,
loc
));
TIntermTyped
*
isinf
=
handleUnaryMath
(
loc
,
"isinf"
,
EOpIsInf
,
intermediate
.
addSymbol
(
*
tempArg
,
loc
));
isinf
->
setType
(
TType
(
EbtBool
)
);
isinf
->
setType
(
boolType
);
TIntermTyped
*
notinf
=
handleUnaryMath
(
loc
,
"!"
,
EOpLogicalNot
,
isinf
);
TIntermTyped
*
notinf
=
handleUnaryMath
(
loc
,
"!"
,
EOpLogicalNot
,
isinf
);
notinf
->
setType
(
TType
(
EbtBool
)
);
notinf
->
setType
(
boolType
);
TIntermTyped
*
andNode
=
handleBinaryMath
(
loc
,
"and"
,
EOpLogicalAnd
,
notnan
,
notinf
);
TIntermTyped
*
andNode
=
handleBinaryMath
(
loc
,
"and"
,
EOpLogicalAnd
,
notnan
,
notinf
);
andNode
->
setType
(
TType
(
EbtBool
)
);
andNode
->
setType
(
boolType
);
compoundStatement
=
intermediate
.
growAggregate
(
compoundStatement
,
andNode
);
compoundStatement
=
intermediate
.
growAggregate
(
compoundStatement
,
andNode
);
compoundStatement
->
setOperator
(
EOpSequence
);
compoundStatement
->
setOperator
(
EOpSequence
);
compoundStatement
->
setLoc
(
loc
);
compoundStatement
->
setLoc
(
loc
);
compoundStatement
->
setType
(
TType
(
EbtVoid
)
);
compoundStatement
->
setType
(
boolType
);
node
=
compoundStatement
;
node
=
compoundStatement
;
...
...
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