mirror of
https://github.com/azahar-emu/sirit.git
synced 2026-04-04 01:35:58 +02:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user