Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
skallweitNV committed Aug 31, 2024
1 parent aa5824a commit c9fa70f
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions include/slang-rhi.h
Original file line number Diff line number Diff line change
Expand Up @@ -2247,9 +2247,9 @@ class IDevice : public ISlangUnknown
const SubresourceData* initData = nullptr
)
{
ComPtr<ITexture> resource;
SLANG_RETURN_NULL_ON_FAIL(createTexture(desc, initData, resource.writeRef()));
return resource;
ComPtr<ITexture> texture;
SLANG_RETURN_NULL_ON_FAIL(createTexture(desc, initData, texture.writeRef()));
return texture;
}

virtual SLANG_NO_THROW Result SLANG_MCALL
Expand All @@ -2268,9 +2268,9 @@ class IDevice : public ISlangUnknown

inline SLANG_NO_THROW ComPtr<IBuffer> createBuffer(const BufferDesc& desc, const void* initData = nullptr)
{
ComPtr<IBuffer> resource;
SLANG_RETURN_NULL_ON_FAIL(createBuffer(desc, initData, resource.writeRef()));
return resource;
ComPtr<IBuffer> buffer;
SLANG_RETURN_NULL_ON_FAIL(createBuffer(desc, initData, buffer.writeRef()));
return buffer;
}

virtual SLANG_NO_THROW Result SLANG_MCALL
Expand Down Expand Up @@ -2451,19 +2451,19 @@ class IDevice : public ISlangUnknown

inline ComPtr<IPipeline> createRenderPipeline(const RenderPipelineDesc& desc)
{
ComPtr<IPipeline> state;
SLANG_RETURN_NULL_ON_FAIL(createRenderPipeline(desc, state.writeRef()));
return state;
ComPtr<IPipeline> pipeline;
SLANG_RETURN_NULL_ON_FAIL(createRenderPipeline(desc, pipeline.writeRef()));
return pipeline;
}

virtual SLANG_NO_THROW Result SLANG_MCALL
createComputePipeline(const ComputePipelineDesc& desc, IPipeline** outPipeline) = 0;

inline ComPtr<IPipeline> createComputePipeline(const ComputePipelineDesc& desc)
{
ComPtr<IPipeline> state;
SLANG_RETURN_NULL_ON_FAIL(createComputePipeline(desc, state.writeRef()));
return state;
ComPtr<IPipeline> pipeline;
SLANG_RETURN_NULL_ON_FAIL(createComputePipeline(desc, pipeline.writeRef()));
return pipeline;
}

virtual SLANG_NO_THROW Result SLANG_MCALL
Expand Down

0 comments on commit c9fa70f

Please sign in to comment.