Skip to content

Commit ab81b81

Browse files
committed
Apply fixes with new image & buffer creation APIs
1 parent 49affd5 commit ab81b81

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

include/nbl/video/utilities/CDrawIndirectAllocator.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class NBL_API CDrawIndirectAllocator final : public IDrawIndirectAllocator
4141
explicit_params.drawCommandBuffer.size = core::roundUp<size_t>(params.drawCommandCapacity*params.maxDrawCommandStride+params.maxDrawCommandStride,limits.minSSBOAlignment);
4242

4343
creationParams.size = explicit_params.drawCommandBuffer.size;
44-
explicit_params.drawCommandBuffer.buffer = params.device->createBuffer(creationParams);
44+
explicit_params.drawCommandBuffer.buffer = params.device->createBuffer(std::move(creationParams));
4545
auto mreqsDrawCmdBuf = explicit_params.drawCommandBuffer.buffer->getMemoryReqs();
4646
mreqsDrawCmdBuf.memoryTypeBits &= params.device->getPhysicalDevice()->getDeviceLocalMemoryTypeBits();
4747
auto gpubufMem = params.device->allocate(mreqsDrawCmdBuf, explicit_params.drawCommandBuffer.buffer.get());
@@ -51,7 +51,7 @@ class NBL_API CDrawIndirectAllocator final : public IDrawIndirectAllocator
5151
if (explicit_params.drawCountBuffer.size)
5252
{
5353
creationParams.size = explicit_params.drawCountBuffer.size;
54-
explicit_params.drawCountBuffer.buffer = params.device->createBuffer(creationParams);
54+
explicit_params.drawCountBuffer.buffer = params.device->createBuffer(std::move(creationParams));
5555
auto mreqsDrawCountBuf = explicit_params.drawCountBuffer.buffer->getMemoryReqs();
5656
mreqsDrawCountBuf.memoryTypeBits &= params.device->getPhysicalDevice()->getDeviceLocalMemoryTypeBits();
5757
auto gpubufMem = params.device->allocate(mreqsDrawCountBuf, explicit_params.drawCountBuffer.buffer.get());

src/nbl/ext/DebugDraw/CDraw3DLine.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,10 @@ void CDraw3DLine::updateVertexBuffer(IUtilities* utilities, IGPUQueue* queue, co
8989
IGPUBuffer::SCreationParams creationParams;
9090
creationParams.size = minimalBuffSize;
9191
creationParams.usage = static_cast<asset::IBuffer::E_USAGE_FLAGS>(asset::IBuffer::EUF_VERTEX_BUFFER_BIT | asset::IBuffer::EUF_TRANSFER_DST_BIT);
92-
creationParams.sharingMode = asset::E_SHARING_MODE::ESM_EXCLUSIVE;
9392
creationParams.queueFamilyIndices = 0u;
9493
creationParams.queueFamilyIndices = nullptr;
9594

96-
m_linesBuffer = m_device->createBuffer(creationParams);
95+
m_linesBuffer = m_device->createBuffer(std::move(creationParams));
9796
auto mreqs = m_linesBuffer->getMemoryReqs();
9897
mreqs.memoryTypeBits &= m_device->getPhysicalDevice()->getDeviceLocalMemoryTypeBits();
9998
auto linesMem = m_device->allocate(mreqs, m_linesBuffer.get());

0 commit comments

Comments
 (0)