Skip to content

Commit 5813d10

Browse files
author
devsh
committed
finish const correctness of Descriptor Set Layouts in Pipelines
1 parent 657d116 commit 5813d10

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

include/nbl/video/ILogicalDevice.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -837,8 +837,8 @@ class NBL_API2 ILogicalDevice : public core::IReferenceCounted, public IDeviceMe
837837
// Create a pipeline layout (@see ICPUPipelineLayout)
838838
core::smart_refctd_ptr<IGPUPipelineLayout> createPipelineLayout(
839839
const std::span<const asset::SPushConstantRange> pcRanges={},
840-
core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& _layout0=nullptr, core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& _layout1=nullptr,
841-
core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& _layout2=nullptr, core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& _layout3=nullptr
840+
core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& _layout0=nullptr, core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& _layout1=nullptr,
841+
core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& _layout2=nullptr, core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& _layout3=nullptr
842842
)
843843
{
844844
if ((_layout0 && !_layout0->wasCreatedBy(this)))
@@ -1217,8 +1217,8 @@ class NBL_API2 ILogicalDevice : public core::IReferenceCounted, public IDeviceMe
12171217
virtual core::smart_refctd_ptr<IGPUDescriptorSetLayout> createDescriptorSetLayout_impl(const std::span<const IGPUDescriptorSetLayout::SBinding> bindings, const uint32_t maxSamplersCount) = 0;
12181218
virtual core::smart_refctd_ptr<IGPUPipelineLayout> createPipelineLayout_impl(
12191219
const std::span<const asset::SPushConstantRange> pcRanges,
1220-
core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& _layout0, core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& _layout1,
1221-
core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& _layout2, core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& _layout3
1220+
core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& _layout0, core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& _layout1,
1221+
core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& _layout2, core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& _layout3
12221222
) = 0;
12231223

12241224
virtual core::smart_refctd_ptr<IDescriptorPool> createDescriptorPool_impl(const IDescriptorPool::SCreateInfo& createInfo) = 0;

src/nbl/video/CVulkanLogicalDevice.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -597,13 +597,13 @@ core::smart_refctd_ptr<IGPUDescriptorSetLayout> CVulkanLogicalDevice::createDesc
597597

598598
core::smart_refctd_ptr<IGPUPipelineLayout> CVulkanLogicalDevice::createPipelineLayout_impl(
599599
const std::span<const asset::SPushConstantRange> pcRanges,
600-
core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& layout0,
601-
core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& layout1,
602-
core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& layout2,
603-
core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& layout3
600+
core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& layout0,
601+
core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& layout1,
602+
core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& layout2,
603+
core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& layout3
604604
)
605605
{
606-
const core::smart_refctd_ptr<IGPUDescriptorSetLayout> tmp[] = { layout0, layout1, layout2, layout3 };
606+
const core::smart_refctd_ptr<const IGPUDescriptorSetLayout> tmp[] = { layout0, layout1, layout2, layout3 };
607607

608608
VkDescriptorSetLayout vk_dsLayouts[asset::ICPUPipelineLayout::DESCRIPTOR_SET_COUNT];
609609
uint32_t nonNullSetLayoutCount = ~0u;

src/nbl/video/CVulkanLogicalDevice.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ class CVulkanLogicalDevice final : public ILogicalDevice
272272
core::smart_refctd_ptr<IGPUDescriptorSetLayout> createDescriptorSetLayout_impl(const std::span<const IGPUDescriptorSetLayout::SBinding> bindings, const uint32_t maxSamplersCount) override;
273273
core::smart_refctd_ptr<IGPUPipelineLayout> createPipelineLayout_impl(
274274
const std::span<const asset::SPushConstantRange> pcRanges,
275-
core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& _layout0, core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& _layout1,
276-
core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& _layout2, core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& _layout3
275+
core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& _layout0, core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& _layout1,
276+
core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& _layout2, core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& _layout3
277277
) override;
278278

279279
// descriptor sets

src/nbl/video/CVulkanPipelineLayout.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ class CVulkanPipelineLayout : public IGPUPipelineLayout
1515
public:
1616
CVulkanPipelineLayout(
1717
const ILogicalDevice* dev, const std::span<const asset::SPushConstantRange> _pcRanges,
18-
core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& _layout0, core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& _layout1,
19-
core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& _layout2, core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& _layout3,
18+
core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& _layout0, core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& _layout1,
19+
core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& _layout2, core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& _layout3,
2020
const VkPipelineLayout vk_layout
2121
) : IGPUPipelineLayout(
2222
core::smart_refctd_ptr<const ILogicalDevice>(dev),

0 commit comments

Comments
 (0)