HLSL: allow GS-specific methods in other stages
Using GS methods such as Append() in non-GS stages should be ignored, but was creating errors due to the lack of a stream output symbol for the non-GS stage.
This commit is contained in:
parent
c48c8e76e1
commit
c6510a33ff
4 changed files with 142 additions and 0 deletions
|
|
@ -3660,6 +3660,12 @@ void HlslParseContext::decomposeGeometryMethods(const TSourceLoc& loc, TIntermTy
|
|||
switch (op) {
|
||||
case EOpMethodAppend:
|
||||
if (argAggregate) {
|
||||
// Don't emit these for non-GS stage, since we won't have the gsStreamOutput symbol.
|
||||
if (language != EShLangGeometry) {
|
||||
node = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
TIntermAggregate* sequence = nullptr;
|
||||
TIntermAggregate* emit = new TIntermAggregate(EOpEmitVertex);
|
||||
|
||||
|
|
@ -3689,6 +3695,12 @@ void HlslParseContext::decomposeGeometryMethods(const TSourceLoc& loc, TIntermTy
|
|||
|
||||
case EOpMethodRestartStrip:
|
||||
{
|
||||
// Don't emit these for non-GS stage, since we won't have the gsStreamOutput symbol.
|
||||
if (language != EShLangGeometry) {
|
||||
node = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
TIntermAggregate* cut = new TIntermAggregate(EOpEndPrimitive);
|
||||
cut->setLoc(loc);
|
||||
cut->setType(TType(EbtVoid));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue