From f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Tue, 29 Oct 2024 14:49:26 +0800 Subject: format * format * Minor test fixes * enable checking cpp format in ci --- tools/gfx/cuda/cuda-device.cpp | 257 ++++++++++++++++++++--------------------- 1 file changed, 127 insertions(+), 130 deletions(-) (limited to 'tools/gfx/cuda/cuda-device.cpp') diff --git a/tools/gfx/cuda/cuda-device.cpp b/tools/gfx/cuda/cuda-device.cpp index b1b582d00..8162a20b8 100644 --- a/tools/gfx/cuda/cuda-device.cpp +++ b/tools/gfx/cuda/cuda-device.cpp @@ -5,10 +5,10 @@ #include "cuda-command-queue.h" #include "cuda-pipeline-state.h" #include "cuda-query.h" -#include "cuda-shader-object.h" +#include "cuda-resource-views.h" #include "cuda-shader-object-layout.h" +#include "cuda-shader-object.h" #include "cuda-shader-program.h" -#include "cuda-resource-views.h" #include "cuda-texture.h" namespace gfx @@ -42,7 +42,7 @@ int DeviceImpl::_calcSMCountPerMultiProcessor(int major, int minor) {0x62, 128}, {0x70, 64}, {0x72, 64}, - {0x75, 64} }; + {0x75, 64}}; const int sm = ((major << 4) + minor); for (Index i = 0; i < SLANG_COUNT_OF(infos); ++i) @@ -78,9 +78,12 @@ SlangResult DeviceImpl::_findMaxFlopsDeviceIndex(int* outDeviceIndex) CUdevice device; SLANG_CUDA_RETURN_ON_FAIL(cuDeviceGet(&device, currentDevice)); int computeMode = -1, major = 0, minor = 0; - SLANG_CUDA_RETURN_ON_FAIL(cuDeviceGetAttribute(&computeMode, CU_DEVICE_ATTRIBUTE_COMPUTE_MODE, device)); - SLANG_CUDA_RETURN_ON_FAIL(cuDeviceGetAttribute(&major, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, device)); - SLANG_CUDA_RETURN_ON_FAIL(cuDeviceGetAttribute(&minor, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR, device)); + SLANG_CUDA_RETURN_ON_FAIL( + cuDeviceGetAttribute(&computeMode, CU_DEVICE_ATTRIBUTE_COMPUTE_MODE, device)); + SLANG_CUDA_RETURN_ON_FAIL( + cuDeviceGetAttribute(&major, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, device)); + SLANG_CUDA_RETURN_ON_FAIL( + cuDeviceGetAttribute(&minor, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR, device)); // If this GPU is not running on Compute Mode prohibited, // then we can add it to the list @@ -96,8 +99,12 @@ SlangResult DeviceImpl::_findMaxFlopsDeviceIndex(int* outDeviceIndex) } int multiProcessorCount = 0, clockRate = 0; - SLANG_CUDA_RETURN_ON_FAIL(cuDeviceGetAttribute(&multiProcessorCount, CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT, device)); - SLANG_CUDA_RETURN_ON_FAIL(cuDeviceGetAttribute(&clockRate, CU_DEVICE_ATTRIBUTE_CLOCK_RATE, device)); + SLANG_CUDA_RETURN_ON_FAIL(cuDeviceGetAttribute( + &multiProcessorCount, + CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT, + device)); + SLANG_CUDA_RETURN_ON_FAIL( + cuDeviceGetAttribute(&clockRate, CU_DEVICE_ATTRIBUTE_CLOCK_RATE, device)); uint64_t compute_perf = uint64_t(multiProcessorCount) * smPerMultiproc * clockRate; if (compute_perf > maxComputePerf) @@ -143,7 +150,7 @@ SLANG_NO_THROW SlangResult SLANG_MCALL DeviceImpl::initialize(const Desc& desc) desc.extendedDescs, SLANG_PTX, "sm_5_1", - makeArray(slang::PreprocessorMacroDesc{ "__CUDA_COMPUTE__", "1" }).getView())); + makeArray(slang::PreprocessorMacroDesc{"__CUDA_COMPUTE__", "1"}).getView())); SLANG_RETURN_ON_FAIL(RendererBase::initialize(desc)); @@ -174,12 +181,13 @@ SLANG_NO_THROW SlangResult SLANG_MCALL DeviceImpl::initialize(const Desc& desc) SLANG_CUDA_RETURN_ON_FAIL(cuDeviceGet(&m_device, m_deviceIndex)); SLANG_CUDA_RETURN_WITH_REPORT_ON_FAIL( - cuCtxCreate(&m_context->m_context, 0, m_device), reportType); + cuCtxCreate(&m_context->m_context, 0, m_device), + reportType); { // Not clear how to detect half support on CUDA. For now we'll assume we have it m_features.add("half"); - + // CUDA has support for realtime clock m_features.add("realtime-clock"); @@ -193,7 +201,7 @@ SLANG_NO_THROW SlangResult SLANG_MCALL DeviceImpl::initialize(const Desc& desc) m_info.bindingStyle = BindingStyle::CUDA; m_info.projectionStyle = ProjectionStyle::DirectX; m_info.apiName = "CUDA"; - 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)); char deviceName[256]; cuDeviceGetName(deviceName, sizeof(deviceName), m_device); @@ -225,7 +233,8 @@ SLANG_NO_THROW SlangResult SLANG_MCALL DeviceImpl::initialize(const Desc& desc) Math::Min( getAttribute(CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT), getAttribute(CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH))); - limits.maxTextureDimensionCube = getAttribute(CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH); + limits.maxTextureDimensionCube = + getAttribute(CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH); limits.maxTextureArrayLayers = Math::Min( getAttribute(CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS), getAttribute(CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS)); @@ -266,47 +275,31 @@ Result DeviceImpl::getCUDAFormat(Format format, CUarray_format* outFormat) case Format::R32G32B32_FLOAT: case Format::R32G32_FLOAT: case Format::R32_FLOAT: - case Format::D32_FLOAT: - *outFormat = CU_AD_FORMAT_FLOAT; - return SLANG_OK; + case Format::D32_FLOAT: *outFormat = CU_AD_FORMAT_FLOAT; return SLANG_OK; case Format::R16G16B16A16_FLOAT: case Format::R16G16_FLOAT: - case Format::R16_FLOAT: - *outFormat = CU_AD_FORMAT_HALF; - return SLANG_OK; + case Format::R16_FLOAT: *outFormat = CU_AD_FORMAT_HALF; return SLANG_OK; case Format::R32G32B32A32_UINT: case Format::R32G32B32_UINT: case Format::R32G32_UINT: - case Format::R32_UINT: - *outFormat = CU_AD_FORMAT_UNSIGNED_INT32; - return SLANG_OK; + case Format::R32_UINT: *outFormat = CU_AD_FORMAT_UNSIGNED_INT32; return SLANG_OK; case Format::R16G16B16A16_UINT: case Format::R16G16_UINT: - case Format::R16_UINT: - *outFormat = CU_AD_FORMAT_UNSIGNED_INT16; - return SLANG_OK; + case Format::R16_UINT: *outFormat = CU_AD_FORMAT_UNSIGNED_INT16; return SLANG_OK; case Format::R8G8B8A8_UINT: case Format::R8G8_UINT: case Format::R8_UINT: - case Format::R8G8B8A8_UNORM: - *outFormat = CU_AD_FORMAT_UNSIGNED_INT8; - return SLANG_OK; + case Format::R8G8B8A8_UNORM: *outFormat = CU_AD_FORMAT_UNSIGNED_INT8; return SLANG_OK; case Format::R32G32B32A32_SINT: case Format::R32G32B32_SINT: case Format::R32G32_SINT: - case Format::R32_SINT: - *outFormat = CU_AD_FORMAT_SIGNED_INT32; - return SLANG_OK; + case Format::R32_SINT: *outFormat = CU_AD_FORMAT_SIGNED_INT32; return SLANG_OK; case Format::R16G16B16A16_SINT: case Format::R16G16_SINT: - case Format::R16_SINT: - *outFormat = CU_AD_FORMAT_SIGNED_INT16; - return SLANG_OK; + case Format::R16_SINT: *outFormat = CU_AD_FORMAT_SIGNED_INT16; return SLANG_OK; case Format::R8G8B8A8_SINT: case Format::R8G8_SINT: - case Format::R8_SINT: - *outFormat = CU_AD_FORMAT_SIGNED_INT8; - return SLANG_OK; + case Format::R8_SINT: *outFormat = CU_AD_FORMAT_SIGNED_INT8; return SLANG_OK; default: SLANG_ASSERT(!"Only support R32_FLOAT/R8G8B8A8_UNORM formats for now"); return SLANG_FAIL; @@ -348,16 +341,11 @@ SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createTextureResource( depth = 0; break; - case IResource::Type::Texture2D: - depth = 0; - break; + case IResource::Type::Texture2D: depth = 0; break; - case IResource::Type::Texture3D: - break; + case IResource::Type::Texture3D: break; - case IResource::Type::TextureCube: - depth = 1; - break; + case IResource::Type::TextureCube: depth = 1; break; } { @@ -372,25 +360,25 @@ SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createTextureResource( switch (format) { case CU_AD_FORMAT_FLOAT: - { - elementSize = sizeof(float) * numChannels; - break; - } + { + elementSize = sizeof(float) * numChannels; + break; + } case CU_AD_FORMAT_HALF: - { - elementSize = sizeof(uint16_t) * numChannels; - break; - } + { + elementSize = sizeof(uint16_t) * numChannels; + break; + } case CU_AD_FORMAT_UNSIGNED_INT8: - { - elementSize = sizeof(uint8_t) * numChannels; - break; - } + { + elementSize = sizeof(uint8_t) * numChannels; + break; + } default: - { - SLANG_ASSERT(!"Only support R32_FLOAT/R8G8B8A8_UNORM formats for now"); - return SLANG_FAIL; - } + { + SLANG_ASSERT(!"Only support R32_FLOAT/R8G8B8A8_UNORM formats for now"); + return SLANG_FAIL; + } } if (desc.numMipLevels > 1) @@ -468,7 +456,8 @@ SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createTextureResource( SLANG_CUDA_RETURN_ON_FAIL(cuArray3DCreate(&tex->m_cudaArray, &arrayDesc)); } - else if (desc.type == IResource::Type::Texture3D || + else if ( + desc.type == IResource::Type::Texture3D || desc.type == IResource::Type::TextureCube) { CUDA_ARRAY3D_DESCRIPTOR arrayDesc; @@ -574,8 +563,7 @@ SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createTextureResource( { const auto srcData = initData[mipLevel + j * desc.numMipLevels].data; // Copy over to the workspace to make contiguous - ::memcpy( - workspace.begin() + faceSizeInBytes * j, srcData, faceSizeInBytes); + ::memcpy(workspace.begin() + faceSizeInBytes * j, srcData, faceSizeInBytes); } srcDataPtr = workspace.getBuffer(); @@ -590,8 +578,7 @@ SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createTextureResource( // Copy the data over to make contiguous for (Index j = 0; j < 6; j++) { - const auto srcData = - initData[mipLevel + j * desc.numMipLevels].data; + const auto srcData = initData[mipLevel + j * desc.numMipLevels].data; ::memcpy( workspace.getBuffer() + faceSizeInBytes * j, srcData, @@ -640,44 +627,44 @@ SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createTextureResource( { case IResource::Type::Texture1D: case IResource::Type::Texture2D: - { - CUDA_MEMCPY2D copyParam; - memset(©Param, 0, sizeof(copyParam)); - copyParam.dstMemoryType = CU_MEMORYTYPE_ARRAY; - copyParam.dstArray = dstArray; - copyParam.srcMemoryType = CU_MEMORYTYPE_HOST; - copyParam.srcHost = srcDataPtr; - copyParam.srcPitch = mipWidth * elementSize; - copyParam.WidthInBytes = copyParam.srcPitch; - copyParam.Height = mipHeight; - SLANG_CUDA_RETURN_ON_FAIL(cuMemcpy2D(©Param)); - break; - } + { + CUDA_MEMCPY2D copyParam; + memset(©Param, 0, sizeof(copyParam)); + copyParam.dstMemoryType = CU_MEMORYTYPE_ARRAY; + copyParam.dstArray = dstArray; + copyParam.srcMemoryType = CU_MEMORYTYPE_HOST; + copyParam.srcHost = srcDataPtr; + copyParam.srcPitch = mipWidth * elementSize; + copyParam.WidthInBytes = copyParam.srcPitch; + copyParam.Height = mipHeight; + SLANG_CUDA_RETURN_ON_FAIL(cuMemcpy2D(©Param)); + break; + } case IResource::Type::Texture3D: case IResource::Type::TextureCube: - { - CUDA_MEMCPY3D copyParam; - memset(©Param, 0, sizeof(copyParam)); + { + CUDA_MEMCPY3D copyParam; + memset(©Param, 0, sizeof(copyParam)); - copyParam.dstMemoryType = CU_MEMORYTYPE_ARRAY; - copyParam.dstArray = dstArray; + copyParam.dstMemoryType = CU_MEMORYTYPE_ARRAY; + copyParam.dstArray = dstArray; - copyParam.srcMemoryType = CU_MEMORYTYPE_HOST; - copyParam.srcHost = srcDataPtr; - copyParam.srcPitch = mipWidth * elementSize; - copyParam.WidthInBytes = copyParam.srcPitch; - copyParam.Height = mipHeight; - copyParam.Depth = mipDepth; + copyParam.srcMemoryType = CU_MEMORYTYPE_HOST; + copyParam.srcHost = srcDataPtr; + copyParam.srcPitch = mipWidth * elementSize; + copyParam.WidthInBytes = copyParam.srcPitch; + copyParam.Height = mipHeight; + copyParam.Depth = mipDepth; - SLANG_CUDA_RETURN_ON_FAIL(cuMemcpy3D(©Param)); - break; - } + SLANG_CUDA_RETURN_ON_FAIL(cuMemcpy3D(©Param)); + break; + } default: - { - SLANG_ASSERT(!"Not implemented"); - break; - } + { + SLANG_ASSERT(!"Not implemented"); + break; + } } } } @@ -749,10 +736,8 @@ SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createBufferResource( CU_MEM_ATTACH_GLOBAL)); if (initData) { - SLANG_CUDA_RETURN_ON_FAIL(cuMemcpy( - (CUdeviceptr)resource->m_cudaMemory, - (CUdeviceptr)initData, - desc.sizeInBytes)); + SLANG_CUDA_RETURN_ON_FAIL( + cuMemcpy((CUdeviceptr)resource->m_cudaMemory, (CUdeviceptr)initData, desc.sizeInBytes)); } returnComPtr(outResource, resource); return SLANG_OK; @@ -786,8 +771,7 @@ SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createBufferFromSharedHandle( case InteropHandleAPI::Vulkan: externalMemoryHandleDesc.type = CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32; break; - default: - return SLANG_FAIL; + default: return SLANG_FAIL; } externalMemoryHandleDesc.handle.win32.handle = (void*)handle.handleValue; externalMemoryHandleDesc.size = desc.sizeInBytes; @@ -813,7 +797,8 @@ SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createBufferFromSharedHandle( // Finally, we can "map" the buffer to get a device address. void* deviceAddress; - SLANG_CUDA_RETURN_ON_FAIL(cuExternalMemoryGetMappedBuffer((CUdeviceptr*)&deviceAddress, externalMemory, &bufferDesc)); + SLANG_CUDA_RETURN_ON_FAIL( + cuExternalMemoryGetMappedBuffer((CUdeviceptr*)&deviceAddress, externalMemory, &bufferDesc)); resource->m_cudaMemory = deviceAddress; returnComPtr(outResource, resource); @@ -849,8 +834,7 @@ SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createTextureFromSharedHandle( case InteropHandleAPI::Vulkan: externalMemoryHandleDesc.type = CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32; break; - default: - return SLANG_FAIL; + default: return SLANG_FAIL; } externalMemoryHandleDesc.handle.win32.handle = (void*)handle.handleValue; externalMemoryHandleDesc.size = size; @@ -877,7 +861,8 @@ SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createTextureFromSharedHandle( externalMemoryMipDesc.numLevels = desc.numMipLevels; CUmipmappedArray mipArray; - SLANG_CUDA_RETURN_ON_FAIL(cuExternalMemoryGetMappedMipmappedArray(&mipArray, externalMemory, &externalMemoryMipDesc)); + SLANG_CUDA_RETURN_ON_FAIL( + cuExternalMemoryGetMappedMipmappedArray(&mipArray, externalMemory, &externalMemoryMipDesc)); resource->m_cudaMipMappedArray = mipArray; CUarray cuArray; @@ -898,7 +883,9 @@ SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createTextureFromSharedHandle( } SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createTextureView( - ITextureResource* texture, IResourceView::Desc const& desc, IResourceView** outView) + ITextureResource* texture, + IResourceView::Desc const& desc, + IResourceView** outView) { RefPtr view = new ResourceViewImpl(); view->m_desc = desc; @@ -920,9 +907,8 @@ SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createBufferView( return SLANG_OK; } -SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createQueryPool( - const IQueryPool::Desc& desc, - IQueryPool** outPool) +SLANG_NO_THROW Result SLANG_MCALL +DeviceImpl::createQueryPool(const IQueryPool::Desc& desc, IQueryPool** outPool) { RefPtr pool = new QueryPoolImpl(); SLANG_RETURN_ON_FAIL(pool->init(desc)); @@ -941,9 +927,7 @@ Result DeviceImpl::createShaderObjectLayout( return SLANG_OK; } -Result DeviceImpl::createShaderObject( - ShaderObjectLayoutBase* layout, - IShaderObject** outObject) +Result DeviceImpl::createShaderObject(ShaderObjectLayoutBase* layout, IShaderObject** outObject) { RefPtr result = new ShaderObjectImpl(); SLANG_RETURN_ON_FAIL(result->init(this, dynamic_cast(layout))); @@ -985,15 +969,20 @@ SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createProgram( cudaProgram->cudaContext = m_context; if (desc.slangGlobalScope->getSpecializationParamCount() != 0) { - cudaProgram->layout = new RootShaderObjectLayoutImpl(this, desc.slangGlobalScope->getLayout()); + cudaProgram->layout = + new RootShaderObjectLayoutImpl(this, desc.slangGlobalScope->getLayout()); returnComPtr(outProgram, cudaProgram); return SLANG_OK; } ComPtr kernelCode; ComPtr diagnostics; - auto compileResult = getEntryPointCodeFromShaderCache(desc.slangGlobalScope, - (SlangInt)0, 0, kernelCode.writeRef(), diagnostics.writeRef()); + auto compileResult = getEntryPointCodeFromShaderCache( + desc.slangGlobalScope, + (SlangInt)0, + 0, + kernelCode.writeRef(), + diagnostics.writeRef()); if (diagnostics) { getDebugCallback()->handleMessage( @@ -1005,10 +994,14 @@ SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createProgram( } SLANG_RETURN_ON_FAIL(compileResult); - SLANG_CUDA_RETURN_ON_FAIL(cuModuleLoadData(&cudaProgram->cudaModule, kernelCode->getBufferPointer())); - cudaProgram->kernelName = desc.slangGlobalScope->getLayout()->getEntryPointByIndex(0)->getName(); + SLANG_CUDA_RETURN_ON_FAIL( + cuModuleLoadData(&cudaProgram->cudaModule, kernelCode->getBufferPointer())); + cudaProgram->kernelName = + desc.slangGlobalScope->getLayout()->getEntryPointByIndex(0)->getName(); SLANG_CUDA_RETURN_ON_FAIL(cuModuleGetFunction( - &cudaProgram->cudaKernel, cudaProgram->cudaModule, cudaProgram->kernelName.getBuffer())); + &cudaProgram->cudaKernel, + cudaProgram->cudaModule, + cudaProgram->kernelName.getBuffer())); auto slangGlobalScope = desc.slangGlobalScope; if (slangGlobalScope) @@ -1030,7 +1023,8 @@ SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createProgram( } SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createComputePipelineState( - const ComputePipelineStateDesc& desc, IPipelineState** outState) + const ComputePipelineStateDesc& desc, + IPipelineState** outState) { RefPtr state = new ComputePipelineStateImpl(); state->shaderProgram = static_cast(desc.program); @@ -1065,7 +1059,7 @@ SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createTransientResourceHeap( } SLANG_NO_THROW Result SLANG_MCALL - DeviceImpl::createCommandQueue(const ICommandQueue::Desc& desc, ICommandQueue** outQueue) +DeviceImpl::createCommandQueue(const ICommandQueue::Desc& desc, ICommandQueue** outQueue) { RefPtr queue = new CommandQueueImpl(); queue->init(this); @@ -1074,7 +1068,9 @@ SLANG_NO_THROW Result SLANG_MCALL } SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createSwapchain( - const ISwapchain::Desc& desc, WindowHandle window, ISwapchain** outSwapchain) + const ISwapchain::Desc& desc, + WindowHandle window, + ISwapchain** outSwapchain) { SLANG_UNUSED(desc); SLANG_UNUSED(window); @@ -1083,7 +1079,8 @@ SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createSwapchain( } SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createFramebufferLayout( - const IFramebufferLayout::Desc& desc, IFramebufferLayout** outLayout) + const IFramebufferLayout::Desc& desc, + IFramebufferLayout** outLayout) { SLANG_UNUSED(desc); SLANG_UNUSED(outLayout); @@ -1091,7 +1088,7 @@ SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createFramebufferLayout( } SLANG_NO_THROW Result SLANG_MCALL - DeviceImpl::createFramebuffer(const IFramebuffer::Desc& desc, IFramebuffer** outFramebuffer) +DeviceImpl::createFramebuffer(const IFramebuffer::Desc& desc, IFramebuffer** outFramebuffer) { SLANG_UNUSED(desc); SLANG_UNUSED(outFramebuffer); @@ -1108,16 +1105,15 @@ SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createRenderPassLayout( } SLANG_NO_THROW Result SLANG_MCALL - DeviceImpl::createSamplerState(ISamplerState::Desc const& desc, ISamplerState** outSampler) +DeviceImpl::createSamplerState(ISamplerState::Desc const& desc, ISamplerState** outSampler) { SLANG_UNUSED(desc); *outSampler = nullptr; return SLANG_OK; } -SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createInputLayout( - IInputLayout::Desc const& desc, - IInputLayout** outLayout) +SLANG_NO_THROW Result SLANG_MCALL +DeviceImpl::createInputLayout(IInputLayout::Desc const& desc, IInputLayout** outLayout) { SLANG_UNUSED(desc); SLANG_UNUSED(outLayout); @@ -1125,7 +1121,8 @@ SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createInputLayout( } SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createGraphicsPipelineState( - const GraphicsPipelineStateDesc& desc, IPipelineState** outState) + const GraphicsPipelineStateDesc& desc, + IPipelineState** outState) { SLANG_UNUSED(desc); SLANG_UNUSED(outState); -- cgit v1.2.3