Function erupt::utils::decode_spv
source · Expand description
Safely decode arbitrary SPIR-V data to it’s correct word representation.
SPIR-V data consists of words (32-bit) not bytes (8-bit) and therefore requires an alignment of 4 bytes. The byte data will be rejected if it is not aligned. Additionally, it is possible that the bytes have wrong endianness, which is also accounted for with this function.