Merge pull request #3050 from Try/mesh-shader-ibo-fixup
mesh shader: fix implicit index-array size calculation for lines and triangles
This commit is contained in:
commit
1a8869e4d1
3 changed files with 215 additions and 213 deletions
|
|
@ -836,12 +836,16 @@ int TParseContext::getIoArrayImplicitSize(const TQualifier &qualifier, TString *
|
|||
} else if (language == EShLangMesh) {
|
||||
unsigned int maxPrimitives =
|
||||
intermediate.getPrimitives() != TQualifier::layoutNotSet ? intermediate.getPrimitives() : 0;
|
||||
if (qualifier.builtIn == EbvPrimitiveIndicesNV || qualifier.builtIn == EbvPrimitiveTriangleIndicesEXT ||
|
||||
qualifier.builtIn == EbvPrimitiveLineIndicesEXT || qualifier.builtIn == EbvPrimitivePointIndicesEXT) {
|
||||
if (qualifier.builtIn == EbvPrimitiveIndicesNV) {
|
||||
expectedSize = maxPrimitives * TQualifier::mapGeometryToSize(intermediate.getOutputPrimitive());
|
||||
str = "max_primitives*";
|
||||
str += TQualifier::getGeometryString(intermediate.getOutputPrimitive());
|
||||
}
|
||||
else if (qualifier.builtIn == EbvPrimitiveTriangleIndicesEXT || qualifier.builtIn == EbvPrimitiveLineIndicesEXT ||
|
||||
qualifier.builtIn == EbvPrimitivePointIndicesEXT) {
|
||||
expectedSize = maxPrimitives;
|
||||
str = "max_primitives";
|
||||
}
|
||||
else if (qualifier.isPerPrimitive()) {
|
||||
expectedSize = maxPrimitives;
|
||||
str = "max_primitives";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue