mirror of
https://github.com/azahar-emu/sirit
synced 2025-11-09 08:30:01 +01:00
22 lines
478 B
C++
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
|