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
4f5b99e3
Commit
4f5b99e3
authored
Mar 06, 2018
by
Rex Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more error checks for interpolateAtVertexAMD()
parent
c6c80a6e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
Types.h
glslang/Include/Types.h
+6
-0
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+17
-0
No files found.
glslang/Include/Types.h
View file @
4f5b99e3
...
@@ -508,6 +508,12 @@ public:
...
@@ -508,6 +508,12 @@ public:
return
flat
||
smooth
||
nopersp
;
return
flat
||
smooth
||
nopersp
;
#endif
#endif
}
}
#ifdef AMD_EXTENSIONS
bool
isExplicitInterpolation
()
const
{
return
explicitInterp
;
}
#endif
bool
isAuxiliary
()
const
bool
isAuxiliary
()
const
{
{
return
centroid
||
patch
||
sample
;
return
centroid
||
patch
||
sample
;
...
...
glslang/MachineIndependent/ParseHelper.cpp
View file @
4f5b99e3
...
@@ -1608,6 +1608,23 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
...
@@ -1608,6 +1608,23 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
if
(
base
==
nullptr
||
base
->
getType
().
getQualifier
().
storage
!=
EvqVaryingIn
)
if
(
base
==
nullptr
||
base
->
getType
().
getQualifier
().
storage
!=
EvqVaryingIn
)
error
(
loc
,
"first argument must be an interpolant, or interpolant-array element"
,
fnCandidate
.
getName
().
c_str
(),
""
);
error
(
loc
,
"first argument must be an interpolant, or interpolant-array element"
,
fnCandidate
.
getName
().
c_str
(),
""
);
}
}
#ifdef AMD_EXTENSIONS
if
(
callNode
.
getOp
()
==
EOpInterpolateAtVertex
)
{
if
(
!
arg0
->
getType
().
getQualifier
().
isExplicitInterpolation
())
error
(
loc
,
"argument must be qualified as __explicitInterpAMD in"
,
"interpolant"
,
""
);
else
{
if
(
!
(
*
argp
)[
1
]
->
getAsConstantUnion
())
error
(
loc
,
"argument must be compile-time constant"
,
"vertex index"
,
""
);
else
{
unsigned
vertexIdx
=
(
*
argp
)[
1
]
->
getAsConstantUnion
()
->
getConstArray
()[
0
].
getUConst
();
if
(
vertexIdx
>
2
)
error
(
loc
,
"must be in the range [0, 2]"
,
"vertex index"
,
""
);
}
}
}
#endif
break
;
break
;
case
EOpEmitStreamVertex
:
case
EOpEmitStreamVertex
:
...
...
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