mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-06 15:01:18 +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
|
@ -21,7 +21,7 @@ MTL::SamplerState* MetalSamplerCache::GetSamplerState(const LatteContextRegister
|
|||
// Sampler state
|
||||
const _LatteRegisterSetSampler* samplerWords = lcr.SQ_TEX_SAMPLER + samplerIndex;
|
||||
|
||||
MTL::SamplerDescriptor* samplerDescriptor = MTL::SamplerDescriptor::alloc()->init();
|
||||
NS_STACK_SCOPED MTL::SamplerDescriptor* samplerDescriptor = MTL::SamplerDescriptor::alloc()->init();
|
||||
|
||||
// lod
|
||||
uint32 iMinLOD = samplerWords->WORD1.get_MIN_LOD();
|
||||
|
@ -115,7 +115,6 @@ MTL::SamplerState* MetalSamplerCache::GetSamplerState(const LatteContextRegister
|
|||
}
|
||||
|
||||
samplerState = m_mtlr->GetDevice()->newSamplerState(samplerDescriptor);
|
||||
samplerDescriptor->release();
|
||||
|
||||
return samplerState;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue