Assemble uint32_t instead of uint8_t

Vulkan receives SPIR-V modules with a uint32_t alignment. Returning
uint8_t forced users to invoke undefined behaviour (reinterpret_cast)
or copy.
This commit is contained in:
ReinUsesLisp
2019-10-18 03:44:49 -03:00
parent ab507033db
commit 8cf3d225db
7 changed files with 31 additions and 31 deletions

View File

@@ -49,8 +49,7 @@ bool Op::operator==(const Operand& other) const {
}
void Op::Write(Stream& stream) const {
stream.Write(static_cast<u16>(opcode));
stream.Write(WordCount());
stream.Write(static_cast<u16>(opcode), WordCount());
if (result_type) {
result_type->Fetch(stream);