Merge pull request #156 from kayru/ir_array_ctor

Added a Compiler ctor that takes IR as raw array and count
This commit is contained in:
Hans-Kristian Arntzen 2017-04-01 14:44:47 +02:00 committed by GitHub
commit 46f4695fb7
2 changed files with 7 additions and 0 deletions

View File

@ -70,6 +70,12 @@ Compiler::Compiler(vector<uint32_t> ir)
parse();
}
Compiler::Compiler(const uint32_t *ir, size_t word_count)
: spirv(ir, ir + word_count)
{
parse();
}
string Compiler::compile()
{
// Force a classic "C" locale, reverts when function returns

View File

@ -106,6 +106,7 @@ public:
// The constructor takes a buffer of SPIR-V words and parses it.
Compiler(std::vector<uint32_t> ir);
Compiler(const uint32_t *ir, size_t word_count);
virtual ~Compiler() = default;