Add support for primitive culling layout qualifier. (#2220)

* Add support for primitive culling layout qualifier.

* Add error checks for primitive flags and negative test.
This commit is contained in:
alelenv 2020-05-21 04:38:41 -07:00 committed by GitHub
parent eba1389a01
commit 59216d5cd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 50 additions and 2 deletions

View file

@ -1235,6 +1235,7 @@ struct TShaderQualifiers {
bool layoutDerivativeGroupQuads; // true if layout derivative_group_quadsNV set
bool layoutDerivativeGroupLinear; // true if layout derivative_group_linearNV set
int primitives; // mesh shader "max_primitives"DerivativeGroupLinear; // true if layout derivative_group_linearNV set
bool layoutPrimitiveCulling; // true if layout primitive_culling set
TLayoutDepth getDepth() const { return layoutDepth; }
#else
TLayoutDepth getDepth() const { return EldNone; }
@ -1268,6 +1269,7 @@ struct TShaderQualifiers {
layoutOverrideCoverage = false;
layoutDerivativeGroupQuads = false;
layoutDerivativeGroupLinear = false;
layoutPrimitiveCulling = false;
primitives = TQualifier::layoutNotSet;
interlockOrdering = EioNone;
#endif
@ -1331,6 +1333,8 @@ struct TShaderQualifiers {
primitives = src.primitives;
if (src.interlockOrdering != EioNone)
interlockOrdering = src.interlockOrdering;
if (src.layoutPrimitiveCulling)
layoutPrimitiveCulling = src.layoutPrimitiveCulling;
#endif
}
};