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:
commit
46f4695fb7
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user