Remove WriteEnum abstraction
This commit is contained in:
parent
9d787510d3
commit
93d42e62da
1 changed files with 3 additions and 8 deletions
|
@ -13,13 +13,6 @@
|
||||||
|
|
||||||
namespace Sirit {
|
namespace Sirit {
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
static void WriteEnum(Stream& stream, spv::Op opcode, T value) {
|
|
||||||
Op op{opcode};
|
|
||||||
op.Add(static_cast<u32>(value));
|
|
||||||
op.Write(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T> static void WriteSet(Stream& stream, const T& set) {
|
template <typename T> static void WriteSet(Stream& stream, const T& set) {
|
||||||
for (const auto& item : set) {
|
for (const auto& item : set) {
|
||||||
item->Write(stream);
|
item->Write(stream);
|
||||||
|
@ -41,7 +34,9 @@ std::vector<u8> Module::Assemble() const {
|
||||||
stream.Write(static_cast<u32>(0));
|
stream.Write(static_cast<u32>(0));
|
||||||
|
|
||||||
for (const auto capability : capabilities) {
|
for (const auto capability : capabilities) {
|
||||||
WriteEnum(stream, spv::Op::OpCapability, capability);
|
Op op(spv::Op::OpCapability);
|
||||||
|
op.Add(static_cast<u32>(capability));
|
||||||
|
op.Write(stream);
|
||||||
}
|
}
|
||||||
if (glsl_std_450) {
|
if (glsl_std_450) {
|
||||||
glsl_std_450->Write(stream);
|
glsl_std_450->Write(stream);
|
||||||
|
|
Loading…
Reference in a new issue