Skip to content

Commit 1913ae7

Browse files
author
devsh
committed
daily reminder to self to stop programming after 1 am
1 parent aaac792 commit 1913ae7

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

examples_tests

src/nbl/ext/ImGui/ImGui.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,8 +1301,8 @@ bool UI::render(IGPUCommandBuffer* const commandBuffer, ISemaphore::SWaitInfo wa
13011301
memcpy(streamingPtr+geo.indexByteOffset,list->IdxBuffer.Data,list->IdxBuffer.size_in_bytes());
13021302
memcpy(streamingPtr+geo.vertexByteOffset,list->VtxBuffer.Data,list->VtxBuffer.size_in_bytes());
13031303
// not writing past the end
1304-
assert(streamingPtr+geo.indexByteOffset<endByte);
1305-
assert(streamingPtr+geo.vertexByteOffset<endByte);
1304+
assert(streamingPtr+geo.indexByteOffset+list->IdxBuffer.size_in_bytes()<=endByte);
1305+
assert(streamingPtr+geo.vertexByteOffset+list->VtxBuffer.size_in_bytes()<=endByte);
13061306
}
13071307
}
13081308
// the offets were enough and allocation should not overlap
@@ -1334,7 +1334,7 @@ bool UI::render(IGPUCommandBuffer* const commandBuffer, ISemaphore::SWaitInfo wa
13341334
{
13351335
auto mdiBinding = binding;
13361336
mdiBinding.offset = offsets.drawIndirectByteOffset;
1337-
commandBuffer->drawIndexedIndirect(binding,drawID,sizeof(VkDrawIndexedIndirectCommand));
1337+
commandBuffer->drawIndexedIndirect(mdiBinding,drawID,sizeof(VkDrawIndexedIndirectCommand));
13381338
}
13391339
}
13401340

@@ -1349,6 +1349,7 @@ bool UI::render(IGPUCommandBuffer* const commandBuffer, ISemaphore::SWaitInfo wa
13491349
// trim the leftover actually used block
13501350
metaAlloc.memBlockSize = offsets.totalSize;
13511351
}
1352+
13521353
// latch our used chunk free
13531354
streaming->multi_deallocate(1,&metaAlloc.memBlockOffset,&metaAlloc.memBlockSize,waitInfo);
13541355
// reset to initial state

0 commit comments

Comments
 (0)