diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2024-10-29 14:49:26 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-29 14:49:26 +0800 |
| commit | f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 (patch) | |
| tree | ea1d61342cd29368e19135000ec2948813096205 /tools/gfx/metal/metal-sampler.cpp | |
| parent | a729c15e9dce9f5116a38afc66329ab2ca4cea54 (diff) | |
format
* format
* Minor test fixes
* enable checking cpp format in ci
Diffstat (limited to 'tools/gfx/metal/metal-sampler.cpp')
| -rw-r--r-- | tools/gfx/metal/metal-sampler.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/gfx/metal/metal-sampler.cpp b/tools/gfx/metal/metal-sampler.cpp index 561b93ea2..6f0c0e36b 100644 --- a/tools/gfx/metal/metal-sampler.cpp +++ b/tools/gfx/metal/metal-sampler.cpp @@ -1,5 +1,6 @@ // metal-sampler.cpp #include "metal-sampler.h" + #include "metal-util.h" namespace gfx @@ -10,15 +11,14 @@ using namespace Slang; namespace metal { -SamplerStateImpl::~SamplerStateImpl() -{ -} +SamplerStateImpl::~SamplerStateImpl() {} Result SamplerStateImpl::init(DeviceImpl* device, const ISamplerState::Desc& desc) { m_device = device; - NS::SharedPtr<MTL::SamplerDescriptor> samplerDesc = NS::TransferPtr(MTL::SamplerDescriptor::alloc()->init()); + NS::SharedPtr<MTL::SamplerDescriptor> samplerDesc = + NS::TransferPtr(MTL::SamplerDescriptor::alloc()->init()); samplerDesc->setMinFilter(MetalUtil::translateSamplerMinMagFilter(desc.minFilter)); samplerDesc->setMagFilter(MetalUtil::translateSamplerMinMagFilter(desc.magFilter)); @@ -45,7 +45,7 @@ Result SamplerStateImpl::init(DeviceImpl* device, const ISamplerState::Desc& des // TODO: no support for reduction op m_samplerState = NS::TransferPtr(m_device->m_device->newSamplerState(samplerDesc.get())); - + return m_samplerState ? SLANG_OK : SLANG_FAIL; } |
