mirror of
https://github.com/KhronosGroup/SPIRV-Cross.git
synced 2024-09-19 14:19:59 +00:00
Replace assert of buffer block SPIRType with exception
This commit is contained in:
parent
aad675ff41
commit
28d8914022
@ -564,7 +564,8 @@ Bitset ParsedIR::get_buffer_block_type_flags(const SPIRType &type) const
|
||||
Bitset ParsedIR::get_buffer_block_flags(const SPIRVariable &var) const
|
||||
{
|
||||
auto &type = get<SPIRType>(var.basetype);
|
||||
assert(type.basetype == SPIRType::Struct);
|
||||
if (type.basetype != SPIRType::Struct)
|
||||
SPIRV_CROSS_THROW("Cannot get buffer block flags for non-buffer variable.");
|
||||
|
||||
// Some flags like non-writable, non-readable are actually found
|
||||
// as member decorations. If all members have a decoration set, propagate
|
||||
|
Loading…
Reference in New Issue
Block a user