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-command-encoder.cpp | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'tools/gfx/cuda/cuda-command-encoder.cpp') diff --git a/tools/gfx/cuda/cuda-command-encoder.cpp b/tools/gfx/cuda/cuda-command-encoder.cpp index d94b40e21..1f4afcc5c 100644 --- a/tools/gfx/cuda/cuda-command-encoder.cpp +++ b/tools/gfx/cuda/cuda-command-encoder.cpp @@ -13,7 +13,7 @@ namespace cuda { void ResourceCommandEncoderImpl::init(CommandBufferImpl* cmdBuffer) -{ +{ m_writer = cmdBuffer; } @@ -28,13 +28,16 @@ SLANG_NO_THROW void SLANG_MCALL ResourceCommandEncoderImpl::copyBuffer( } SLANG_NO_THROW void SLANG_MCALL ResourceCommandEncoderImpl::uploadBufferData( - IBufferResource* dst, Offset offset, Size size, void* data) + IBufferResource* dst, + Offset offset, + Size size, + void* data) { m_writer->uploadBufferData(dst, offset, size, data); } SLANG_NO_THROW void SLANG_MCALL - ResourceCommandEncoderImpl::writeTimestamp(IQueryPool* pool, GfxIndex index) +ResourceCommandEncoderImpl::writeTimestamp(IQueryPool* pool, GfxIndex index) { m_writer->writeTimestamp(pool, index); } @@ -159,7 +162,7 @@ SLANG_NO_THROW void SLANG_MCALL ResourceCommandEncoderImpl::textureSubresourceBa } SLANG_NO_THROW void SLANG_MCALL - ResourceCommandEncoderImpl::beginDebugEvent(const char* name, float rgbColor[3]) +ResourceCommandEncoderImpl::beginDebugEvent(const char* name, float rgbColor[3]) { SLANG_UNUSED(name); SLANG_UNUSED(rgbColor); @@ -172,23 +175,26 @@ void ComputeCommandEncoderImpl::init(CommandBufferImpl* cmdBuffer) } SLANG_NO_THROW Result SLANG_MCALL - ComputeCommandEncoderImpl::bindPipeline(IPipelineState* state, IShaderObject** outRootObject) +ComputeCommandEncoderImpl::bindPipeline(IPipelineState* state, IShaderObject** outRootObject) { m_writer->setPipelineState(state); PipelineStateBase* pipelineImpl = static_cast(state); SLANG_RETURN_ON_FAIL(m_commandBuffer->m_device->createRootShaderObject( - pipelineImpl->m_program, m_rootObject.writeRef())); + pipelineImpl->m_program, + m_rootObject.writeRef())); returnComPtr(outRootObject, m_rootObject); return SLANG_OK; } -SLANG_NO_THROW Result SLANG_MCALL - ComputeCommandEncoderImpl::bindPipelineWithRootObject(IPipelineState* state, IShaderObject* rootObject) +SLANG_NO_THROW Result SLANG_MCALL ComputeCommandEncoderImpl::bindPipelineWithRootObject( + IPipelineState* state, + IShaderObject* rootObject) { m_writer->setPipelineState(state); PipelineStateBase* pipelineImpl = static_cast(state); SLANG_RETURN_ON_FAIL(m_commandBuffer->m_device->createRootShaderObject( - pipelineImpl->m_program, m_rootObject.writeRef())); + pipelineImpl->m_program, + m_rootObject.writeRef())); m_rootObject->copyFrom(rootObject, m_commandBuffer->m_transientHeap); return SLANG_OK; } @@ -201,7 +207,7 @@ SLANG_NO_THROW Result SLANG_MCALL ComputeCommandEncoderImpl::dispatchCompute(int } SLANG_NO_THROW Result SLANG_MCALL - ComputeCommandEncoderImpl::dispatchComputeIndirect(IBufferResource* argBuffer, Offset offset) +ComputeCommandEncoderImpl::dispatchComputeIndirect(IBufferResource* argBuffer, Offset offset) { SLANG_UNIMPLEMENTED_X("dispatchComputeIndirect"); } -- cgit v1.2.3