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
b5e739c2
Commit
b5e739c2
authored
Apr 11, 2017
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HLSL: Fix boolean conversion bug and add more tests for ?:.
Null-conversion needs the right sized vectors to kick out with matching types.
parent
636b62db
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
4 deletions
+11
-4
hlsl.conditional.frag.out
Test/baseResults/hlsl.conditional.frag.out
+0
-0
hlsl.conditional.frag
Test/hlsl.conditional.frag
+9
-2
revision.h
glslang/Include/revision.h
+1
-1
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+1
-1
No files found.
Test/baseResults/hlsl.conditional.frag.out
View file @
b5e739c2
This diff is collapsed.
Click to expand it.
Test/hlsl.conditional.frag
View file @
b5e739c2
...
@@ -7,7 +7,13 @@ float f;
...
@@ -7,7 +7,13 @@ float f;
float4
vectorCond
()
float4
vectorCond
()
{
{
return
(
c4
?
t4
:
f4
)
+
return
(
c4
?
t4
:
f4
)
+
(
c4
?
t
:
f
);
(
c4
?
t
:
f
)
+
(
t4
<
f4
?
t4
:
f4
);
}
float2
fbSelect
(
bool2
cnd
,
float2
src0
,
float2
src1
)
{
return
cnd
?
src0
:
src1
;
}
}
float4
PixelShaderFunction
(
float4
input
)
:
COLOR0
float4
PixelShaderFunction
(
float4
input
)
:
COLOR0
...
@@ -24,5 +30,6 @@ float4 PixelShaderFunction(float4 input) : COLOR0
...
@@ -24,5 +30,6 @@ float4 PixelShaderFunction(float4 input) : COLOR0
e
=
a
=
b
?
c
=
d
:
10
,
b
=
a
?
d
=
c
:
11
;
e
=
a
=
b
?
c
=
d
:
10
,
b
=
a
?
d
=
c
:
11
;
float4
f
;
float4
f
;
f
=
ret
.
x
<
input
.
y
?
c
*
input
:
d
*
input
;
f
=
ret
.
x
<
input
.
y
?
c
*
input
:
d
*
input
;
return
e
*
ret
+
f
+
vectorCond
();
return
e
*
ret
+
f
+
vectorCond
()
+
float4
(
fbSelect
(
bool2
(
true
,
false
),
float2
(
1
.
0
,
2
.
0
),
float2
(
3
.
0
,
4
.
0
)),
10
.
0
,
10
.
0
);
}
}
glslang/Include/revision.h
View file @
b5e739c2
...
@@ -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.199
2
"
#define GLSLANG_REVISION "Overload400-PrecQual.199
4
"
#define GLSLANG_DATE "11-Apr-2017"
#define GLSLANG_DATE "11-Apr-2017"
hlsl/hlslParseHelper.cpp
View file @
b5e739c2
...
@@ -4536,7 +4536,7 @@ TIntermTyped* HlslParseContext::convertConditionalExpression(const TSourceLoc& l
...
@@ -4536,7 +4536,7 @@ TIntermTyped* HlslParseContext::convertConditionalExpression(const TSourceLoc& l
return
nullptr
;
return
nullptr
;
}
}
return
intermediate
.
addConversion
(
EOpConstructBool
,
TType
(
EbtBool
),
condition
);
return
intermediate
.
addConversion
(
EOpConstructBool
,
TType
(
EbtBool
,
EvqTemporary
,
condition
->
getVectorSize
()
),
condition
);
}
}
//
//
...
...
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