Skip to content

Commit

Permalink
clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
panos-lunarg committed Sep 12, 2024
1 parent 813bcf8 commit 46ede91
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 43 deletions.
2 changes: 1 addition & 1 deletion framework/decode/asset_file_consumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void AssetFileConsumer::Process_vkAllocateDescriptorSets(
const format::HandleId desc_id = pDescriptorSets->GetPointer()[0];

format::FrameAssetFileOffsets& frame_offsets = asset_file_offsets_[current_frame_];
asset_file_offsets_[current_frame_][desc_id] = block_header_file_offset_;
asset_file_offsets_[current_frame_][desc_id] = block_header_file_offset_;
// fprintf(debug_, "%" PRIu64 " -> %" PRId64 "\n", desc_id, block_header_file_offset_);
// fsync(fileno(debug_));

Expand Down
16 changes: 8 additions & 8 deletions framework/decode/asset_file_consumer.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ class AssetFileConsumer : public VulkanConsumer
public:
AssetFileConsumer() : current_frame_(0), greatest_id_(0)
{
// #if defined(VK_USE_PLATFORM_ANDROID_KHR)
// if (util::platform::FileOpen(&debug_, "/storage/emulated/0/Download/AssetFileConsumer2.txt", "a"))
// #else
// if (util::platform::FileOpen(&debug_, "AssetFileConsumer.txt", "a"))
// #endif
// {
// assert(0);
// }
// #if defined(VK_USE_PLATFORM_ANDROID_KHR)
// if (util::platform::FileOpen(&debug_, "/storage/emulated/0/Download/AssetFileConsumer2.txt", "a"))
// #else
// if (util::platform::FileOpen(&debug_, "AssetFileConsumer.txt", "a"))
// #endif
// {
// assert(0);
// }
}

~AssetFileConsumer()
Expand Down
30 changes: 15 additions & 15 deletions framework/decode/vulkan_handle_mapping_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ static void AddHandle(format::HandleId parent_id,
const typename T::HandleType handle,
T&& initial_info,
VulkanObjectInfoTable* object_info_table,
void (VulkanObjectInfoTable::*AddFunc)(T&&))
void (VulkanObjectInfoTable::*AddFunc)(T&&))
{
assert(object_info_table != nullptr);

Expand All @@ -146,7 +146,7 @@ static void AddHandle(format::HandleId parent_id,
format::HandleId id,
typename T::HandleType handle,
VulkanObjectInfoTable* object_info_table,
void (VulkanObjectInfoTable::*AddFunc)(T&&))
void (VulkanObjectInfoTable::*AddFunc)(T&&))
{
assert(object_info_table != nullptr);

Expand All @@ -165,7 +165,7 @@ static void AddHandleArray(format::HandleId parent_id,
size_t handles_len,
std::vector<T>&& initial_infos,
VulkanObjectInfoTable* object_info_table,
void (VulkanObjectInfoTable::*AddFunc)(T&&))
void (VulkanObjectInfoTable::*AddFunc)(T&&))
{
assert(object_info_table != nullptr);

Expand Down Expand Up @@ -193,7 +193,7 @@ static void AddHandleArray(format::HandleId parent_id,
const typename T::HandleType* handles,
size_t handles_len,
VulkanObjectInfoTable* object_info_table,
void (VulkanObjectInfoTable::*AddFunc)(T&&))
void (VulkanObjectInfoTable::*AddFunc)(T&&))
{
assert(object_info_table != nullptr);

Expand All @@ -216,7 +216,7 @@ static void AddHandleArrayAsync(format::HandleId parent_id,
const format::HandleId* ids,
size_t ids_len,
VulkanObjectInfoTable* object_info_table,
void (VulkanObjectInfoTable::*AddFunc)(T&&),
void (VulkanObjectInfoTable::*AddFunc)(T&&),
std::shared_future<handle_create_result_t<typename T::HandleType>> future)
{
static_assert(has_handle_future_v<T>, "handle-type does not support asynchronous creation");
Expand All @@ -243,7 +243,7 @@ static void AddHandleArrayAsync(format::HandleId parent_id,
size_t ids_len,
VulkanObjectInfoTable* object_info_table,
std::vector<T>&& initial_infos,
void (VulkanObjectInfoTable::*AddFunc)(T&&),
void (VulkanObjectInfoTable::*AddFunc)(T&&),
std::shared_future<handle_create_result_t<typename T::HandleType>> future)
{
static_assert(has_handle_future_v<T>, "handle-type does not support asynchronous creation");
Expand Down Expand Up @@ -275,8 +275,8 @@ static void AddHandleArray(format::HandleId parent_id,
size_t handles_len,
std::vector<T>&& initial_infos,
VulkanObjectInfoTable* object_info_table,
S* (VulkanObjectInfoTable::*GetPoolInfoFunc)(format::HandleId),
void (VulkanObjectInfoTable::*AddFunc)(T&&))
S* (VulkanObjectInfoTable::*GetPoolInfoFunc)(format::HandleId),
void (VulkanObjectInfoTable::*AddFunc)(T&&))
{
assert(object_info_table != nullptr);

Expand Down Expand Up @@ -318,8 +318,8 @@ static void AddHandleArray(format::HandleId parent_id,
const typename T::HandleType* handles,
size_t handles_len,
VulkanObjectInfoTable* object_info_table,
S* (VulkanObjectInfoTable::*GetPoolInfoFunc)(format::HandleId),
void (VulkanObjectInfoTable::*AddFunc)(T&&))
S* (VulkanObjectInfoTable::*GetPoolInfoFunc)(format::HandleId),
void (VulkanObjectInfoTable::*AddFunc)(T&&))
{
assert(object_info_table != nullptr);

Expand Down Expand Up @@ -352,7 +352,7 @@ static void AddHandleArray(format::HandleId parent_id,

inline void RemoveHandle(format::HandleId id,
VulkanObjectInfoTable* object_info_table,
void (VulkanObjectInfoTable::*RemoveFunc)(format::HandleId))
void (VulkanObjectInfoTable::*RemoveFunc)(format::HandleId))
{
assert(object_info_table != nullptr);

Expand All @@ -366,9 +366,9 @@ inline void RemoveHandle(format::HandleId id,
template <typename T>
void RemovePoolHandle(format::HandleId id,
VulkanObjectInfoTable* object_info_table,
T* (VulkanObjectInfoTable::*GetPoolInfoFunc)(format::HandleId),
void (VulkanObjectInfoTable::*RemovePoolFunc)(format::HandleId),
void (VulkanObjectInfoTable::*RemoveObjectFunc)(format::HandleId))
T* (VulkanObjectInfoTable::*GetPoolInfoFunc)(format::HandleId),
void (VulkanObjectInfoTable::*RemovePoolFunc)(format::HandleId),
void (VulkanObjectInfoTable::*RemoveObjectFunc)(format::HandleId))
{
assert(object_info_table != nullptr);

Expand All @@ -389,7 +389,7 @@ template <typename S, typename T>
void RemoveHandleArray(format::HandleId pool_id,
const HandlePointerDecoder<typename T::HandleType>* handles_pointer,
VulkanObjectInfoTable* object_info_table,
S* (VulkanObjectInfoTable::*GetPoolInfoFunc)(format::HandleId),
S* (VulkanObjectInfoTable::*GetPoolInfoFunc)(format::HandleId),
void (VulkanObjectInfoTable::*RemoveFunc)(format::HandleId))
{
assert((handles_pointer != nullptr) && (object_info_table != nullptr));
Expand Down
2 changes: 0 additions & 2 deletions framework/decode/vulkan_replay_consumer_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2632,8 +2632,6 @@ VulkanReplayConsumerBase::OverrideCreateInstance(VkResult original_result,

if (!options_.reuse_asset_file.empty())
{
assert(layer_custom_funcs_ptrs.size() == 4);

set_unique_id_offset_fp_ = reinterpret_cast<encode::SetUniqueIdOffsetGFXRPtr>(layer_custom_funcs_ptrs[0]);
if (set_unique_id_offset_fp_ == nullptr)
{
Expand Down
32 changes: 16 additions & 16 deletions framework/decode/vulkan_replay_consumer_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ class VulkanReplayConsumerBase : public VulkanConsumer

template <typename T>
typename T::HandleType MapHandle(format::HandleId id,
const T* (VulkanObjectInfoTable::*MapFunc)(format::HandleId) const) const
const T* (VulkanObjectInfoTable::*MapFunc)(format::HandleId) const) const
{
return handle_mapping::MapHandle(id, object_info_table_, MapFunc);
}
Expand Down Expand Up @@ -287,7 +287,7 @@ class VulkanReplayConsumerBase : public VulkanConsumer
const format::HandleId* id,
const typename T::HandleType* handle,
T&& initial_info,
void (VulkanObjectInfoTable::*AddFunc)(T&&))
void (VulkanObjectInfoTable::*AddFunc)(T&&))
{
if ((id != nullptr) && (handle != nullptr))
{
Expand All @@ -300,7 +300,7 @@ class VulkanReplayConsumerBase : public VulkanConsumer
void AddHandle(format::HandleId parent_id,
const format::HandleId* id,
const typename T::HandleType* handle,
void (VulkanObjectInfoTable::*AddFunc)(T&&))
void (VulkanObjectInfoTable::*AddFunc)(T&&))
{
if ((id != nullptr) && (handle != nullptr))
{
Expand All @@ -323,7 +323,7 @@ class VulkanReplayConsumerBase : public VulkanConsumer
const typename T::HandleType* handles,
size_t handles_len,
std::vector<T>&& initial_infos,
void (VulkanObjectInfoTable::*AddFunc)(T&&))
void (VulkanObjectInfoTable::*AddFunc)(T&&))
{
handle_mapping::AddHandleArray(
parent_id, ids, ids_len, handles, handles_len, std::move(initial_infos), &object_info_table_, AddFunc);
Expand All @@ -335,7 +335,7 @@ class VulkanReplayConsumerBase : public VulkanConsumer
size_t ids_len,
const typename T::HandleType* handles,
size_t handles_len,
void (VulkanObjectInfoTable::*AddFunc)(T&&))
void (VulkanObjectInfoTable::*AddFunc)(T&&))
{
handle_mapping::AddHandleArray(parent_id, ids, ids_len, handles, handles_len, &object_info_table_, AddFunc);
}
Expand Down Expand Up @@ -380,7 +380,7 @@ class VulkanReplayConsumerBase : public VulkanConsumer
void AddHandlesAsync(format::HandleId parent_id,
const format::HandleId* ids,
size_t ids_len,
void (VulkanObjectInfoTable::*AddFunc)(T&&),
void (VulkanObjectInfoTable::*AddFunc)(T&&),
std::function<handle_create_result_t<typename T::HandleType>()> create_function)
{
if (create_function)
Expand All @@ -401,7 +401,7 @@ class VulkanReplayConsumerBase : public VulkanConsumer
const format::HandleId* ids,
size_t ids_len,
std::vector<T>&& initial_infos,
void (VulkanObjectInfoTable::*AddFunc)(T&&),
void (VulkanObjectInfoTable::*AddFunc)(T&&),
std::function<handle_create_result_t<typename T::HandleType>()> create_function)
{
if (create_function)
Expand Down Expand Up @@ -461,8 +461,8 @@ class VulkanReplayConsumerBase : public VulkanConsumer
const typename T::HandleType* handles,
size_t handles_len,
std::vector<T>&& initial_infos,
S* (VulkanObjectInfoTable::*GetPoolInfoFunc)(format::HandleId),
void (VulkanObjectInfoTable::*AddFunc)(T&&))
S* (VulkanObjectInfoTable::*GetPoolInfoFunc)(format::HandleId),
void (VulkanObjectInfoTable::*AddFunc)(T&&))
{
handle_mapping::AddHandleArray(parent_id,
pool_id,
Expand All @@ -483,8 +483,8 @@ class VulkanReplayConsumerBase : public VulkanConsumer
size_t ids_len,
const typename T::HandleType* handles,
size_t handles_len,
S* (VulkanObjectInfoTable::*GetPoolInfoFunc)(format::HandleId),
void (VulkanObjectInfoTable::*AddFunc)(T&&))
S* (VulkanObjectInfoTable::*GetPoolInfoFunc)(format::HandleId),
void (VulkanObjectInfoTable::*AddFunc)(T&&))
{
handle_mapping::AddHandleArray(parent_id,
pool_id,
Expand All @@ -505,9 +505,9 @@ class VulkanReplayConsumerBase : public VulkanConsumer

template <typename T>
void RemovePoolHandle(format::HandleId id,
T* (VulkanObjectInfoTable::*GetPoolInfoFunc)(format::HandleId),
void (VulkanObjectInfoTable::*RemovePoolFunc)(format::HandleId),
void (VulkanObjectInfoTable::*RemoveObjectFunc)(format::HandleId))
T* (VulkanObjectInfoTable::*GetPoolInfoFunc)(format::HandleId),
void (VulkanObjectInfoTable::*RemovePoolFunc)(format::HandleId),
void (VulkanObjectInfoTable::*RemoveObjectFunc)(format::HandleId))
{
handle_mapping::RemovePoolHandle(id, &object_info_table_, GetPoolInfoFunc, RemovePoolFunc, RemoveObjectFunc);
}
Expand All @@ -516,7 +516,7 @@ class VulkanReplayConsumerBase : public VulkanConsumer
void RemovePoolHandles(format::HandleId pool_id,
const HandlePointerDecoder<typename T::HandleType>* handles_pointer,
size_t handles_len,
S* (VulkanObjectInfoTable::*GetPoolInfoFunc)(format::HandleId),
S* (VulkanObjectInfoTable::*GetPoolInfoFunc)(format::HandleId),
void (VulkanObjectInfoTable::*RemoveFunc)(format::HandleId))
{
// This parameter is only referenced by debug builds.
Expand All @@ -535,7 +535,7 @@ class VulkanReplayConsumerBase : public VulkanConsumer
void SetOutputArrayCount(format::HandleId handle_id,
uint32_t index,
size_t count,
HandleInfoT* (VulkanObjectInfoTable::*HandleInfoFunc)(format::HandleId))
HandleInfoT* (VulkanObjectInfoTable::*HandleInfoFunc)(format::HandleId))
{
HandleInfoT* info = (object_info_table_.*HandleInfoFunc)(handle_id);
if (info != nullptr)
Expand Down
3 changes: 2 additions & 1 deletion framework/encode/capture_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1842,7 +1842,8 @@ void CommonCaptureManager::OverrideIdForNextVulkanObject(format::HandleId id, Vk
{
if (id != format::kNullHandleId)
{
GFXRECON_WRITE_CONSOLE("[CAPTURE] %s() capture_id: %" PRIu64 " type: %s", __func__, id, VkObjectTypeToStr(type));
// GFXRECON_WRITE_CONSOLE(
// "[CAPTURE] %s() capture_id: %" PRIu64 " type: %s", __func__, id, VkObjectTypeToStr(type));
handle_ids_override.push(std::make_pair(id, type));
}
}
Expand Down

0 comments on commit 46ede91

Please sign in to comment.