mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 00:02:47 +01:00
save compiled functions
This commit is contained in:
parent
3a51a8de2e
commit
909a4290d1
1 changed files with 4 additions and 4 deletions
|
@ -272,7 +272,7 @@ std::unique_ptr<GraphicsPipeline> PipelineCache::CreateGraphicsPipeline(
|
|||
std::cout << code << std::endl;
|
||||
MTL::CompileOptions* compile_options = MTL::CompileOptions::alloc()->init();
|
||||
NS::Error* error = nullptr;
|
||||
[[maybe_unused]] MTL::Library* library = device.GetDevice()->newLibrary(
|
||||
MTL::Library* library = device.GetDevice()->newLibrary(
|
||||
NS::String::string(code.c_str(), NS::ASCIIStringEncoding), compile_options, &error);
|
||||
if (error) {
|
||||
LOG_ERROR(Render_Metal, "failed to create library: {}",
|
||||
|
@ -280,11 +280,11 @@ std::unique_ptr<GraphicsPipeline> PipelineCache::CreateGraphicsPipeline(
|
|||
// HACK
|
||||
std::cout << error->description()->cString(NS::ASCIIStringEncoding) << std::endl;
|
||||
// HACK
|
||||
// throw;
|
||||
throw;
|
||||
}
|
||||
|
||||
// functions[stage_index] =
|
||||
// library->newFunction(NS::String::string("main_", NS::ASCIIStringEncoding));
|
||||
functions[stage_index] =
|
||||
library->newFunction(NS::String::string("main_", NS::ASCIIStringEncoding));
|
||||
previous_stage = &program;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue