GLSL Linker: Track entry point across compilation units.

This wasn't needed until the recent generalization of "main" to "entry point",
so makes some HLSL-specific code be generic now, for GLSL functional correctness.
This commit is contained in:
John Kessenich 2016-12-09 17:14:27 -07:00
parent 6a60c2f9ea
commit 4b6ce415ef
4 changed files with 8 additions and 2 deletions

View file

@ -82,7 +82,7 @@ void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit)
if (source != unit.source)
error(infoSink, "can't link compilation units from different source languages");
if (source == EShSourceHlsl && unit.getNumEntryPoints() > 0) {
if (unit.getNumEntryPoints() > 0) {
if (getNumEntryPoints() > 0)
error(infoSink, "can't handle multiple entry points per stage");
else