Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions framework/decode/common_handle_mapping_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,6 @@ static typename T::HandleType* MapHandleArray(HandlePointerDecoder<typename T::H
if (info != nullptr)
{
handles[i] = info->handle;

if constexpr (has_handle_future_v<T>)
{
if (info->handle == VK_NULL_HANDLE && info->future.valid())
{
const auto& [result, async_handles] = info->future.get();
handles[i] = async_handles[info->future_handle_index];
}
}
}
else
{
Expand Down
18 changes: 16 additions & 2 deletions framework/decode/vulkan_object_info_table_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "decode/vulkan_object_info.h"
#include "format/format.h"
#include "util/defines.h"
#include "util/logging.h"

#include "vulkan/vulkan.h"

Expand Down Expand Up @@ -62,8 +63,21 @@ static inline void sync_handle(T* object)
static_assert(has_handle_future_v<T>);
if (object != nullptr && object->handle == VK_NULL_HANDLE && object->future.valid())
{
const auto& [result, async_handles] = object->future.get();
object->handle = async_handles[object->future_handle_index];
try
{
const auto& [result, async_handles] = object->future.get();
GFXRECON_ASSERT(object->future_handle_index < async_handles.size());
object->handle = async_handles[object->future_handle_index];
}
catch (const std::exception& e)
{
// Catch std::exception to prevent worker-thread exceptions from escaping silently
// or causing undefined behavior during subsequent replay.
GFXRECON_LOG_FATAL("Future error while synchronizing handle: %s", e.what());
}

// Release shared state and prevent redundant future.get() synchronization on subsequent lookups.
object->future = {};
}
}

Expand Down
Loading
Loading