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
6817f81e
Commit
6817f81e
authored
May 01, 2017
by
steve-lunarg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HLSL: Implement missing GatherCmp
parent
22be5788
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
8 deletions
+28
-8
hlsl.gathercmpRGBA.offset.dx10.frag.out
Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out
+0
-0
hlsl.gathercmpRGBA.array.dx10.frag
Test/hlsl.gathercmpRGBA.array.dx10.frag
+4
-0
hlsl.gathercmpRGBA.basic.dx10.frag
Test/hlsl.gathercmpRGBA.basic.dx10.frag
+8
-0
hlsl.gathercmpRGBA.offset.dx10.frag
Test/hlsl.gathercmpRGBA.offset.dx10.frag
+3
-7
hlsl.gathercmpRGBA.offsetarray.dx10.frag
Test/hlsl.gathercmpRGBA.offsetarray.dx10.frag
+4
-0
hlslParseables.cpp
hlsl/hlslParseables.cpp
+9
-1
No files found.
Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out
View file @
6817f81e
This diff is collapsed.
Click to expand it.
Test/hlsl.gathercmpRGBA.array.dx10.frag
View file @
6817f81e
...
...
@@ -29,6 +29,10 @@ PS_OUTPUT main()
// no 1D gathers
float4
txval80
=
g_tTex2df4a
.
GatherCmp
(
g_sSampCmp
,
c3
,
.
75
);
int4
txval81
=
g_tTex2di4a
.
GatherCmp
(
g_sSampCmp
,
c3
,
.
75
);
uint4
txval82
=
g_tTex2du4a
.
GatherCmp
(
g_sSampCmp
,
c3
,
.
75
);
float4
txval00
=
g_tTex2df4a
.
GatherCmpRed
(
g_sSampCmp
,
c3
,
.
75
);
int4
txval01
=
g_tTex2di4a
.
GatherCmpRed
(
g_sSampCmp
,
c3
,
.
75
);
uint4
txval02
=
g_tTex2du4a
.
GatherCmpRed
(
g_sSampCmp
,
c3
,
.
75
);
...
...
Test/hlsl.gathercmpRGBA.basic.dx10.frag
View file @
6817f81e
...
...
@@ -51,6 +51,10 @@ PS_OUTPUT main()
int4
txval31
=
g_tTex2di4
.
GatherCmpAlpha
(
g_sSampCmp
,
c2
,
0
.
75
);
uint4
txval32
=
g_tTex2du4
.
GatherCmpAlpha
(
g_sSampCmp
,
c2
,
0
.
75
);
float4
txval80
=
g_tTex2df4
.
GatherCmp
(
g_sSampCmp
,
c2
,
0
.
75
);
int4
txval81
=
g_tTex2di4
.
GatherCmp
(
g_sSampCmp
,
c2
,
0
.
75
);
uint4
txval82
=
g_tTex2du4
.
GatherCmp
(
g_sSampCmp
,
c2
,
0
.
75
);
// no 3D gathers
float4
txval40
=
g_tTexcdf4
.
GatherCmpRed
(
g_sSampCmp
,
c3
,
0
.
75
);
...
...
@@ -69,6 +73,10 @@ PS_OUTPUT main()
int4
txval71
=
g_tTexcdi4
.
GatherCmpAlpha
(
g_sSampCmp
,
c3
,
0
.
75
);
uint4
txval72
=
g_tTexcdu4
.
GatherCmpAlpha
(
g_sSampCmp
,
c3
,
0
.
75
);
float4
txval90
=
g_tTexcdf4
.
GatherCmp
(
g_sSampCmp
,
c3
,
0
.
75
);
int4
txval91
=
g_tTexcdi4
.
GatherCmp
(
g_sSampCmp
,
c3
,
0
.
75
);
uint4
txval92
=
g_tTexcdu4
.
GatherCmp
(
g_sSampCmp
,
c3
,
0
.
75
);
psout
.
Color
=
1
.
0
;
psout
.
Depth
=
1
.
0
;
...
...
Test/hlsl.gathercmpRGBA.offset.dx10.frag
View file @
6817f81e
...
...
@@ -50,13 +50,9 @@ PS_OUTPUT main()
int4
txval014
=
g_tTex2di4
.
GatherCmpRed
(
g_sSampCmp
,
c2
,
0
.
75
,
int2
(
1
,
-
1
),
int2
(
1
,
-
1
),
int2
(
1
,
-
1
),
int2
(
1
,
-
1
));
uint4
txval024
=
g_tTex2du4
.
GatherCmpRed
(
g_sSampCmp
,
c2
,
0
.
75
,
int2
(
1
,
1
),
int2
(
1
,
1
),
int2
(
1
,
1
),
int2
(
1
,
1
));
// float4 txval00s = g_tTex2df4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0), status);
// int4 txval01s = g_tTex2di4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0), status);
// uint4 txval02s = g_tTex2du4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0), status);
// float4 txval004s = g_tTex2df4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
// int4 txval014s = g_tTex2di4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
// uint4 txval024s = g_tTex2du4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
float4
txval401
=
g_tTex2df4
.
GatherCmp
(
g_sSampCmp
,
c2
,
0
.
75
,
int2
(
1
,
0
));
int4
txval411
=
g_tTex2di4
.
GatherCmp
(
g_sSampCmp
,
c2
,
0
.
75
,
int2
(
1
,
-
1
));
uint4
txval421
=
g_tTex2du4
.
GatherCmp
(
g_sSampCmp
,
c2
,
0
.
75
,
int2
(
1
,
1
));
// GatherCmpGreen not implemented pending OpImageDrefGather component input
// float4 txval101 = g_tTex2df4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0));
...
...
Test/hlsl.gathercmpRGBA.offsetarray.dx10.frag
View file @
6817f81e
...
...
@@ -36,6 +36,10 @@ PS_OUTPUT main()
// no 1D gathers
float4
txval401
=
g_tTex2df4a
.
GatherCmp
(
g_sSampCmp
,
c3
,
0
.
75
,
o2
);
int4
txval411
=
g_tTex2di4a
.
GatherCmp
(
g_sSampCmp
,
c3
,
0
.
75
,
o2
);
uint4
txval421
=
g_tTex2du4a
.
GatherCmp
(
g_sSampCmp
,
c3
,
0
.
75
,
o2
);
float4
txval001
=
g_tTex2df4a
.
GatherCmpRed
(
g_sSampCmp
,
c3
,
0
.
75
,
o2
);
int4
txval011
=
g_tTex2di4a
.
GatherCmpRed
(
g_sSampCmp
,
c3
,
0
.
75
,
o2
);
uint4
txval021
=
g_tTex2du4a
.
GatherCmpRed
(
g_sSampCmp
,
c3
,
0
.
75
,
o2
);
...
...
hlsl/hlslParseables.cpp
View file @
6817f81e
...
...
@@ -111,7 +111,8 @@ bool IsIllegalSample(const glslang::TString& name, const char* argOrder, int dim
name
==
"GatherAlpha"
);
const
bool
isGatherCmp
=
(
name
==
"GatherCmpRed"
||
(
name
==
"GatherCmp"
||
name
==
"GatherCmpRed"
||
name
==
"GatherCmpGreen"
||
name
==
"GatherCmpBlue"
||
name
==
"GatherCmpAlpha"
);
...
...
@@ -824,6 +825,12 @@ void TBuiltInParseablesHlsl::initialize(int /*version*/, EProfile /*profile*/, c
{
"GatherAlpha"
,
/* O-4 */
"V4"
,
nullptr
,
"%@,S,V,,,,"
,
"FIU,S,F,I,,,"
,
EShLangAll
,
true
},
{
"GatherAlpha"
,
/* O-4, status */
"V4"
,
nullptr
,
"%@,S,V,,,,,S"
,
"FIU,S,F,I,,,,U"
,
EShLangAll
,
true
},
{
"GatherCmp"
,
/*!O*/
"V4"
,
nullptr
,
"%@,S,V,S"
,
"FIU,s,F,"
,
EShLangAll
,
true
},
{
"GatherCmp"
,
/* O*/
"V4"
,
nullptr
,
"%@,S,V,S,V"
,
"FIU,s,F,,I"
,
EShLangAll
,
true
},
{
"GatherCmp"
,
/* O, status*/
"V4"
,
nullptr
,
"%@,S,V,S,V,>S"
,
"FIU,s,F,,I,U"
,
EShLangAll
,
true
},
{
"GatherCmp"
,
/* O-4 */
"V4"
,
nullptr
,
"%@,S,V,S,V,,,"
,
"FIU,s,F,,I,,,"
,
EShLangAll
,
true
},
{
"GatherCmp"
,
/* O-4, status */
"V4"
,
nullptr
,
"%@,S,V,S,V,,V,S"
,
"FIU,s,F,,I,,,,U"
,
EShLangAll
,
true
},
{
"GatherCmpRed"
,
/*!O*/
"V4"
,
nullptr
,
"%@,S,V,S"
,
"FIU,s,F,"
,
EShLangAll
,
true
},
{
"GatherCmpRed"
,
/* O*/
"V4"
,
nullptr
,
"%@,S,V,S,V"
,
"FIU,s,F,,I"
,
EShLangAll
,
true
},
{
"GatherCmpRed"
,
/* O, status*/
"V4"
,
nullptr
,
"%@,S,V,S,V,>S"
,
"FIU,s,F,,I,U"
,
EShLangAll
,
true
},
...
...
@@ -1203,6 +1210,7 @@ void TBuiltInParseablesHlsl::identifyBuiltIns(int /*version*/, EProfile /*profil
symbolTable
.
relateToOperator
(
BUILTIN_PREFIX
"GatherGreen"
,
EOpMethodGatherGreen
);
symbolTable
.
relateToOperator
(
BUILTIN_PREFIX
"GatherBlue"
,
EOpMethodGatherBlue
);
symbolTable
.
relateToOperator
(
BUILTIN_PREFIX
"GatherAlpha"
,
EOpMethodGatherAlpha
);
symbolTable
.
relateToOperator
(
BUILTIN_PREFIX
"GatherCmp"
,
EOpMethodGatherCmpRed
);
// alias
symbolTable
.
relateToOperator
(
BUILTIN_PREFIX
"GatherCmpRed"
,
EOpMethodGatherCmpRed
);
symbolTable
.
relateToOperator
(
BUILTIN_PREFIX
"GatherCmpGreen"
,
EOpMethodGatherCmpGreen
);
symbolTable
.
relateToOperator
(
BUILTIN_PREFIX
"GatherCmpBlue"
,
EOpMethodGatherCmpBlue
);
...
...
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