Skip to content

Commit 86d9f20

Browse files
committed
play with offsets & allow for null indirect invocation in case of missing content (allocation/suballocation failed) - bind mdi buffer with 0u offset and operate on indirect structure offsets (second attempt) to access vertex & index buffers, update suballocation strategy. TODO: lower big chunk request allocation size on fail + eliminate runtime artifacts
1 parent 3b61167 commit 86d9f20

File tree

2 files changed

+164
-154
lines changed

2 files changed

+164
-154
lines changed

include/nbl/ext/ImGui/ImGui.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,6 @@ class UI final : public core::IReferenceCounted
2929
//! traits for MDI buffer suballocator - fills the data given the mdi allocator memory request
3030
using suballocator_traits_t = core::address_allocator_traits<core::LinearAddressAllocatorST<uint32_t>>;
3131

32-
enum class Content : uint16_t
33-
{
34-
INDIRECT_STRUCTURES,
35-
ELEMENT_STRUCTURES,
36-
INDEX_BUFFERS,
37-
VERTEX_BUFFERS,
38-
39-
COUNT,
40-
};
41-
4232
//! streaming mdi buffer
4333
core::smart_refctd_ptr<typename compose_t> compose;
4434

@@ -140,7 +130,7 @@ class UI final : public core::IReferenceCounted
140130
bool update(const SUpdateParameters& params);
141131

142132
//! updates mapped mdi buffer & records *gpu* draw command, you are required to bind UI's graphics pipeline & descriptor sets before calling this function - use getPipeline() to get the pipeline & getCreationParameters() to get info about your set resources
143-
bool render(video::IGPUCommandBuffer* const commandBuffer, video::ISemaphore::SWaitInfo waitInfo, const std::span<const VkRect2D> scissors = {});
133+
bool render(video::IGPUCommandBuffer* const commandBuffer, video::ISemaphore::SWaitInfo waitInfo, const std::chrono::steady_clock::time_point waitPoint = std::chrono::steady_clock::now() + std::chrono::milliseconds(1u), const std::span<const VkRect2D> scissors = {});
144134

145135
//! registers lambda listener in which ImGUI calls should be recorded, use the returned id to unregister the listener
146136
size_t registerListener(std::function<void()> const& listener);

0 commit comments

Comments
 (0)