Throw if SPIR-V module has no entry points.

This commit is contained in:
Hans-Kristian Arntzen 2021-03-08 10:39:59 +01:00
parent d57ab68a21
commit bc4cb1b3c5

View File

@ -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