mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-16 11:48:28 +12:00
create stack scoped helper macro
This commit is contained in:
parent
b50b9135a0
commit
14f42fc653
10 changed files with 39 additions and 64 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue