sirit/src/opcodes.h
2018-08-26 04:49:16 -03:00

22 lines
478 B
C++

/* This file is part of the sirit project.
* Copyright (c) 2018 ReinUsesLisp
* This software may be used and distributed according to the terms of the GNU
* General Public License version 2 or any later version.
*/
#pragma once
#include "stream.h"
#include "op.h"
namespace Sirit {
template<typename T>
inline void WriteEnum(Stream& stream, spv::Op opcode, T value) {
Op op{opcode};
op.Add(static_cast<u32>(value));
op.Write(stream);
}
} // namespace Sirit