diff options
| author | Yong He <yonghe@outlook.com> | 2025-02-03 22:21:29 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-03 22:21:29 -0800 |
| commit | bcf5302dd48668048848230ff11add27e6d78115 (patch) | |
| tree | 3371d79d2a16832b9748d49cdc6764914b4d4a00 /source | |
| parent | bc2f20aab2303f059d767729e64b54d33ce9a12a (diff) | |
Auto enable `-fvk-use-entrypoint-name` when there is more than one entrypoint. (#6260)
* Auto enable `-fvk-use-entrypoint-name` when there is more than one entrypoint.
* Fix.
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-ir-glsl-legalize.cpp | 3 | ||||
| -rw-r--r-- | source/slang/slang-parser.cpp | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/source/slang/slang-ir-glsl-legalize.cpp b/source/slang/slang-ir-glsl-legalize.cpp index 04fb54924..3ca441f96 100644 --- a/source/slang/slang-ir-glsl-legalize.cpp +++ b/source/slang/slang-ir-glsl-legalize.cpp @@ -3722,7 +3722,8 @@ void legalizeEntryPointForGLSL( // Rename the entrypoint to "main" to conform to GLSL standard, // if the compile options require us to do it. - if (!shouldUseOriginalEntryPointName(codeGenContext)) + if (!shouldUseOriginalEntryPointName(codeGenContext) && + codeGenContext->getEntryPointCount() == 1) { entryPointDecor->setName(builder.getStringValue(UnownedStringSlice("main"))); } diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp index 4a9d0a576..0d7281e3f 100644 --- a/source/slang/slang-parser.cpp +++ b/source/slang/slang-parser.cpp @@ -2352,6 +2352,7 @@ static Expr* tryParseGenericApp(Parser* parser, Expr* base) case TokenType::OpEql: case TokenType::OpNeq: case TokenType::OpGreater: + case TokenType::OpRsh: case TokenType::EndOfFile: { return parseGenericApp(parser, base); |
