summaryrefslogtreecommitdiff
path: root/tools/gfx/metal/metal-query.cpp
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-10-29 14:49:26 +0800
committerGitHub <noreply@github.com>2024-10-29 14:49:26 +0800
commitf65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 (patch)
treeea1d61342cd29368e19135000ec2948813096205 /tools/gfx/metal/metal-query.cpp
parenta729c15e9dce9f5116a38afc66329ab2ca4cea54 (diff)
format
* format * Minor test fixes * enable checking cpp format in ci
Diffstat (limited to 'tools/gfx/metal/metal-query.cpp')
-rw-r--r--tools/gfx/metal/metal-query.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/tools/gfx/metal/metal-query.cpp b/tools/gfx/metal/metal-query.cpp
index 4e1d09d77..6075d5549 100644
--- a/tools/gfx/metal/metal-query.cpp
+++ b/tools/gfx/metal/metal-query.cpp
@@ -1,7 +1,7 @@
// metal-query.cpp
#include "metal-query.h"
-//#include "metal-util.h"
+// #include "metal-util.h"
namespace gfx
{
@@ -11,9 +11,7 @@ using namespace Slang;
namespace metal
{
-QueryPoolImpl::~QueryPoolImpl()
-{
-}
+QueryPoolImpl::~QueryPoolImpl() {}
static MTL::CounterSet* findCounterSet(MTL::Device* device, QueryType queryType)
{
@@ -26,7 +24,8 @@ static MTL::CounterSet* findCounterSet(MTL::Device* device, QueryType queryType)
for (int i = 0; i < device->counterSets()->count(); ++i)
{
- MTL::CounterSet* counterSet = static_cast<MTL::CounterSet*>(device->counterSets()->object(i));
+ MTL::CounterSet* counterSet =
+ static_cast<MTL::CounterSet*>(device->counterSets()->object(i));
for (int j = 0; j < counterSet->counters()->count(); ++j)
{
MTL::Counter* counter = static_cast<MTL::Counter*>(counterSet->counters()->object(j));
@@ -50,7 +49,8 @@ Result QueryPoolImpl::init(DeviceImpl* device, const IQueryPool::Desc& desc)
return SLANG_E_NOT_AVAILABLE;
}
- NS::SharedPtr<MTL::CounterSampleBufferDescriptor> counterSampleBufferDesc = NS::TransferPtr(MTL::CounterSampleBufferDescriptor::alloc()->init());
+ NS::SharedPtr<MTL::CounterSampleBufferDescriptor> counterSampleBufferDesc =
+ NS::TransferPtr(MTL::CounterSampleBufferDescriptor::alloc()->init());
counterSampleBufferDesc->setStorageMode(MTL::StorageModeShared);
counterSampleBufferDesc->setSampleCount(m_desc.count);
counterSampleBufferDesc->setCounterSet(counterSet);
@@ -58,7 +58,8 @@ Result QueryPoolImpl::init(DeviceImpl* device, const IQueryPool::Desc& desc)
m_device->m_device->counterSets();
NS::Error* error;
- m_counterSampleBuffer = NS::TransferPtr(m_device->m_device->newCounterSampleBuffer(counterSampleBufferDesc.get(), &error));
+ m_counterSampleBuffer = NS::TransferPtr(
+ m_device->m_device->newCounterSampleBuffer(counterSampleBufferDesc.get(), &error));
return m_counterSampleBuffer ? SLANG_OK : SLANG_FAIL;
}