HLSL: ignore geometry attributes on non-GS stages.

If a shader includes a mixture of several stages, such as HS and GS,
the non-stage output geometry should be ignored, lest it conflict
with the stage output.
This commit is contained in:
LoopDawg
2017-11-15 11:33:25 -07:00
parent 4036ef154f
commit 7573a2ab7f
4 changed files with 1283 additions and 0 deletions

View File

@@ -8559,6 +8559,11 @@ bool HlslParseContext::handleInputGeometry(const TSourceLoc& loc, const TLayoutG
//
bool HlslParseContext::handleOutputGeometry(const TSourceLoc& loc, const TLayoutGeometry& geometry)
{
// If this is not a geometry shader, ignore. It might be a mixed shader including several stages.
// Since that's an OK situation, return true for success.
if (language != EShLangGeometry)
return true;
switch (geometry) {
case ElgPoints:
case ElgLineStrip: