Update README.md

This commit is contained in:
ReinUsesLisp 2019-10-24 02:55:35 -03:00
parent 42248408a9
commit a7d5a91a96

View File

@ -35,10 +35,10 @@ public:
SetMemoryModel(spv::AddressingModel::Logical, spv::MemoryModel::GLSL450); SetMemoryModel(spv::AddressingModel::Logical, spv::MemoryModel::GLSL450);
auto main_type{TypeFunction(TypeVoid())}; auto main_type{TypeFunction(TypeVoid())};
auto main_func{Emit(OpFunction(TypeVoid(), spv::FunctionControlMask::MaskNone, main_type))}; auto main_func{OpFunction(TypeVoid(), spv::FunctionControlMask::MaskNone, main_type)};
Emit(OpLabel()); AddLabel(OpLabel());
Emit(OpReturn()); OpReturn();
Emit(OpFunctionEnd()); OpFunctionEnd();
AddEntryPoint(spv::ExecutionModel::Vertex, main_func, "main"); AddEntryPoint(spv::ExecutionModel::Vertex, main_func, "main");
} }
@ -49,5 +49,5 @@ public:
MyModule module; MyModule module;
module.Generate(); module.Generate();
std::vector<std::uint8_t> code{module.Assemble()}; std::vector<std::uint32_t> code{module.Assemble()};
``` ```