Skip to content

Commit 6bd2303

Browse files
committed
Changed CommandPool* to smartpointer&&
1 parent 92a0615 commit 6bd2303

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

include/nbl/video/IGPUCommandBuffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class IGPUCommandBuffer :
170170
protected:
171171
friend class IGPUQueue;
172172

173-
IGPUCommandBuffer(core::smart_refctd_ptr<const ILogicalDevice>&& dev, E_LEVEL lvl, IGPUCommandPool* _cmdpool) : base_t(lvl), IBackendObject(std::move(dev)), m_cmdpool(_cmdpool)
173+
IGPUCommandBuffer(core::smart_refctd_ptr<const ILogicalDevice>&& dev, E_LEVEL lvl, core::smart_refctd_ptr<IGPUCommandPool>&& _cmdpool) : base_t(lvl), IBackendObject(std::move(dev)), m_cmdpool(_cmdpool)
174174
{
175175
}
176176
virtual ~IGPUCommandBuffer() = default;

src/nbl/video/COpenGLCommandBuffer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
namespace nbl::video
99
{
1010

11-
COpenGLCommandBuffer::COpenGLCommandBuffer(core::smart_refctd_ptr<const ILogicalDevice>&& dev, E_LEVEL lvl, IGPUCommandPool* _cmdpool, system::logger_opt_smart_ptr&& logger, const COpenGLFeatureMap* _features)
12-
: IGPUCommandBuffer(std::move(dev), lvl, _cmdpool), m_logger(std::move(logger)), m_features(_features)
11+
COpenGLCommandBuffer::COpenGLCommandBuffer(core::smart_refctd_ptr<const ILogicalDevice>&& dev, E_LEVEL lvl, core::smart_refctd_ptr<IGPUCommandPool>&& _cmdpool, system::logger_opt_smart_ptr&& logger, const COpenGLFeatureMap* _features)
12+
: IGPUCommandBuffer(std::move(dev), lvl, std::move(_cmdpool)), m_logger(std::move(logger)), m_features(_features)
1313
{
1414
}
1515

src/nbl/video/COpenGLCommandBuffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ class COpenGLCommandBuffer final : public IGPUCommandBuffer
553553
void executeAll(IOpenGL_FunctionTable* gl, SOpenGLContextLocalCache* ctxlocal, uint32_t ctxid) const;
554554

555555

556-
COpenGLCommandBuffer(core::smart_refctd_ptr<const ILogicalDevice>&& dev, E_LEVEL lvl, IGPUCommandPool* _cmdpool, system::logger_opt_smart_ptr&& logger, const COpenGLFeatureMap* _features);
556+
COpenGLCommandBuffer(core::smart_refctd_ptr<const ILogicalDevice>&& dev, E_LEVEL lvl, core::smart_refctd_ptr<IGPUCommandPool>&& _cmdpool, system::logger_opt_smart_ptr&& logger, const COpenGLFeatureMap* _features);
557557

558558
inline bool begin(uint32_t _flags) override final
559559
{

src/nbl/video/COpenGL_LogicalDevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ class COpenGL_LogicalDevice : public IOpenGL_LogicalDevice
549549
for (uint32_t i = 0u; i < _count; ++i)
550550
_output[i] = core::make_smart_refctd_ptr<COpenGLCommandBuffer>(
551551
core::smart_refctd_ptr<IOpenGL_LogicalDevice>(this),
552-
_level, _cmdPool,
552+
_level, core::smart_refctd_ptr<IGPUCommandPool>(_cmdPool),
553553
core::smart_refctd_ptr<system::ILogger>(getLogger().get()),
554554
m_glfeatures
555555
);

src/nbl/video/CVulkanCommandBuffer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ class CVulkanCommandBuffer : public IGPUCommandBuffer
2323
{
2424
public:
2525
CVulkanCommandBuffer(core::smart_refctd_ptr<ILogicalDevice>&& logicalDevice, E_LEVEL level,
26-
VkCommandBuffer _vkcmdbuf, IGPUCommandPool* commandPool)
27-
: IGPUCommandBuffer(std::move(logicalDevice), level, commandPool), m_cmdbuf(_vkcmdbuf)
26+
VkCommandBuffer _vkcmdbuf, core::smart_refctd_ptr<IGPUCommandPool>&& commandPool)
27+
: IGPUCommandBuffer(std::move(logicalDevice), level, std::move(commandPool)), m_cmdbuf(_vkcmdbuf)
2828
{
2929
if (m_cmdpool->getAPIType() == EAT_VULKAN)
3030
{

src/nbl/video/CVulkanLogicalDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ bool CVulkanLogicalDevice::createCommandBuffers_impl(IGPUCommandPool* cmdPool, I
318318
{
319319
outCmdBufs[i] = core::make_smart_refctd_ptr<CVulkanCommandBuffer>(
320320
core::smart_refctd_ptr<ILogicalDevice>(this), level, vk_commandBuffers[i],
321-
cmdPool);
321+
core::smart_refctd_ptr<IGPUCommandPool>(cmdPool));
322322
}
323323

324324
return true;

0 commit comments

Comments
 (0)