mirror of
https://github.com/KhronosGroup/SPIRV-Cross.git
synced 2024-11-08 13:20:06 +00:00
Merge pull request #2376 from chyyran/get_buffer_block_flags_no_assert
Replace assert of buffer block SPIRType with exception in `get_buffer_block_flags`
This commit is contained in:
commit
6a1fb66eef
@ -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