mirror of https://git.suyu.dev/suyu/suyu
save compiled functions
This commit is contained in:
parent
3a51a8de2e
commit
909a4290d1
|
@ -272,7 +272,7 @@ std::unique_ptr<GraphicsPipeline> PipelineCache::CreateGraphicsPipeline(
|
||||||
std::cout << code << std::endl;
|
std::cout << code << std::endl;
|
||||||
MTL::CompileOptions* compile_options = MTL::CompileOptions::alloc()->init();
|
MTL::CompileOptions* compile_options = MTL::CompileOptions::alloc()->init();
|
||||||
NS::Error* error = nullptr;
|
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);
|
NS::String::string(code.c_str(), NS::ASCIIStringEncoding), compile_options, &error);
|
||||||
if (error) {
|
if (error) {
|
||||||
LOG_ERROR(Render_Metal, "failed to create library: {}",
|
LOG_ERROR(Render_Metal, "failed to create library: {}",
|
||||||
|
@ -280,11 +280,11 @@ std::unique_ptr<GraphicsPipeline> PipelineCache::CreateGraphicsPipeline(
|
||||||
// HACK
|
// HACK
|
||||||
std::cout << error->description()->cString(NS::ASCIIStringEncoding) << std::endl;
|
std::cout << error->description()->cString(NS::ASCIIStringEncoding) << std::endl;
|
||||||
// HACK
|
// HACK
|
||||||
// throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|
||||||
// functions[stage_index] =
|
functions[stage_index] =
|
||||||
// library->newFunction(NS::String::string("main_", NS::ASCIIStringEncoding));
|
library->newFunction(NS::String::string("main_", NS::ASCIIStringEncoding));
|
||||||
previous_stage = &program;
|
previous_stage = &program;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue