create stack scoped helper macro

This commit is contained in:
Samuliak 2025-01-25 08:59:48 +01:00
parent b50b9135a0
commit 14f42fc653
No known key found for this signature in database
10 changed files with 39 additions and 64 deletions

View file

@ -276,7 +276,7 @@ bool RendererShaderMtl::ShouldCountCompilation() const
MTL::Library* RendererShaderMtl::LibraryFromSource()
{
// Compile from source
MTL::CompileOptions* options = MTL::CompileOptions::alloc()->init();
NS_STACK_SCOPED MTL::CompileOptions* options = MTL::CompileOptions::alloc()->init();
if (g_current_game_profile->GetFastMath())
options->setFastMathEnabled(true);
@ -288,7 +288,6 @@ MTL::Library* RendererShaderMtl::LibraryFromSource()
NS::Error* error = nullptr;
MTL::Library* library = m_mtlr->GetDevice()->newLibrary(ToNSString(m_mslCode), options, &error);
options->release();
if (error)
{
cemuLog_log(LogType::Force, "failed to create library from source: {} -> {}", error->localizedDescription()->utf8String(), m_mslCode.c_str());