@@ -809,21 +809,17 @@ void SpirvEmitter::HandleTranslationUnit(ASTContext &context) {
809
809
spvBuilder.setMemoryModel(spv::AddressingModel::Logical,
810
810
spv::MemoryModel::GLSL450);
811
811
812
- // Even though the 'workQueue' grows due to the above loop, the first
813
- // 'numEntryPoints' entries in the 'workQueue' are the ones with the HLSL
814
- // 'shader' attribute, and must therefore be entry functions.
815
- assert(numEntryPoints <= workQueue.size());
816
-
817
- for (uint32_t i = 0; i < numEntryPoints; ++i) {
812
+ for (uint32_t i = 0; i < workQueue.size(); ++i) {
818
813
// TODO: assign specific StageVars w.r.t. to entry point
819
814
const FunctionInfo *entryInfo = workQueue[i];
820
- assert(entryInfo->isEntryFunction);
821
- spvBuilder.addEntryPoint(
822
- getSpirvShaderStage(
823
- entryInfo->shaderModelKind,
824
- featureManager.isExtensionEnabled(Extension::EXT_mesh_shader)),
825
- entryInfo->entryFunction, getEntryPointName(entryInfo),
826
- getInterfacesForEntryPoint(entryInfo->entryFunction));
815
+ if (entryInfo->isEntryFunction) {
816
+ spvBuilder.addEntryPoint(
817
+ getSpirvShaderStage(
818
+ entryInfo->shaderModelKind,
819
+ featureManager.isExtensionEnabled(Extension::EXT_mesh_shader)),
820
+ entryInfo->entryFunction, getEntryPointName(entryInfo),
821
+ getInterfacesForEntryPoint(entryInfo->entryFunction));
822
+ }
827
823
}
828
824
829
825
// Add Location decorations to stage input/output variables.
0 commit comments