diff options
author | Hans-Kristian Arntzen <post@arntzen-software.no> | 2021-03-08 12:39:59 +0300 |
---|---|---|
committer | Hans-Kristian Arntzen <post@arntzen-software.no> | 2021-03-08 12:40:19 +0300 |
commit | bc4cb1b3c54464a9313c9ba52fc96e00dd231b59 (patch) | |
tree | 3b69ecb28a739cb062b73e32d6958cf16d812a14 /spirv_parser.cpp | |
parent | d57ab68a219831900fa2b8a3bd529413e01f3b9f (diff) |
Throw if SPIR-V module has no entry points.
Diffstat (limited to 'spirv_parser.cpp')
-rw-r--r-- | spirv_parser.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/spirv_parser.cpp b/spirv_parser.cpp index 7159a325..86f7fd35 100644 --- a/spirv_parser.cpp +++ b/spirv_parser.cpp @@ -140,6 +140,8 @@ void Parser::parse() SPIRV_CROSS_THROW("Function was not terminated."); if (current_block) SPIRV_CROSS_THROW("Block was not terminated."); + if (ir.default_entry_point == 0) + SPIRV_CROSS_THROW("There is no entry point in the SPIR-V module."); } const uint32_t *Parser::stream(const Instruction &instr) const |