summaryrefslogtreecommitdiff
path: root/tools/gfx/metal/metal-device.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-device.cpp
parenta729c15e9dce9f5116a38afc66329ab2ca4cea54 (diff)
format
* format * Minor test fixes * enable checking cpp format in ci
Diffstat (limited to 'tools/gfx/metal/metal-device.cpp')
-rw-r--r--tools/gfx/metal/metal-device.cpp231
1 files changed, 148 insertions, 83 deletions
diff --git a/tools/gfx/metal/metal-device.cpp b/tools/gfx/metal/metal-device.cpp
index 609c1bf27..ff534a78c 100644
--- a/tools/gfx/metal/metal-device.cpp
+++ b/tools/gfx/metal/metal-device.cpp
@@ -1,25 +1,25 @@
// metal-device.cpp
#include "metal-device.h"
-#include "metal-swap-chain.h"
-#include "metal-util.h"
#include "../resource-desc-utils.h"
-#include "metal-texture.h"
+#include "metal-buffer.h"
#include "metal-render-pass.h"
-#include "metal-vertex-layout.h"
#include "metal-shader-program.h"
-#include "metal-buffer.h"
-//#include "metal-command-queue.h"
+#include "metal-swap-chain.h"
+#include "metal-texture.h"
+#include "metal-util.h"
+#include "metal-vertex-layout.h"
+// #include "metal-command-queue.h"
#include "metal-fence.h"
#include "metal-query.h"
-//#include "metal-resource-views.h"
+// #include "metal-resource-views.h"
#include "metal-sampler.h"
-#include "metal-shader-object.h"
#include "metal-shader-object-layout.h"
-//#include "metal-shader-table.h"
+#include "metal-shader-object.h"
+// #include "metal-shader-table.h"
#include "metal-transient-heap.h"
-//#include "metal-pipeline-dump-layer.h"
-//#include "metal-helper-functions.h"
+// #include "metal-pipeline-dump-layer.h"
+// #include "metal-helper-functions.h"
#include "source/core/slang-platform.h"
namespace gfx
@@ -37,9 +37,7 @@ static bool shouldDumpPipeline()
return dumpPipelineSettings.produceString() == "1";
}
-DeviceImpl::~DeviceImpl()
-{
-}
+DeviceImpl::~DeviceImpl() {}
Result DeviceImpl::getNativeDeviceHandles(InteropHandles* outHandles)
{
@@ -59,7 +57,7 @@ SlangResult DeviceImpl::initialize(const Desc& desc)
m_info.projectionStyle = ProjectionStyle::Metal;
m_info.deviceType = DeviceType::Metal;
m_info.adapterName = "default";
- static const float kIdentity[] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 };
+ static const float kIdentity[] = {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1};
::memcpy(m_info.identityProjectionMatrix, kIdentity, sizeof(kIdentity));
}
@@ -83,23 +81,27 @@ SlangResult DeviceImpl::initialize(const Desc& desc)
desc.extendedDescs,
SLANG_METAL_LIB,
"",
- makeArray(slang::PreprocessorMacroDesc{ "__METAL__", "1" }).getView()));
+ makeArray(slang::PreprocessorMacroDesc{"__METAL__", "1"}).getView()));
// TODO: expose via some other means
if (captureEnabled())
{
MTL::CaptureManager* captureManager = MTL::CaptureManager::sharedCaptureManager();
MTL::CaptureDescriptor* d = MTL::CaptureDescriptor::alloc()->init();
- MTL::CaptureDestination captureDest = MTL::CaptureDestination::CaptureDestinationGPUTraceDocument;
+ MTL::CaptureDestination captureDest =
+ MTL::CaptureDestination::CaptureDestinationGPUTraceDocument;
if (!captureManager->supportsDestination(MTL::CaptureDestinationGPUTraceDocument))
{
- std::cout << "Cannot capture MTL calls to document; ensure that Info.plist exists with 'MetalCaptureEnabled' set to 'true'." << std::endl;
+ std::cout << "Cannot capture MTL calls to document; ensure that Info.plist exists with "
+ "'MetalCaptureEnabled' set to 'true'."
+ << std::endl;
exit(1);
}
d->setDestination(MTL::CaptureDestinationGPUTraceDocument);
d->setCaptureObject(m_device.get());
NS::SharedPtr<NS::String> path = MetalUtil::createString("frame.gputrace");
- NS::SharedPtr<NS::URL> url = NS::TransferPtr(NS::URL::alloc()->initFileURLWithPath(path.get()));
+ NS::SharedPtr<NS::URL> url =
+ NS::TransferPtr(NS::URL::alloc()->initFileURLWithPath(path.get()));
d->setOutputURL(url.get());
NS::Error* errorCode = NS::Error::alloc();
if (!captureManager->startCapture(d, &errorCode))
@@ -113,7 +115,7 @@ SlangResult DeviceImpl::initialize(const Desc& desc)
return SLANG_OK;
}
-//void DeviceImpl::waitForGpu() { m_deviceQueue.flushAndWait(); }
+// void DeviceImpl::waitForGpu() { m_deviceQueue.flushAndWait(); }
const DeviceInfo& DeviceImpl::getDeviceInfo() const
@@ -121,7 +123,9 @@ const DeviceInfo& DeviceImpl::getDeviceInfo() const
return m_info;
}
-Result DeviceImpl::createTransientResourceHeap(const ITransientResourceHeap::Desc& desc, ITransientResourceHeap** outHeap)
+Result DeviceImpl::createTransientResourceHeap(
+ const ITransientResourceHeap::Desc& desc,
+ ITransientResourceHeap** outHeap)
{
AUTORELEASEPOOL
@@ -146,7 +150,9 @@ Result DeviceImpl::createCommandQueue(const ICommandQueue::Desc& desc, ICommandQ
}
Result DeviceImpl::createSwapchain(
- const ISwapchain::Desc& desc, WindowHandle window, ISwapchain** outSwapchain)
+ const ISwapchain::Desc& desc,
+ WindowHandle window,
+ ISwapchain** outSwapchain)
{
AUTORELEASEPOOL
@@ -156,7 +162,9 @@ Result DeviceImpl::createSwapchain(
return SLANG_OK;
}
-Result DeviceImpl::createFramebufferLayout(const IFramebufferLayout::Desc& desc, IFramebufferLayout** outLayout)
+Result DeviceImpl::createFramebufferLayout(
+ const IFramebufferLayout::Desc& desc,
+ IFramebufferLayout** outLayout)
{
AUTORELEASEPOOL
@@ -166,7 +174,9 @@ Result DeviceImpl::createFramebufferLayout(const IFramebufferLayout::Desc& desc,
return SLANG_OK;
}
-Result DeviceImpl::createRenderPassLayout(const IRenderPassLayout::Desc& desc, IRenderPassLayout** outRenderPassLayout)
+Result DeviceImpl::createRenderPassLayout(
+ const IRenderPassLayout::Desc& desc,
+ IRenderPassLayout** outRenderPassLayout)
{
AUTORELEASEPOOL
@@ -199,7 +209,7 @@ SlangResult DeviceImpl::readTextureResource(
if (textureImpl->getDesc()->sampleDesc.numSamples > 1)
{
- return SLANG_E_NOT_IMPLEMENTED;
+ return SLANG_E_NOT_IMPLEMENTED;
}
NS::SharedPtr<MTL::Texture> srcTexture = textureImpl->m_texture;
@@ -220,7 +230,8 @@ SlangResult DeviceImpl::readTextureResource(
*outPixelSize = bytesPerPixel;
// create staging buffer
- NS::SharedPtr<MTL::Buffer> stagingBuffer = NS::TransferPtr(m_device->newBuffer(bufferSize, MTL::StorageModeShared));
+ NS::SharedPtr<MTL::Buffer> stagingBuffer =
+ NS::TransferPtr(m_device->newBuffer(bufferSize, MTL::StorageModeShared));
if (!stagingBuffer)
{
return SLANG_FAIL;
@@ -229,8 +240,15 @@ SlangResult DeviceImpl::readTextureResource(
MTL::CommandBuffer* commandBuffer = m_commandQueue->commandBuffer();
MTL::BlitCommandEncoder* encoder = commandBuffer->blitCommandEncoder();
encoder->copyFromTexture(
- srcTexture.get(), 0, 0, MTL::Origin(0, 0, 0), MTL::Size(width, height, depth),
- stagingBuffer.get(), 0, bytesPerRow, bytesPerSlice);
+ srcTexture.get(),
+ 0,
+ 0,
+ MTL::Origin(0, 0, 0),
+ MTL::Size(width, height, depth),
+ stagingBuffer.get(),
+ 0,
+ bytesPerRow,
+ bytesPerSlice);
encoder->endEncoding();
commandBuffer->commit();
commandBuffer->waitUntilCompleted();
@@ -245,12 +263,16 @@ SlangResult DeviceImpl::readTextureResource(
}
SlangResult DeviceImpl::readBufferResource(
- IBufferResource* buffer, Offset offset, Size size, ISlangBlob** outBlob)
+ IBufferResource* buffer,
+ Offset offset,
+ Size size,
+ ISlangBlob** outBlob)
{
AUTORELEASEPOOL
// create staging buffer
- NS::SharedPtr<MTL::Buffer> stagingBuffer = NS::TransferPtr(m_device->newBuffer(size, MTL::StorageModeShared));
+ NS::SharedPtr<MTL::Buffer> stagingBuffer =
+ NS::TransferPtr(m_device->newBuffer(size, MTL::StorageModeShared));
if (!stagingBuffer)
{
return SLANG_FAIL;
@@ -258,7 +280,12 @@ SlangResult DeviceImpl::readBufferResource(
MTL::CommandBuffer* commandBuffer = m_commandQueue->commandBuffer();
MTL::BlitCommandEncoder* blitEncoder = commandBuffer->blitCommandEncoder();
- blitEncoder->copyFromBuffer(static_cast<BufferResourceImpl*>(buffer)->m_buffer.get(), offset, stagingBuffer.get(), 0, size);
+ blitEncoder->copyFromBuffer(
+ static_cast<BufferResourceImpl*>(buffer)->m_buffer.get(),
+ offset,
+ stagingBuffer.get(),
+ 0,
+ size);
blitEncoder->endEncoding();
commandBuffer->commit();
commandBuffer->waitUntilCompleted();
@@ -282,7 +309,8 @@ Result DeviceImpl::getAccelerationStructurePrebuildInfo(
}
Result DeviceImpl::createAccelerationStructure(
- const IAccelerationStructure::CreateDesc& desc, IAccelerationStructure** outAS)
+ const IAccelerationStructure::CreateDesc& desc,
+ IAccelerationStructure** outAS)
{
AUTORELEASEPOOL
@@ -290,13 +318,14 @@ Result DeviceImpl::createAccelerationStructure(
}
Result DeviceImpl::getTextureAllocationInfo(
- const ITextureResource::Desc& descIn, Size* outSize, Size* outAlignment)
+ const ITextureResource::Desc& descIn,
+ Size* outSize,
+ Size* outAlignment)
{
AUTORELEASEPOOL
- auto alignTo = [&](Size size, Size alignment) -> Size {
- return ((size + alignment - 1) / alignment) * alignment;
- };
+ auto alignTo = [&](Size size, Size alignment) -> Size
+ { return ((size + alignment - 1) / alignment) * alignment; };
TextureResource::Desc desc = fixupTextureDesc(descIn);
FormatInfo formatInfo;
@@ -311,7 +340,8 @@ Result DeviceImpl::getTextureAllocationInfo(
for (Int i = 0; i < desc.numMipLevels; ++i)
{
- Size rowSize = ((extents.width + formatInfo.blockWidth - 1) / formatInfo.blockWidth) * formatInfo.blockSizeInBytes;
+ Size rowSize = ((extents.width + formatInfo.blockWidth - 1) / formatInfo.blockWidth) *
+ formatInfo.blockSizeInBytes;
rowSize = alignTo(rowSize, alignment);
Size sliceSize = rowSize * alignTo(extents.height, formatInfo.blockHeight);
size += sliceSize * extents.depth;
@@ -358,19 +388,16 @@ Result DeviceImpl::createTextureResource(
RefPtr<TextureResourceImpl> textureImpl(new TextureResourceImpl(desc, this));
- NS::SharedPtr<MTL::TextureDescriptor> textureDesc = NS::TransferPtr(MTL::TextureDescriptor::alloc()->init());
+ NS::SharedPtr<MTL::TextureDescriptor> textureDesc =
+ NS::TransferPtr(MTL::TextureDescriptor::alloc()->init());
switch (desc.memoryType)
{
- case MemoryType::DeviceLocal:
- textureDesc->setStorageMode(MTL::StorageModePrivate);
- break;
+ case MemoryType::DeviceLocal: textureDesc->setStorageMode(MTL::StorageModePrivate); break;
case MemoryType::Upload:
textureDesc->setStorageMode(MTL::StorageModeShared);
textureDesc->setCpuCacheMode(MTL::CPUCacheModeWriteCombined);
break;
- case MemoryType::ReadBack:
- textureDesc->setStorageMode(MTL::StorageModeShared);
- break;
+ case MemoryType::ReadBack: textureDesc->setStorageMode(MTL::StorageModeShared); break;
}
bool isArray = desc.arraySize > 0;
@@ -384,7 +411,8 @@ Result DeviceImpl::createTextureResource(
case IResource::Type::Texture2D:
if (desc.sampleDesc.numSamples > 1)
{
- textureDesc->setTextureType(isArray ? MTL::TextureType2DMultisampleArray : MTL::TextureType2DMultisample);
+ textureDesc->setTextureType(
+ isArray ? MTL::TextureType2DMultisampleArray : MTL::TextureType2DMultisample);
textureDesc->setSampleCount(desc.sampleDesc.numSamples);
}
else
@@ -405,9 +433,7 @@ Result DeviceImpl::createTextureResource(
textureDesc->setHeight(descIn.size.height);
textureDesc->setDepth(descIn.size.depth);
break;
- default:
- assert("!Unsupported texture type");
- return SLANG_FAIL;
+ default: assert("!Unsupported texture type"); return SLANG_FAIL;
}
MTL::TextureUsage textureUsage = MTL::TextureUsageUnknown;
@@ -430,9 +456,7 @@ Result DeviceImpl::createTextureResource(
case Format::R32_UINT:
case Format::R32_SINT:
case Format::R32G32_UINT:
- case Format::R32G32_SINT:
- textureUsage |= MTL::TextureUsageShaderAtomic;
- break;
+ case Format::R32G32_SINT: textureUsage |= MTL::TextureUsageShaderAtomic; break;
}
}
@@ -456,7 +480,8 @@ Result DeviceImpl::createTextureResource(
{
textureDesc->setStorageMode(MTL::StorageModeManaged);
textureDesc->setCpuCacheMode(MTL::CPUCacheModeDefaultCache);
- NS::SharedPtr<MTL::Texture> stagingTexture = NS::TransferPtr(m_device->newTexture(textureDesc.get()));
+ NS::SharedPtr<MTL::Texture> stagingTexture =
+ NS::TransferPtr(m_device->newTexture(textureDesc.get()));
MTL::CommandBuffer* commandBuffer = m_commandQueue->commandBuffer();
MTL::BlitCommandEncoder* encoder = commandBuffer->blitCommandEncoder();
@@ -480,12 +505,22 @@ Result DeviceImpl::createTextureResource(
{
if (level >= desc.numMipLevels)
continue;
- const ITextureResource::SubresourceData& subresourceData = initData[slice * initMipLevels + level];
- stagingTexture->replaceRegion(region, level, slice, subresourceData.data, subresourceData.strideY, subresourceData.strideZ);
+ const ITextureResource::SubresourceData& subresourceData =
+ initData[slice * initMipLevels + level];
+ stagingTexture->replaceRegion(
+ region,
+ level,
+ slice,
+ subresourceData.data,
+ subresourceData.strideY,
+ subresourceData.strideZ);
encoder->synchronizeTexture(stagingTexture.get(), slice, level);
- region.size.width = region.size.width > 0 ? Math::Max(1ul, region.size.width >> 1) : 0;
- region.size.height = region.size.height > 0 ? Math::Max(1ul, region.size.height >> 1) : 0;
- region.size.depth = region.size.depth > 0 ? Math::Max(1ul, region.size.depth >> 1) : 0;
+ region.size.width =
+ region.size.width > 0 ? Math::Max(1ul, region.size.width >> 1) : 0;
+ region.size.height =
+ region.size.height > 0 ? Math::Max(1ul, region.size.height >> 1) : 0;
+ region.size.depth =
+ region.size.depth > 0 ? Math::Max(1ul, region.size.depth >> 1) : 0;
}
}
@@ -500,7 +535,9 @@ Result DeviceImpl::createTextureResource(
}
Result DeviceImpl::createBufferResource(
- const IBufferResource::Desc& descIn, const void* initData, IBufferResource** outResource)
+ const IBufferResource::Desc& descIn,
+ const void* initData,
+ IBufferResource** outResource)
{
AUTORELEASEPOOL
@@ -511,17 +548,15 @@ Result DeviceImpl::createBufferResource(
MTL::ResourceOptions resourceOptions = MTL::ResourceOptions(0);
switch (desc.memoryType)
{
- case MemoryType::DeviceLocal:
- resourceOptions = MTL::ResourceStorageModePrivate;
- break;
+ case MemoryType::DeviceLocal: resourceOptions = MTL::ResourceStorageModePrivate; break;
case MemoryType::Upload:
resourceOptions = MTL::ResourceStorageModeShared | MTL::CPUCacheModeWriteCombined;
break;
- case MemoryType::ReadBack:
- resourceOptions = MTL::ResourceStorageModeShared;
- break;
+ case MemoryType::ReadBack: resourceOptions = MTL::ResourceStorageModeShared; break;
}
- resourceOptions |= (desc.memoryType == MemoryType::DeviceLocal) ? MTL::ResourceStorageModePrivate : MTL::ResourceStorageModeShared;
+ resourceOptions |= (desc.memoryType == MemoryType::DeviceLocal)
+ ? MTL::ResourceStorageModePrivate
+ : MTL::ResourceStorageModeShared;
RefPtr<BufferResourceImpl> bufferImpl(new BufferResourceImpl(desc, this));
bufferImpl->m_buffer = NS::TransferPtr(m_device->newBuffer(bufferSize, resourceOptions));
@@ -533,7 +568,9 @@ Result DeviceImpl::createBufferResource(
if (initData)
{
NS::SharedPtr<MTL::Buffer> stagingBuffer = NS::TransferPtr(m_device->newBuffer(
- initData, bufferSize, MTL::ResourceStorageModeShared | MTL::CPUCacheModeWriteCombined));
+ initData,
+ bufferSize,
+ MTL::ResourceStorageModeShared | MTL::CPUCacheModeWriteCombined));
MTL::CommandBuffer* commandBuffer = m_commandQueue->commandBuffer();
MTL::BlitCommandEncoder* encoder = commandBuffer->blitCommandEncoder();
if (!stagingBuffer || !commandBuffer || !encoder)
@@ -551,7 +588,9 @@ Result DeviceImpl::createBufferResource(
}
Result DeviceImpl::createBufferFromNativeHandle(
- InteropHandle handle, const IBufferResource::Desc& srcDesc, IBufferResource** outResource)
+ InteropHandle handle,
+ const IBufferResource::Desc& srcDesc,
+ IBufferResource** outResource)
{
AUTORELEASEPOOL
@@ -569,7 +608,9 @@ Result DeviceImpl::createSamplerState(ISamplerState::Desc const& desc, ISamplerS
}
Result DeviceImpl::createTextureView(
- ITextureResource* texture, IResourceView::Desc const& desc, IResourceView** outView)
+ ITextureResource* texture,
+ IResourceView::Desc const& desc,
+ IResourceView** outView)
{
AUTORELEASEPOOL
@@ -586,7 +627,8 @@ Result DeviceImpl::createTextureView(
const ITextureResource::Desc& textureDesc = *textureImpl->getDesc();
SubresourceRange sr = desc.subresourceRange;
- sr.mipLevelCount = sr.mipLevelCount == 0 ? textureDesc.numMipLevels - sr.mipLevel : sr.mipLevelCount;
+ sr.mipLevelCount =
+ sr.mipLevelCount == 0 ? textureDesc.numMipLevels - sr.mipLevel : sr.mipLevelCount;
sr.layerCount = sr.layerCount == 0 ? textureDesc.arraySize - sr.baseArrayLayer : sr.layerCount;
if (sr.mipLevel == 0 && sr.mipLevelCount == textureDesc.numMipLevels &&
sr.baseArrayLayer == 0 && sr.layerCount == textureDesc.arraySize)
@@ -596,11 +638,17 @@ Result DeviceImpl::createTextureView(
return SLANG_OK;
}
- MTL::PixelFormat pixelFormat = desc.format == Format::Unknown ? textureImpl->m_pixelFormat : MetalUtil::translatePixelFormat(desc.format);
+ MTL::PixelFormat pixelFormat = desc.format == Format::Unknown
+ ? textureImpl->m_pixelFormat
+ : MetalUtil::translatePixelFormat(desc.format);
NS::Range levelRange(sr.baseArrayLayer, sr.layerCount);
NS::Range sliceRange(sr.mipLevel, sr.mipLevelCount);
- viewImpl->m_textureView = NS::TransferPtr(textureImpl->m_texture->newTextureView(pixelFormat, textureImpl->m_textureType, levelRange, sliceRange));
+ viewImpl->m_textureView = NS::TransferPtr(textureImpl->m_texture->newTextureView(
+ pixelFormat,
+ textureImpl->m_textureType,
+ levelRange,
+ sliceRange));
if (!viewImpl->m_textureView)
{
return SLANG_FAIL;
@@ -651,7 +699,8 @@ Result DeviceImpl::createBufferView(
return SLANG_FAIL;
}
- if (desc.type != IResourceView::Type::UnorderedAccess && desc.type != IResourceView::Type::ShaderResource)
+ if (desc.type != IResourceView::Type::UnorderedAccess &&
+ desc.type != IResourceView::Type::ShaderResource)
{
return SLANG_FAIL;
}
@@ -662,7 +711,8 @@ Result DeviceImpl::createBufferView(
viewImpl->m_desc = desc;
viewImpl->m_buffer = bufferImpl;
viewImpl->m_offset = desc.bufferRange.offset;
- viewImpl->m_size = desc.bufferRange.size == 0 ? bufferImpl->getDesc()->sizeInBytes : desc.bufferRange.size;
+ viewImpl->m_size =
+ desc.bufferRange.size == 0 ? bufferImpl->getDesc()->sizeInBytes : desc.bufferRange.size;
returnComPtr(outView, viewImpl);
return SLANG_OK;
}
@@ -678,7 +728,9 @@ Result DeviceImpl::createInputLayout(IInputLayout::Desc const& desc, IInputLayou
}
Result DeviceImpl::createProgram(
- const IShaderProgram::Desc& desc, IShaderProgram** outProgram, ISlangBlob** outDiagnosticBlob)
+ const IShaderProgram::Desc& desc,
+ IShaderProgram** outProgram,
+ ISlangBlob** outDiagnosticBlob)
{
AUTORELEASEPOOL
@@ -708,8 +760,8 @@ Result DeviceImpl::createShaderObjectLayout(
AUTORELEASEPOOL
RefPtr<ShaderObjectLayoutImpl> layout;
- SLANG_RETURN_ON_FAIL(ShaderObjectLayoutImpl::createForElementType(
- this, session, typeLayout, layout.writeRef()));
+ SLANG_RETURN_ON_FAIL(
+ ShaderObjectLayoutImpl::createForElementType(this, session, typeLayout, layout.writeRef()));
returnRefPtrMove(outLayout, layout);
return SLANG_OK;
}
@@ -719,14 +771,17 @@ Result DeviceImpl::createShaderObject(ShaderObjectLayoutBase* layout, IShaderObj
AUTORELEASEPOOL
RefPtr<ShaderObjectImpl> shaderObject;
- SLANG_RETURN_ON_FAIL(ShaderObjectImpl::create(this,
- static_cast<ShaderObjectLayoutImpl*>(layout), shaderObject.writeRef()));
+ SLANG_RETURN_ON_FAIL(ShaderObjectImpl::create(
+ this,
+ static_cast<ShaderObjectLayoutImpl*>(layout),
+ shaderObject.writeRef()));
returnComPtr(outObject, shaderObject);
return SLANG_OK;
}
Result DeviceImpl::createMutableShaderObject(
- ShaderObjectLayoutBase* layout, IShaderObject** outObject)
+ ShaderObjectLayoutBase* layout,
+ IShaderObject** outObject)
{
AUTORELEASEPOOL
@@ -747,7 +802,9 @@ Result DeviceImpl::createShaderTable(const IShaderTable::Desc& desc, IShaderTabl
return SLANG_E_NOT_IMPLEMENTED;
}
-Result DeviceImpl::createGraphicsPipelineState(const GraphicsPipelineStateDesc& desc, IPipelineState** outState)
+Result DeviceImpl::createGraphicsPipelineState(
+ const GraphicsPipelineStateDesc& desc,
+ IPipelineState** outState)
{
AUTORELEASEPOOL
@@ -757,7 +814,9 @@ Result DeviceImpl::createGraphicsPipelineState(const GraphicsPipelineStateDesc&
return SLANG_OK;
}
-Result DeviceImpl::createComputePipelineState(const ComputePipelineStateDesc& desc, IPipelineState** outState)
+Result DeviceImpl::createComputePipelineState(
+ const ComputePipelineStateDesc& desc,
+ IPipelineState** outState)
{
AUTORELEASEPOOL
@@ -768,7 +827,9 @@ Result DeviceImpl::createComputePipelineState(const ComputePipelineStateDesc& de
return SLANG_OK;
}
-Result DeviceImpl::createRayTracingPipelineState(const RayTracingPipelineStateDesc& desc, IPipelineState** outState)
+Result DeviceImpl::createRayTracingPipelineState(
+ const RayTracingPipelineStateDesc& desc,
+ IPipelineState** outState)
{
AUTORELEASEPOOL
@@ -796,7 +857,11 @@ Result DeviceImpl::createFence(const IFence::Desc& desc, IFence** outFence)
}
Result DeviceImpl::waitForFences(
- GfxCount fenceCount, IFence** fences, uint64_t* fenceValues, bool waitForAll, uint64_t timeout)
+ GfxCount fenceCount,
+ IFence** fences,
+ uint64_t* fenceValues,
+ bool waitForAll,
+ uint64_t timeout)
{
return SLANG_E_NOT_IMPLEMENTED;
}