include debug information

This commit is contained in:
Samuliak 2024-08-16 16:38:01 +02:00
parent 0d0152d6e0
commit 502d5b8b2f
6 changed files with 60 additions and 12 deletions

View file

@ -78,13 +78,13 @@ void RendererShaderMtl::CompileFragmentFunction(CachedFBOMtl* activeFBO)
void RendererShaderMtl::Compile(const std::string& mslCode)
{
NS::Error* error = nullptr;
MTL::Library* library = m_mtlr->GetDevice()->newLibrary(NS::String::string(mslCode.c_str(), NS::ASCIIStringEncoding), nullptr, &error);
MTL::Library* library = m_mtlr->GetDevice()->newLibrary(ToNSString(mslCode), nullptr, &error);
if (error)
{
printf("failed to create library (error: %s) -> source:\n%s\n", error->localizedDescription()->utf8String(), mslCode.c_str());
error->release();
return;
}
m_function = library->newFunction(NS::String::string("main0", NS::ASCIIStringEncoding));
m_function = library->newFunction(ToNSString("main0"));
library->release();
}