From ec46a9b7a58a766cd16c1b4cfd02618af0c577de Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Thu, 11 Jul 2024 15:00:16 +0300 Subject: [PATCH 01/99] Distinguish between muttable and immutable descriptors Fine grain descriptor set encode wrapper so that it can distinguish between mutable (storage) and immutable (uniform) images and buffers. --- .../custom_vulkan_api_call_encoders.cpp | 75 +++++- .../encode/descriptor_update_template_info.h | 10 +- framework/encode/vulkan_capture_manager.cpp | 59 ++++- framework/encode/vulkan_handle_wrappers.h | 4 + framework/encode/vulkan_state_info.h | 5 +- framework/encode/vulkan_state_tracker.cpp | 231 +++++++++++++++++- .../vulkan_state_tracker_initializers.h | 22 +- framework/encode/vulkan_state_writer.cpp | 14 +- 8 files changed, 382 insertions(+), 38 deletions(-) diff --git a/framework/encode/custom_vulkan_api_call_encoders.cpp b/framework/encode/custom_vulkan_api_call_encoders.cpp index 48a06ac48e..efc01ff1ee 100644 --- a/framework/encode/custom_vulkan_api_call_encoders.cpp +++ b/framework/encode/custom_vulkan_api_call_encoders.cpp @@ -66,6 +66,18 @@ static const void* UnwrapDescriptorUpdateTemplateInfoHandles(const UpdateTemplat } } + for (const auto& entry_info : info->storage_image_info) + { + for (size_t i = 0; i < entry_info.count; ++i) + { + size_t offset = entry_info.offset + (entry_info.stride * i); + auto unwrapped_entry = reinterpret_cast(unwrapped_data + offset); + + memcpy(unwrapped_entry, bytes + offset, sizeof(VkDescriptorImageInfo)); + vulkan_wrappers::UnwrapStructHandles(entry_info.type, unwrapped_entry, unwrap_memory); + } + } + // Process VkDescriptorBufferInfo for (const auto& entry_info : info->buffer_info) { @@ -79,8 +91,32 @@ static const void* UnwrapDescriptorUpdateTemplateInfoHandles(const UpdateTemplat } } + for (const auto& entry_info : info->storage_buffer_info) + { + for (size_t i = 0; i < entry_info.count; ++i) + { + size_t offset = entry_info.offset + (entry_info.stride * i); + auto unwrapped_entry = reinterpret_cast(unwrapped_data + offset); + + memcpy(unwrapped_entry, bytes + offset, sizeof(VkDescriptorBufferInfo)); + vulkan_wrappers::UnwrapStructHandles(unwrapped_entry, unwrap_memory); + } + } + // Process VkBufferView - for (const auto& entry_info : info->texel_buffer_view) + for (const auto& entry_info : info->uniform_texel_buffer_view) + { + for (size_t i = 0; i < entry_info.count; ++i) + { + size_t offset = entry_info.offset + (entry_info.stride * i); + auto unwrapped_entry = reinterpret_cast(unwrapped_data + offset); + auto entry = reinterpret_cast(bytes + offset); + + *unwrapped_entry = (*entry); + } + } + + for (const auto& entry_info : info->storage_texel_buffer_view) { for (size_t i = 0; i < entry_info.count; ++i) { @@ -135,8 +171,11 @@ static void EncodeDescriptorUpdateTemplateInfo(VulkanCaptureManager* manager // decoding. Optional entries must be encoded after the required entries, and must encode the number of elements // in the array as well as VkDescriptorType. encoder->EncodeSizeTValue(info->image_info_count); + encoder->EncodeSizeTValue(info->storage_image_info_count); encoder->EncodeSizeTValue(info->buffer_info_count); - encoder->EncodeSizeTValue(info->texel_buffer_view_count); + encoder->EncodeSizeTValue(info->storage_buffer_info_count); + encoder->EncodeSizeTValue(info->uniform_texel_buffer_view_count); + encoder->EncodeSizeTValue(info->storage_texel_buffer_view_count); // Write the individual template update entries, sorted by type, as tightly packed arrays. const uint8_t* bytes = reinterpret_cast(data); @@ -151,6 +190,16 @@ static void EncodeDescriptorUpdateTemplateInfo(VulkanCaptureManager* manager } } + for (const auto& entry_info : info->storage_image_info) + { + for (size_t i = 0; i < entry_info.count; ++i) + { + size_t offset = entry_info.offset + (entry_info.stride * i); + const VkDescriptorImageInfo* entry = reinterpret_cast(bytes + offset); + EncodeStruct(encoder, entry_info.type, (*entry)); + } + } + // Process VkDescriptorBufferInfo for (const auto& entry_info : info->buffer_info) { @@ -162,8 +211,28 @@ static void EncodeDescriptorUpdateTemplateInfo(VulkanCaptureManager* manager } } + for (const auto& entry_info : info->storage_buffer_info) + { + for (size_t i = 0; i < entry_info.count; ++i) + { + size_t offset = entry_info.offset + (entry_info.stride * i); + const VkDescriptorBufferInfo* entry = reinterpret_cast(bytes + offset); + EncodeStruct(encoder, (*entry)); + } + } + // Process VkBufferView - for (const auto& entry_info : info->texel_buffer_view) + for (const auto& entry_info : info->uniform_texel_buffer_view) + { + for (size_t i = 0; i < entry_info.count; ++i) + { + size_t offset = entry_info.offset + (entry_info.stride * i); + const VkBufferView* entry = reinterpret_cast(bytes + offset); + encoder->EncodeVulkanHandleValue(*entry); + } + } + + for (const auto& entry_info : info->storage_texel_buffer_view) { for (size_t i = 0; i < entry_info.count; ++i) { diff --git a/framework/encode/descriptor_update_template_info.h b/framework/encode/descriptor_update_template_info.h index 1c216afa0e..873571401c 100644 --- a/framework/encode/descriptor_update_template_info.h +++ b/framework/encode/descriptor_update_template_info.h @@ -53,13 +53,19 @@ struct UpdateTemplateInfo // items to encode prior to processing the individual UpdateTemplateEntry structures. size_t max_size{ 0 }; size_t image_info_count{ 0 }; + size_t storage_image_info_count{ 0 }; size_t buffer_info_count{ 0 }; - size_t texel_buffer_view_count{ 0 }; + size_t storage_buffer_info_count{ 0 }; + size_t uniform_texel_buffer_view_count{ 0 }; + size_t storage_texel_buffer_view_count{ 0 }; size_t acceleration_structure_khr_count{ 0 }; size_t inline_uniform_block_count{ 0 }; std::vector image_info; + std::vector storage_image_info; std::vector buffer_info; - std::vector texel_buffer_view; + std::vector storage_buffer_info; + std::vector uniform_texel_buffer_view; + std::vector storage_texel_buffer_view; std::vector acceleration_structure_khr; std::vector inline_uniform_block; }; diff --git a/framework/encode/vulkan_capture_manager.cpp b/framework/encode/vulkan_capture_manager.cpp index f25d8a38d9..6235ca8942 100644 --- a/framework/encode/vulkan_capture_manager.cpp +++ b/framework/encode/vulkan_capture_manager.cpp @@ -447,8 +447,7 @@ void VulkanCaptureManager::SetDescriptorUpdateTemplateInfo(VkDescriptorUpdateTem // as tightly packed arrays of structures. One array will be written for each descriptor info // structure/textel buffer view. if ((type == VK_DESCRIPTOR_TYPE_SAMPLER) || (type == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER) || - (type == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE) || (type == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE) || - (type == VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT)) + (type == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE) || (type == VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT)) { UpdateTemplateEntryInfo image_info; image_info.binding = entry->dstBinding; @@ -463,9 +462,22 @@ void VulkanCaptureManager::SetDescriptorUpdateTemplateInfo(VkDescriptorUpdateTem entry_size = sizeof(VkDescriptorImageInfo); } - else if ((type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER) || (type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER) || - (type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC) || - (type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC)) + if (type == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE) + { + UpdateTemplateEntryInfo image_info; + image_info.binding = entry->dstBinding; + image_info.array_element = entry->dstArrayElement; + image_info.count = entry->descriptorCount; + image_info.offset = entry->offset; + image_info.stride = entry->stride; + image_info.type = type; + + info->storage_image_info_count += entry->descriptorCount; + info->storage_image_info.emplace_back(image_info); + + entry_size = sizeof(VkDescriptorImageInfo); + } + else if ((type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER) || (type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC)) { UpdateTemplateEntryInfo buffer_info; buffer_info.binding = entry->dstBinding; @@ -480,8 +492,37 @@ void VulkanCaptureManager::SetDescriptorUpdateTemplateInfo(VkDescriptorUpdateTem entry_size = sizeof(VkDescriptorBufferInfo); } - else if ((type == VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER) || - (type == VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER)) + else if ((type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER) || (type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC)) + { + UpdateTemplateEntryInfo buffer_info; + buffer_info.binding = entry->dstBinding; + buffer_info.array_element = entry->dstArrayElement; + buffer_info.count = entry->descriptorCount; + buffer_info.offset = entry->offset; + buffer_info.stride = entry->stride; + buffer_info.type = type; + + info->storage_buffer_info_count += entry->descriptorCount; + info->storage_buffer_info.emplace_back(buffer_info); + + entry_size = sizeof(VkDescriptorBufferInfo); + } + else if (type == VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER) + { + UpdateTemplateEntryInfo texel_buffer_view_info; + texel_buffer_view_info.binding = entry->dstBinding; + texel_buffer_view_info.array_element = entry->dstArrayElement; + texel_buffer_view_info.count = entry->descriptorCount; + texel_buffer_view_info.offset = entry->offset; + texel_buffer_view_info.stride = entry->stride; + texel_buffer_view_info.type = type; + + info->uniform_texel_buffer_view_count += entry->descriptorCount; + info->uniform_texel_buffer_view.emplace_back(texel_buffer_view_info); + + entry_size = sizeof(VkBufferView); + } + else if (type == VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER) { UpdateTemplateEntryInfo texel_buffer_view_info; texel_buffer_view_info.binding = entry->dstBinding; @@ -491,8 +532,8 @@ void VulkanCaptureManager::SetDescriptorUpdateTemplateInfo(VkDescriptorUpdateTem texel_buffer_view_info.stride = entry->stride; texel_buffer_view_info.type = type; - info->texel_buffer_view_count += entry->descriptorCount; - info->texel_buffer_view.emplace_back(texel_buffer_view_info); + info->storage_texel_buffer_view_count += entry->descriptorCount; + info->storage_texel_buffer_view.emplace_back(texel_buffer_view_info); entry_size = sizeof(VkBufferView); } diff --git a/framework/encode/vulkan_handle_wrappers.h b/framework/encode/vulkan_handle_wrappers.h index 1f8b1f6dac..736bafc2d3 100644 --- a/framework/encode/vulkan_handle_wrappers.h +++ b/framework/encode/vulkan_handle_wrappers.h @@ -198,6 +198,8 @@ struct BufferWrapper : public HandleWrapper // State tracking info for buffers with device addresses. format::HandleId device_id{ format::kNullHandleId }; VkDeviceAddress address{ 0 }; + + bool dirty; }; struct ImageWrapper : public HandleWrapper @@ -219,6 +221,8 @@ struct ImageWrapper : public HandleWrapper VkImageLayout current_layout{ VK_IMAGE_LAYOUT_UNDEFINED }; bool is_swapchain_image{ false }; std::set parent_swapchains; + + bool dirty; }; struct BufferViewWrapper : public HandleWrapper diff --git a/framework/encode/vulkan_state_info.h b/framework/encode/vulkan_state_info.h index 97f9af567b..d0337c2287 100644 --- a/framework/encode/vulkan_state_info.h +++ b/framework/encode/vulkan_state_info.h @@ -73,8 +73,11 @@ struct DescriptorInfo std::unique_ptr handle_ids; // Image, buffer, or buffer view IDs depending on type. std::unique_ptr sampler_ids; // Sampler IDs for image type. std::unique_ptr images; + std::unique_ptr storage_images; std::unique_ptr buffers; - std::unique_ptr texel_buffer_views; + std::unique_ptr storage_buffers; + std::unique_ptr uniform_texel_buffer_views; + std::unique_ptr storage_texel_buffer_views; std::unique_ptr acceleration_structures; std::unique_ptr inline_uniform_block; std::unique_ptr mutable_type; diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index 22f619500c..3b30f1a2f0 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -691,7 +691,6 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w break; } case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE: - case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE: case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT: { format::HandleId* dst_image_ids = &binding.handle_ids[current_dst_array_element]; @@ -706,10 +705,22 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w } break; } + case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE: + { + format::HandleId* dst_image_ids = &binding.handle_ids[current_dst_array_element]; + VkDescriptorImageInfo* dst_info = &binding.storage_images[current_dst_array_element]; + const VkDescriptorImageInfo* src_info = &write->pImageInfo[current_src_array_element]; + + for (uint32_t i = 0; i < current_writes; ++i) + { + dst_image_ids[i] = + vulkan_wrappers::GetWrappedId(src_info[i].imageView); + memcpy(&dst_info[i], &src_info[i], sizeof(dst_info[i])); + } + break; + } case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER: - case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC: - case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: { format::HandleId* dst_buffer_ids = &binding.handle_ids[current_dst_array_element]; VkDescriptorBufferInfo* dst_info = &binding.buffers[current_dst_array_element]; @@ -723,12 +734,40 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w } break; } + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: + { + format::HandleId* dst_buffer_ids = &binding.handle_ids[current_dst_array_element]; + VkDescriptorBufferInfo* dst_info = &binding.storage_buffers[current_dst_array_element]; + const VkDescriptorBufferInfo* src_info = &write->pBufferInfo[current_src_array_element]; + + for (uint32_t i = 0; i < current_writes; ++i) + { + dst_buffer_ids[i] = + vulkan_wrappers::GetWrappedId(src_info[i].buffer); + memcpy(&dst_info[i], &src_info[i], sizeof(dst_info[i])); + } + break; + } case VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER: + { + format::HandleId* dst_view_ids = &binding.handle_ids[current_dst_array_element]; + VkBufferView* dst_info = &binding.uniform_texel_buffer_views[current_dst_array_element]; + const VkBufferView* src_info = &write->pTexelBufferView[current_src_array_element]; + + for (uint32_t i = 0; i < current_writes; ++i) + { + dst_view_ids[i] = + vulkan_wrappers::GetWrappedId(src_info[i]); + dst_info[i] = src_info[i]; + } + break; + } case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER: { format::HandleId* dst_view_ids = &binding.handle_ids[current_dst_array_element]; - VkBufferView* dst_info = &binding.texel_buffer_views[current_dst_array_element]; - const VkBufferView* src_info = &write->pTexelBufferView[current_src_array_element]; + VkBufferView* dst_info = &binding.storage_texel_buffer_views[current_dst_array_element]; + const VkBufferView* src_info = &write->pTexelBufferView[current_src_array_element]; for (uint32_t i = 0; i < current_writes; ++i) { @@ -845,12 +884,24 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w &src_binding.images[current_src_array_element], (sizeof(VkDescriptorImageInfo) * current_copies)); } + if (src_binding.storage_images != nullptr) + { + memcpy(&dst_binding.storage_images[current_dst_array_element], + &src_binding.storage_images[current_src_array_element], + (sizeof(VkDescriptorImageInfo) * current_copies)); + } if (src_binding.buffers != nullptr) { memcpy(&dst_binding.buffers[current_dst_array_element], &src_binding.buffers[current_src_array_element], (sizeof(VkDescriptorBufferInfo) * current_copies)); } + if (src_binding.storage_buffers != nullptr) + { + memcpy(&dst_binding.storage_buffers[current_dst_array_element], + &src_binding.storage_buffers[current_src_array_element], + (sizeof(VkDescriptorBufferInfo) * current_copies)); + } if (src_binding.acceleration_structures != nullptr) { memcpy(&dst_binding.acceleration_structures[current_dst_array_element], @@ -863,10 +914,16 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w &src_binding.inline_uniform_block[current_src_array_element], current_copies); } - if (src_binding.texel_buffer_views != nullptr) + if (src_binding.uniform_texel_buffer_views != nullptr) + { + memcpy(&dst_binding.uniform_texel_buffer_views[current_dst_array_element], + &src_binding.uniform_texel_buffer_views[current_src_array_element], + (sizeof(VkBufferView) * current_copies)); + } + if (src_binding.storage_texel_buffer_views != nullptr) { - memcpy(&dst_binding.texel_buffer_views[current_dst_array_element], - &src_binding.texel_buffer_views[current_src_array_element], + memcpy(&dst_binding.storage_texel_buffer_views[current_dst_array_element], + &src_binding.storage_texel_buffer_views[current_src_array_element], (sizeof(VkBufferView) * current_copies)); } if (src_binding.mutable_type != nullptr) @@ -989,6 +1046,59 @@ void VulkanStateTracker::TrackUpdateDescriptorSetWithTemplate(VkDescriptorSet } } + for (const auto& entry : template_info->storage_image_info) + { + // Descriptor update rules specify that a write descriptorCount that is greater than the binding's count + // will result in updates to consecutive bindings. + uint32_t current_count = entry.count; + uint32_t current_binding = entry.binding; + uint32_t current_array_element = entry.array_element; + size_t current_offset = entry.offset; + + for (;;) + { + auto& binding = wrapper->bindings[current_binding]; + + assert(binding.storage_images != nullptr); + + // Check count for consecutive updates. + uint32_t current_writes = std::min(current_count, (binding.count - current_array_element)); + + bool* written_start = &binding.written[current_array_element]; + std::fill(written_start, written_start + current_writes, true); + + format::HandleId* dst_image_ids = &binding.handle_ids[current_array_element]; + VkDescriptorImageInfo* dst_info = &binding.storage_images[current_array_element]; + const uint8_t* src_address = bytes + current_offset; + + for (uint32_t i = 0; i < current_writes; ++i) + { + assert(binding.type == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE); + + auto image_info = reinterpret_cast(src_address); + dst_image_ids[i] = + vulkan_wrappers::GetWrappedId(image_info->imageView); + + memcpy(&dst_info[i], image_info, sizeof(dst_info[i])); + + src_address += entry.stride; + } + + // Check for consecutive update. + if (current_count == current_writes) + { + break; + } + else + { + current_count -= current_writes; + current_binding += 1; + current_array_element = 0; + current_offset += (current_writes * entry.stride); + } + } + } + for (const auto& entry : template_info->buffer_info) { // Descriptor update rules specify that a write descriptorCount that is greater than the binding's count @@ -1039,7 +1149,106 @@ void VulkanStateTracker::TrackUpdateDescriptorSetWithTemplate(VkDescriptorSet } } - for (const auto& entry : template_info->texel_buffer_view) + for (const auto& entry : template_info->storage_buffer_info) + { + // Descriptor update rules specify that a write descriptorCount that is greater than the binding's count + // will result in updates to consecutive bindings. + uint32_t current_count = entry.count; + uint32_t current_binding = entry.binding; + uint32_t current_array_element = entry.array_element; + size_t current_offset = entry.offset; + + for (;;) + { + auto& binding = wrapper->bindings[current_binding]; + + assert(binding.storage_buffers != nullptr); + + // Check count for consecutive updates. + uint32_t current_writes = std::min(current_count, (binding.count - current_array_element)); + + bool* written_start = &binding.written[current_array_element]; + std::fill(written_start, written_start + current_writes, true); + + format::HandleId* dst_buffer_ids = &binding.handle_ids[current_array_element]; + VkDescriptorBufferInfo* dst_info = &binding.storage_buffers[current_array_element]; + const uint8_t* src_address = bytes + current_offset; + + for (uint32_t i = 0; i < current_writes; ++i) + { + auto buffer_info = reinterpret_cast(src_address); + dst_buffer_ids[i] = + vulkan_wrappers::GetWrappedId(buffer_info->buffer); + memcpy(&dst_info[i], buffer_info, sizeof(dst_info[i])); + + src_address += entry.stride; + } + + // Check for consecutive update. + if (current_count == current_writes) + { + break; + } + else + { + current_count -= current_writes; + current_binding += 1; + current_array_element = 0; + current_offset += (current_writes * entry.stride); + } + } + } + + for (const auto& entry : template_info->uniform_texel_buffer_view) + { + // Descriptor update rules specify that a write descriptorCount that is greater than the binding's count + // will result in updates to consecutive bindings. + uint32_t current_count = entry.count; + uint32_t current_binding = entry.binding; + uint32_t current_array_element = entry.array_element; + size_t current_offset = entry.offset; + + for (;;) + { + auto& binding = wrapper->bindings[current_binding]; + + assert(binding.uniform_texel_buffer_views != nullptr); + + // Check count for consecutive updates. + uint32_t current_writes = std::min(current_count, (binding.count - current_array_element)); + + bool* written_start = &binding.written[current_array_element]; + std::fill(written_start, written_start + current_writes, true); + + format::HandleId* dst_view_ids = &binding.handle_ids[current_array_element]; + VkBufferView* dst_info = &binding.uniform_texel_buffer_views[current_array_element]; + const uint8_t* src_address = bytes + current_offset; + + for (uint32_t i = 0; i < current_writes; ++i) + { + auto buffer_view = reinterpret_cast(src_address); + dst_view_ids[i] = vulkan_wrappers::GetWrappedId(*buffer_view); + dst_info[i] = *buffer_view; + + src_address += entry.stride; + } + + // Check for consecutive update. + if (current_count == current_writes) + { + break; + } + else + { + current_count -= current_writes; + current_binding += 1; + current_array_element = 0; + current_offset += (current_writes * entry.stride); + } + } + } + + for (const auto& entry : template_info->storage_texel_buffer_view) { // Descriptor update rules specify that a write descriptorCount that is greater than the binding's count // will result in updates to consecutive bindings. @@ -1052,7 +1261,7 @@ void VulkanStateTracker::TrackUpdateDescriptorSetWithTemplate(VkDescriptorSet { auto& binding = wrapper->bindings[current_binding]; - assert(binding.texel_buffer_views != nullptr); + assert(binding.storage_texel_buffer_views != nullptr); // Check count for consecutive updates. uint32_t current_writes = std::min(current_count, (binding.count - current_array_element)); @@ -1061,7 +1270,7 @@ void VulkanStateTracker::TrackUpdateDescriptorSetWithTemplate(VkDescriptorSet std::fill(written_start, written_start + current_writes, true); format::HandleId* dst_view_ids = &binding.handle_ids[current_array_element]; - VkBufferView* dst_info = &binding.texel_buffer_views[current_array_element]; + VkBufferView* dst_info = &binding.storage_texel_buffer_views[current_array_element]; const uint8_t* src_address = bytes + current_offset; for (uint32_t i = 0; i < current_writes; ++i) diff --git a/framework/encode/vulkan_state_tracker_initializers.h b/framework/encode/vulkan_state_tracker_initializers.h index 9178376771..3847482795 100644 --- a/framework/encode/vulkan_state_tracker_initializers.h +++ b/framework/encode/vulkan_state_tracker_initializers.h @@ -847,20 +847,26 @@ inline void InitializePoolObjectState(VkDevice par case VK_DESCRIPTOR_TYPE_SAMPLER: case VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER: case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE: - case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE: case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT: descriptor_info.sampler_ids = std::make_unique(binding_info.count); descriptor_info.images = std::make_unique(binding_info.count); break; + case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE: + descriptor_info.storage_images = std::make_unique(binding_info.count); + break; case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER: - case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC: - case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: descriptor_info.buffers = std::make_unique(binding_info.count); break; + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: + descriptor_info.storage_buffers = std::make_unique(binding_info.count); + break; case VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER: + descriptor_info.uniform_texel_buffer_views = std::make_unique(binding_info.count); + break; case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER: - descriptor_info.texel_buffer_views = std::make_unique(binding_info.count); + descriptor_info.storage_texel_buffer_views = std::make_unique(binding_info.count); break; case VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK: descriptor_info.inline_uniform_block = std::make_unique(binding_info.count); @@ -873,10 +879,10 @@ inline void InitializePoolObjectState(VkDevice par std::make_unique(binding_info.count); break; case VK_DESCRIPTOR_TYPE_MUTABLE_VALVE: - descriptor_info.sampler_ids = std::make_unique(binding_info.count); - descriptor_info.images = std::make_unique(binding_info.count); - descriptor_info.buffers = std::make_unique(binding_info.count); - descriptor_info.texel_buffer_views = std::make_unique(binding_info.count); + descriptor_info.sampler_ids = std::make_unique(binding_info.count); + descriptor_info.images = std::make_unique(binding_info.count); + descriptor_info.buffers = std::make_unique(binding_info.count); + descriptor_info.uniform_texel_buffer_views = std::make_unique(binding_info.count); descriptor_info.acceleration_structures = std::make_unique(binding_info.count); descriptor_info.mutable_type = std::make_unique(binding_info.count); diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index 904851e2d5..7e632a2da5 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -2389,19 +2389,25 @@ void VulkanStateWriter::WriteDescriptorUpdateCommand(format::HandleId case VK_DESCRIPTOR_TYPE_SAMPLER: case VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER: case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE: - case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE: case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT: write->pImageInfo = &binding->images[write->dstArrayElement]; break; + case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE: + write->pImageInfo = &binding->storage_images[write->dstArrayElement]; + break; case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER: - case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC: - case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: write->pBufferInfo = &binding->buffers[write->dstArrayElement]; break; + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: + write->pBufferInfo = &binding->storage_buffers[write->dstArrayElement]; + break; case VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER: + write->pTexelBufferView = &binding->uniform_texel_buffer_views[write->dstArrayElement]; + break; case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER: - write->pTexelBufferView = &binding->texel_buffer_views[write->dstArrayElement]; + write->pTexelBufferView = &binding->storage_texel_buffer_views[write->dstArrayElement]; break; case VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK: if (binding->inline_uniform_block != nullptr) From 6cea23063cc8e73354319aa736688a559f4d09dd Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Thu, 11 Jul 2024 20:45:18 +0300 Subject: [PATCH 02/99] Track descriptors and transfer commands that affect assets --- .../encode/custom_vulkan_encoder_commands.h | 31 ++ framework/encode/vulkan_capture_manager.cpp | 308 +++++++++++++ framework/encode/vulkan_capture_manager.h | 112 ++++- framework/encode/vulkan_handle_wrappers.h | 140 +++--- framework/encode/vulkan_state_info.h | 26 ++ framework/encode/vulkan_state_tracker.cpp | 424 ++++++++++++++++++ framework/encode/vulkan_state_tracker.h | 96 ++++ .../vulkan_state_tracker_initializers.h | 1 + framework/util/spirv_parsing_util.cpp | 101 +++++ framework/util/spirv_parsing_util.h | 6 + 10 files changed, 1169 insertions(+), 76 deletions(-) diff --git a/framework/encode/custom_vulkan_encoder_commands.h b/framework/encode/custom_vulkan_encoder_commands.h index c472558fdb..2ec1bb5f80 100644 --- a/framework/encode/custom_vulkan_encoder_commands.h +++ b/framework/encode/custom_vulkan_encoder_commands.h @@ -1190,6 +1190,37 @@ struct CustomEncoderPostCall } }; +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdBindPipeline(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, VkResult result, Args... args) + { + manager->PostProcess_vkCreateGraphicsPipelines(result, args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, VkResult result, Args... args) + { + manager->PostProcess_vkCreateComputePipelines(result, args...); + } +}; + + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/vulkan_capture_manager.cpp b/framework/encode/vulkan_capture_manager.cpp index 6235ca8942..e3724e0b1b 100644 --- a/framework/encode/vulkan_capture_manager.cpp +++ b/framework/encode/vulkan_capture_manager.cpp @@ -22,6 +22,8 @@ ** DEALINGS IN THE SOFTWARE. */ +#include "encode/vulkan_handle_wrappers.h" +#include "vulkan/vulkan_core.h" #include PROJECT_VERSION_HEADER_FILE #include "encode/struct_pointer_encoder.h" @@ -2850,6 +2852,312 @@ void VulkanCaptureManager::PostProcess_vkCreateShaderModule(VkResult if (result == VK_SUCCESS) { graphics::vulkan_check_buffer_references(pCreateInfo->pCode, pCreateInfo->codeSize); + + vulkan_wrappers::ShaderModuleWrapper* shader_wrapper = + vulkan_wrappers::GetWrapper(*pShaderModule); + if (shader_wrapper != nullptr) + { + gfxrecon::util::SpirVParsingUtil spirv_util; + if (!spirv_util.SPIRVReflectPerformReflectionOnShaderModule( + pCreateInfo->codeSize, pCreateInfo->pCode, shader_wrapper->used_descriptors_info)) + { + GFXRECON_LOG_WARNING("Reflection on shader %" PRIu64 "failed", shader_wrapper->handle_id); + } + } + } +} + +void VulkanCaptureManager::PostProcess_vkCmdBindPipeline(VkCommandBuffer commandBuffer, + VkPipelineBindPoint pipelineBindPoint, + VkPipeline pipeline) +{ + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + if (cmd_buf_wrapper != nullptr) + { + vulkan_wrappers::PipelineWrapper* ppl_wrapper = + vulkan_wrappers::GetWrapper(pipeline); + if (ppl_wrapper != nullptr) + { + cmd_buf_wrapper->bound_pipeline = ppl_wrapper; + } + } +} + +void VulkanCaptureManager::PostProcess_vkCreateGraphicsPipelines(VkResult result, + VkDevice device, + VkPipelineCache pipelineCache, + uint32_t createInfoCount, + const VkGraphicsPipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, + VkPipeline* pPipelines) +{ + if (result == VK_SUCCESS && createInfoCount && pPipelines != nullptr) + { + for (uint32_t i = 0; i < createInfoCount; ++i) + { + vulkan_wrappers::PipelineWrapper* ppl_wrapper = + vulkan_wrappers::GetWrapper(pPipelines[i]); + assert(ppl_wrapper != nullptr); + ppl_wrapper->pipeline_bind_point = VK_PIPELINE_BIND_POINT_GRAPHICS; + } + } +} + +void VulkanCaptureManager::PostProcess_vkCreateComputePipelines(VkResult result, + VkDevice device, + VkPipelineCache pipelineCache, + uint32_t createInfoCount, + const VkComputePipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, + VkPipeline* pPipelines) +{ + if (result == VK_SUCCESS && createInfoCount && pPipelines != nullptr) + { + for (uint32_t i = 0; i < createInfoCount; ++i) + { + vulkan_wrappers::PipelineWrapper* ppl_wrapper = + vulkan_wrappers::GetWrapper(pPipelines[i]); + assert(ppl_wrapper != nullptr); + ppl_wrapper->pipeline_bind_point = VK_PIPELINE_BIND_POINT_COMPUTE; + } + } +} + +void VulkanCaptureManager::PostProcess_vkCmdBindDescriptorSets(VkCommandBuffer commandBuffer, + VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, + uint32_t firstSet, + uint32_t descriptorSetCount, + const VkDescriptorSet* pDescriptorSets, + uint32_t dynamicOffsetCount, + const uint32_t* pDynamicOffsets) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdBindDescriptorSets(commandBuffer, + pipelineBindPoint, + layout, + firstSet, + descriptorSetCount, + pDescriptorSets, + dynamicOffsetCount, + pDynamicOffsets); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdBindDescriptorSets2KHR( + VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdBindDescriptorSets2KHR(commandBuffer, pBindDescriptorSetsInfo); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdCopyBuffer(VkCommandBuffer commandBuffer, + VkBuffer srcBuffer, + VkBuffer dstBuffer, + uint32_t regionCount, + const VkBufferCopy* pRegions) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdCopyImage(VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkImageCopy* pRegions) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdCopyImage( + commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdCopyBufferToImage(VkCommandBuffer commandBuffer, + VkBuffer srcBuffer, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkBufferImageCopy* pRegions) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdCopyBufferToImage( + commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkBuffer dstBuffer, + uint32_t regionCount, + const VkBufferImageCopy* pRegions) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdCopyImageToBuffer( + commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdCopyBuffer2(VkCommandBuffer commandBuffer, + const VkCopyBufferInfo2* pCopyBufferInfo) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdCopyBuffer2(commandBuffer, pCopyBufferInfo); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdCopyImage2(VkCommandBuffer commandBuffer, + const VkCopyImageInfo2* pCopyImageInfo) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdCopyImage2(commandBuffer, pCopyImageInfo); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdCopyBufferToImage2(VkCommandBuffer commandBuffer, + const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdCopyBufferToImage2(commandBuffer, pCopyBufferToImageInfo); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, + const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdCopyImageToBuffer2(commandBuffer, pCopyImageToBufferInfo); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, + const VkCopyBufferInfo2* pCopyBufferInfo) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdCopyBuffer2KHR(commandBuffer, pCopyBufferInfo); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdCopyImage2KHR(VkCommandBuffer commandBuffer, + const VkCopyImageInfo2* pCopyImageInfo) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdCopyImage2KHR(commandBuffer, pCopyImageInfo); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdCopyBufferToImage2KHR( + VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdCopyBufferToImage2KHR(commandBuffer, pCopyBufferToImageInfo); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdCopyImageToBuffer2KHR( + VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdCopyImageToBuffer2KHR(commandBuffer, pCopyImageToBufferInfo); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdBlitImage(VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkImageBlit* pRegions, + VkFilter filter) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdBlitImage( + commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdBlitImage2(VkCommandBuffer commandBuffer, + const VkBlitImageInfo2* pBlitImageInfo) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdBlitImage2(commandBuffer, pBlitImageInfo); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdBlitImage2KHR(VkCommandBuffer commandBuffer, + const VkBlitImageInfo2* pBlitImageInfo) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdBlitImage2KHR(commandBuffer, pBlitImageInfo); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdUpdateBuffer( + VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, dataSize, pData); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdFillBuffer( + VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdFillBuffer(commandBuffer, dstBuffer, dstOffset, size, data); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdClearColorImage(VkCommandBuffer commandBuffer, + VkImage image, + VkImageLayout imageLayout, + const VkClearColorValue* pColor, + uint32_t rangeCount, + const VkImageSubresourceRange* pRanges) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdClearColorImage(commandBuffer, image, imageLayout, pColor, rangeCount, pRanges); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, + VkImage image, + VkImageLayout imageLayout, + const VkClearDepthStencilValue* pDepthStencil, + uint32_t rangeCount, + const VkImageSubresourceRange* pRanges) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdClearDepthStencilImage( + commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges); } } diff --git a/framework/encode/vulkan_capture_manager.h b/framework/encode/vulkan_capture_manager.h index 7f65dc3464..f957eb8872 100644 --- a/framework/encode/vulkan_capture_manager.h +++ b/framework/encode/vulkan_capture_manager.h @@ -42,6 +42,7 @@ #include "util/defines.h" #include "vulkan/vulkan.h" +#include "vulkan/vulkan_core.h" #include #include @@ -1256,10 +1257,7 @@ class VulkanCaptureManager : public ApiCaptureManager void PostProcess_vkCmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); - void PostProcess_vkFrameBoundaryANDROID(VkDevice device, VkSemaphore semaphore, VkImage image) - { - EndFrame(); - } + void PostProcess_vkFrameBoundaryANDROID(VkDevice device, VkSemaphore semaphore, VkImage image) { EndFrame(); } void PostProcess_vkCmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo); @@ -1270,6 +1268,102 @@ class VulkanCaptureManager : public ApiCaptureManager const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule); + void PostProcess_vkCmdBindDescriptorSets(VkCommandBuffer commandBuffer, + VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, + uint32_t firstSet, + uint32_t descriptorSetCount, + const VkDescriptorSet* pDescriptorSets, + uint32_t dynamicOffsetCount, + const uint32_t* pDynamicOffsets); + void PostProcess_vkCmdBindDescriptorSets2KHR(VkCommandBuffer commandBuffer, + const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo); + void PostProcess_vkCmdCopyBuffer(VkCommandBuffer commandBuffer, + VkBuffer srcBuffer, + VkBuffer dstBuffer, + uint32_t regionCount, + const VkBufferCopy* pRegions); + void PostProcess_vkCmdCopyImage(VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkImageCopy* pRegions); + void PostProcess_vkCmdCopyBufferToImage(VkCommandBuffer commandBuffer, + VkBuffer srcBuffer, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkBufferImageCopy* pRegions); + void PostProcess_vkCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkBuffer dstBuffer, + uint32_t regionCount, + const VkBufferImageCopy* pRegions); + void PostProcess_vkCmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo); + void PostProcess_vkCmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo); + void PostProcess_vkCmdCopyBufferToImage2(VkCommandBuffer commandBuffer, + const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo); + void PostProcess_vkCmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, + const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo); + void PostProcess_vkCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo); + void PostProcess_vkCmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo); + void PostProcess_vkCmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer, + const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo); + void PostProcess_vkCmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer, + const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo); + void PostProcess_vkCmdBlitImage(VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkImageBlit* pRegions, + VkFilter filter); + void PostProcess_vkCmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo); + void PostProcess_vkCmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo); + void PostProcess_vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, + VkBuffer dstBuffer, + VkDeviceSize dstOffset, + VkDeviceSize dataSize, + const void* pData); + void PostProcess_vkCmdFillBuffer( + VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data); + void PostProcess_vkCmdClearColorImage(VkCommandBuffer commandBuffer, + VkImage image, + VkImageLayout imageLayout, + const VkClearColorValue* pColor, + uint32_t rangeCount, + const VkImageSubresourceRange* pRanges); + void PostProcess_vkCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, + VkImage image, + VkImageLayout imageLayout, + const VkClearDepthStencilValue* pDepthStencil, + uint32_t rangeCount, + const VkImageSubresourceRange* pRanges); + + void PostProcess_vkCmdBindPipeline(VkCommandBuffer commandBuffer, + VkPipelineBindPoint pipelineBindPoint, + VkPipeline pipeline); + + void PostProcess_vkCreateGraphicsPipelines(VkResult result, + VkDevice device, + VkPipelineCache pipelineCache, + uint32_t createInfoCount, + const VkGraphicsPipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, + VkPipeline* pPipelines); + + void PostProcess_vkCreateComputePipelines(VkResult result, + VkDevice device, + VkPipelineCache pipelineCache, + uint32_t createInfoCount, + const VkComputePipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, + VkPipeline* pPipelines); + #if defined(__ANDROID__) void OverrideGetPhysicalDeviceSurfacePresentModesKHR(uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes); #endif @@ -1279,15 +1373,9 @@ class VulkanCaptureManager : public ApiCaptureManager virtual ~VulkanCaptureManager() {} - virtual void CreateStateTracker() override - { - state_tracker_ = std::make_unique(); - } + virtual void CreateStateTracker() override { state_tracker_ = std::make_unique(); } - virtual void DestroyStateTracker() override - { - state_tracker_ = nullptr; - } + virtual void DestroyStateTracker() override { state_tracker_ = nullptr; } virtual void WriteTrackedState(util::FileOutputStream* file_stream, format::ThreadId thread_id) override; diff --git a/framework/encode/vulkan_handle_wrappers.h b/framework/encode/vulkan_handle_wrappers.h index 736bafc2d3..555cabde28 100644 --- a/framework/encode/vulkan_handle_wrappers.h +++ b/framework/encode/vulkan_handle_wrappers.h @@ -35,7 +35,9 @@ #include "util/page_guard_manager.h" #include "vulkan/vulkan.h" +#include "vulkan/vulkan_core.h" +#include #include #include #include @@ -71,7 +73,6 @@ struct HandleWrapper // // clang-format off -struct ShaderModuleWrapper : public HandleWrapper {}; // struct PipelineCacheWrapper : public HandleWrapper {}; struct SamplerWrapper : public HandleWrapper {}; struct SamplerYcbcrConversionWrapper : public HandleWrapper {}; @@ -95,6 +96,11 @@ struct DisplayModeKHRWrapper : public HandleWrapper // Declarations for handle wrappers that require additional state info. // +struct ShaderModuleWrapper : public HandleWrapper +{ + vulkan_state_info::ShaderReflectionDescriptorSetsInfos used_descriptors_info; +}; + // This handle type is retrieved and has no destroy function. The handle wrapper will be owned by its parent // VkPhysicalDevice handle wrapper, which will filter duplicate handle retrievals and ensure that the wrapper is // destroyed. @@ -199,7 +205,7 @@ struct BufferWrapper : public HandleWrapper format::HandleId device_id{ format::kNullHandleId }; VkDeviceAddress address{ 0 }; - bool dirty; + bool dirty{ true }; }; struct ImageWrapper : public HandleWrapper @@ -222,12 +228,13 @@ struct ImageWrapper : public HandleWrapper bool is_swapchain_image{ false }; std::set parent_swapchains; - bool dirty; + bool dirty{ true }; }; struct BufferViewWrapper : public HandleWrapper { format::HandleId buffer_id{ format::kNullHandleId }; + BufferWrapper* buffer{ nullptr }; }; struct ImageViewWrapper : public HandleWrapper @@ -275,6 +282,71 @@ struct RenderPassWrapper : public HandleWrapper std::vector attachment_final_layouts; }; +struct DescriptorUpdateTemplateWrapper : public HandleWrapper +{ + // Members for general wrapper support. + UpdateTemplateInfo info; +}; + +struct DescriptorSetLayoutWrapper : public HandleWrapper +{ + // Members for trimming state tracking. + std::vector binding_info; +}; + +struct DescriptorPoolWrapper; +struct DescriptorSetWrapper : public HandleWrapper +{ + // Members for general wrapper support. + // Pool from which set was allocated. The set must be removed from the pool's allocation list when destroyed. + DescriptorPoolWrapper* parent_pool{ nullptr }; + + // Members for trimming state tracking. + DeviceWrapper* device{ nullptr }; + + // Map for descriptor binding index to array of descriptor info. + std::unordered_map bindings; + + // Creation info for objects used to allocate the descriptor set, which may have been destroyed after descriptor set + // allocation. + vulkan_state_info::CreateDependencyInfo set_layout_dependency; +}; + +struct DescriptorPoolWrapper : public HandleWrapper +{ + // Members for general wrapper support. + // Track descriptor set info, which must be destroyed on descriptor pool reset. + std::unordered_map child_sets; +}; + +struct PipelineLayoutWrapper : public HandleWrapper +{ + // Creation info for objects used to create the pipeline layout, which may have been destroyed after pipeline layout + // creation. + std::shared_ptr layout_dependencies; +}; + +struct PipelineWrapper : public HandleWrapper +{ + // Creation info for objects used to create the pipeline, which may have been destroyed after pipeline creation. + std::vector shader_module_dependencies; + vulkan_state_info::CreateDependencyInfo render_pass_dependency; + vulkan_state_info::CreateDependencyInfo layout_dependency; + std::shared_ptr + layout_dependencies; // Shared with PipelineLayoutWrapper + + // Ray tracing pipeline's shader group handle data + format::HandleId device_id{ format::kNullHandleId }; + std::vector shader_group_handle_data; + vulkan_state_info::CreateDependencyInfo deferred_operation; + + // TODO: Base pipeline + // TODO: Pipeline cache + + VkPipelineBindPoint pipeline_bind_point; + std::unordered_map descriptor_sets; +}; + struct AccelerationStructureKHRWrapper; struct CommandPoolWrapper; struct CommandBufferWrapper : public HandleWrapper @@ -323,31 +395,8 @@ struct CommandBufferWrapper : public HandleWrapper uint32_t offset; }; std::vector> tlas_build_info_map; -}; - -struct PipelineLayoutWrapper : public HandleWrapper -{ - // Creation info for objects used to create the pipeline layout, which may have been destroyed after pipeline layout - // creation. - std::shared_ptr layout_dependencies; -}; - -struct PipelineWrapper : public HandleWrapper -{ - // Creation info for objects used to create the pipeline, which may have been destroyed after pipeline creation. - std::vector shader_module_dependencies; - vulkan_state_info::CreateDependencyInfo render_pass_dependency; - vulkan_state_info::CreateDependencyInfo layout_dependency; - std::shared_ptr - layout_dependencies; // Shared with PipelineLayoutWrapper - - // Ray tracing pipeline's shader group handle data - format::HandleId device_id{ format::kNullHandleId }; - std::vector shader_group_handle_data; - vulkan_state_info::CreateDependencyInfo deferred_operation; - // TODO: Base pipeline - // TODO: Pipeline cache + const PipelineWrapper* bound_pipeline{ nullptr }; }; struct DeferredOperationKHRWrapper : public HandleWrapper @@ -363,43 +412,6 @@ struct DeferredOperationKHRWrapper : public HandleWrapper -{ - // Members for general wrapper support. - UpdateTemplateInfo info; -}; - -struct DescriptorSetLayoutWrapper : public HandleWrapper -{ - // Members for trimming state tracking. - std::vector binding_info; -}; - -struct DescriptorPoolWrapper; -struct DescriptorSetWrapper : public HandleWrapper -{ - // Members for general wrapper support. - // Pool from which set was allocated. The set must be removed from the pool's allocation list when destroyed. - DescriptorPoolWrapper* parent_pool{ nullptr }; - - // Members for trimming state tracking. - DeviceWrapper* device{ nullptr }; - - // Map for descriptor binding index to array of descriptor info. - std::unordered_map bindings; - - // Creation info for objects used to allocate the descriptor set, which may have been destroyed after descriptor set - // allocation. - vulkan_state_info::CreateDependencyInfo set_layout_dependency; -}; - -struct DescriptorPoolWrapper : public HandleWrapper -{ - // Members for general wrapper support. - // Track descriptor set info, which must be destroyed on descriptor pool reset. - std::unordered_map child_sets; -}; - struct CommandPoolWrapper : public HandleWrapper { // Members for general wrapper support. diff --git a/framework/encode/vulkan_state_info.h b/framework/encode/vulkan_state_info.h index d0337c2287..6a7123da8b 100644 --- a/framework/encode/vulkan_state_info.h +++ b/framework/encode/vulkan_state_info.h @@ -83,6 +83,32 @@ struct DescriptorInfo std::unique_ptr mutable_type; }; +struct ShaderReflectionDescriptorInfo +{ + ShaderReflectionDescriptorInfo( + VkDescriptorType type, bool readonly, uint32_t accessed, uint32_t count, bool is_array) : + type(type), + readonly(readonly), accessed(accessed), count(count), is_array(is_array) + {} + + ShaderReflectionDescriptorInfo(const ShaderReflectionDescriptorInfo& other) : + type(other.type), readonly(other.readonly), accessed(other.accessed), count(other.count), + is_array(other.is_array) + {} + + VkDescriptorType type; + bool readonly; + uint32_t accessed; + uint32_t count; + bool is_array; +}; + +// One entry per descriptor binding +using ShaderReflectionDescriptorSetInfo = std::unordered_map; + +// One entry per descriptor set +using ShaderReflectionDescriptorSetsInfos = std::unordered_map; + struct CreateDependencyInfo { format::HandleId handle_id{ format::kNullHandleId }; diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index 3b30f1a2f0..1e32a0fc3a 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -22,13 +22,16 @@ #include "encode/vulkan_state_tracker.h" +#include "encode/vulkan_handle_wrappers.h" #include "encode/vulkan_state_info.h" #include "encode/custom_vulkan_struct_handle_wrappers.h" #include "encode/vulkan_handle_wrapper_util.h" #include "encode/vulkan_track_struct.h" #include "graphics/vulkan_struct_get_pnext.h" +#include "vulkan/vulkan_core.h" #include +#include GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(encode) @@ -1859,5 +1862,426 @@ void VulkanStateTracker::TrackTlasToBlasDependencies(uint32_t comm } } +void VulkanStateTracker::TrackCmdBindDescriptorSets(VkCommandBuffer commandBuffer, + VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, + uint32_t firstSet, + uint32_t descriptorSetCount, + const VkDescriptorSet* pDescriptorSets, + uint32_t dynamicOffsetCount, + const uint32_t* pDynamicOffsets) +{ + if (pDescriptorSets != nullptr) + { + for (uint32_t i = 0; i < descriptorSetCount; ++i) + { + vulkan_wrappers::DescriptorSetWrapper* desc_wrapper = + vulkan_wrappers::GetWrapper(pDescriptorSets[i]); + + for (auto& binding : desc_wrapper->bindings) + { + switch (binding.second.type) + { + case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE: + { + assert(binding.second.count); + assert(binding.second.storage_images); + + for (uint32_t si = 0; si < binding.second.count; ++si) + { + const vulkan_wrappers::ImageViewWrapper* img_view_wrapper = + vulkan_wrappers::GetWrapper( + binding.second.storage_images[si].imageView); + assert(img_view_wrapper != nullptr); + + vulkan_wrappers::ImageWrapper* img_wrapper = img_view_wrapper->image; + img_wrapper->dirty = true; + } + } + break; + + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: + { + assert(binding.second.count); + assert(binding.second.storage_buffers); + + for (uint32_t sb = 0; sb < binding.second.count; ++sb) + { + vulkan_wrappers::BufferWrapper* buffer_wrapper = + vulkan_wrappers::GetWrapper( + binding.second.storage_buffers[sb].buffer); + assert(buffer_wrapper != nullptr); + + buffer_wrapper->dirty = true; + } + } + break; + + case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER: + { + assert(binding.second.count); + assert(binding.second.storage_texel_buffer_views); + + for (uint32_t stb = 0; stb < binding.second.count; ++stb) + { + const vulkan_wrappers::BufferViewWrapper* buffer_view_wrapper = + vulkan_wrappers::GetWrapper( + binding.second.storage_texel_buffer_views[stb]); + assert(buffer_view_wrapper != nullptr); + + vulkan_wrappers::BufferWrapper* buffer_wrapper = buffer_view_wrapper->buffer; + buffer_wrapper->dirty = true; + } + } + break; + + default: + break; + } + } + } + } +} + +void VulkanStateTracker::TrackCmdBindDescriptorSets2KHR(VkCommandBuffer commandBuffer, + const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo) +{ + if (pBindDescriptorSetsInfo != nullptr && pBindDescriptorSetsInfo->pDescriptorSets != nullptr) + { + for (uint32_t i = 0; i < pBindDescriptorSetsInfo->descriptorSetCount; ++i) + { + vulkan_wrappers::DescriptorSetWrapper* desc_wrapper = + vulkan_wrappers::GetWrapper( + pBindDescriptorSetsInfo->pDescriptorSets[i]); + + for (auto& binding : desc_wrapper->bindings) + { + switch (binding.second.type) + { + case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE: + { + assert(binding.second.count); + assert(binding.second.storage_images); + + for (uint32_t si = 0; si < binding.second.count; ++si) + { + const vulkan_wrappers::ImageViewWrapper* img_view_wrapper = + vulkan_wrappers::GetWrapper( + binding.second.storage_images[si].imageView); + assert(img_view_wrapper != nullptr); + + vulkan_wrappers::ImageWrapper* img_wrapper = img_view_wrapper->image; + img_wrapper->dirty = true; + } + } + break; + + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: + { + assert(binding.second.count); + assert(binding.second.storage_buffers); + + for (uint32_t sb = 0; sb < binding.second.count; ++sb) + { + vulkan_wrappers::BufferWrapper* buffer_wrapper = + vulkan_wrappers::GetWrapper( + binding.second.storage_buffers[sb].buffer); + assert(buffer_wrapper != nullptr); + + buffer_wrapper->dirty = true; + } + } + break; + + case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER: + { + assert(binding.second.count); + assert(binding.second.storage_texel_buffer_views); + + for (uint32_t stb = 0; stb < binding.second.count; ++stb) + { + const vulkan_wrappers::BufferViewWrapper* buffer_view_wrapper = + vulkan_wrappers::GetWrapper( + binding.second.storage_texel_buffer_views[stb]); + assert(buffer_view_wrapper != nullptr); + + vulkan_wrappers::BufferWrapper* buffer_wrapper = buffer_view_wrapper->buffer; + buffer_wrapper->dirty = true; + } + } + break; + + default: + break; + } + } + } + } +} + +void VulkanStateTracker::TrackCmdCopyBuffer(VkCommandBuffer commandBuffer, + VkBuffer srcBuffer, + VkBuffer dstBuffer, + uint32_t regionCount, + const VkBufferCopy* pRegions) +{ + if (dstBuffer != VK_NULL_HANDLE) + { + vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = + vulkan_wrappers::GetWrapper(dstBuffer); + assert(dst_buffer_wrapper != nullptr); + + dst_buffer_wrapper->dirty = true; + } +} + +void VulkanStateTracker::TrackCmdCopyImage(VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkImageCopy* pRegions) +{ + if (dstImage != VK_NULL_HANDLE) + { + vulkan_wrappers::ImageWrapper* dst_img_wrapper = + vulkan_wrappers::GetWrapper(dstImage); + assert(dst_img_wrapper != nullptr); + + dst_img_wrapper->dirty = true; + } +} + +void VulkanStateTracker::TrackCmdCopyBufferToImage(VkCommandBuffer commandBuffer, + VkBuffer srcBuffer, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkBufferImageCopy* pRegions) +{ + if (dstImage != nullptr) + { + vulkan_wrappers::ImageWrapper* dst_img_wrapper = + vulkan_wrappers::GetWrapper(dstImage); + assert(dst_img_wrapper != nullptr); + + dst_img_wrapper->dirty = true; + } +} + +void VulkanStateTracker::TrackCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkBuffer dstBuffer, + uint32_t regionCount, + const VkBufferImageCopy* pRegions) +{ + if (dstBuffer != VK_NULL_HANDLE) + { + vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = + vulkan_wrappers::GetWrapper(dstBuffer); + assert(dst_buffer_wrapper != nullptr); + + dst_buffer_wrapper->dirty = true; + } +} + +void VulkanStateTracker::TrackCmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) +{ + if (pCopyBufferInfo != nullptr && pCopyBufferInfo->dstBuffer != VK_NULL_HANDLE) + { + vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = + vulkan_wrappers::GetWrapper(pCopyBufferInfo->dstBuffer); + assert(dst_buffer_wrapper != nullptr); + + dst_buffer_wrapper->dirty = true; + } +} + +void VulkanStateTracker::TrackCmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) +{ + if (pCopyImageInfo != nullptr && pCopyImageInfo->dstImage != VK_NULL_HANDLE) + { + vulkan_wrappers::ImageWrapper* dst_img_wrapper = + vulkan_wrappers::GetWrapper(pCopyImageInfo->dstImage); + assert(dst_img_wrapper != nullptr); + + dst_img_wrapper->dirty = true; + } +} + +void VulkanStateTracker::TrackCmdCopyBufferToImage2(VkCommandBuffer commandBuffer, + const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) +{ + if (pCopyBufferToImageInfo != nullptr && pCopyBufferToImageInfo->dstImage != VK_NULL_HANDLE) + { + vulkan_wrappers::ImageWrapper* dst_img_wrapper = + vulkan_wrappers::GetWrapper(pCopyBufferToImageInfo->dstImage); + assert(dst_img_wrapper != nullptr); + + dst_img_wrapper->dirty = true; + } +} + +void VulkanStateTracker::TrackCmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, + const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) +{ + if (pCopyImageToBufferInfo != nullptr && pCopyImageToBufferInfo->dstBuffer != VK_NULL_HANDLE) + { + vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = + vulkan_wrappers::GetWrapper(pCopyImageToBufferInfo->dstBuffer); + assert(dst_buffer_wrapper != nullptr); + + dst_buffer_wrapper->dirty = true; + } +} + +void VulkanStateTracker::TrackCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) +{ + if (pCopyBufferInfo != nullptr && pCopyBufferInfo->dstBuffer != VK_NULL_HANDLE) + { + vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = + vulkan_wrappers::GetWrapper(pCopyBufferInfo->dstBuffer); + assert(dst_buffer_wrapper != nullptr); + + dst_buffer_wrapper->dirty = true; + } +} + +void VulkanStateTracker::TrackCmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) +{ + if (pCopyImageInfo != nullptr && pCopyImageInfo->dstImage != VK_NULL_HANDLE) + { + vulkan_wrappers::ImageWrapper* dst_img_wrapper = + vulkan_wrappers::GetWrapper(pCopyImageInfo->dstImage); + assert(dst_img_wrapper != nullptr); + + dst_img_wrapper->dirty = true; + } +} + +void VulkanStateTracker::TrackCmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer, + const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) +{ + if (pCopyBufferToImageInfo != nullptr && pCopyBufferToImageInfo->dstImage != VK_NULL_HANDLE) + { + vulkan_wrappers::ImageWrapper* dst_img_wrapper = + vulkan_wrappers::GetWrapper(pCopyBufferToImageInfo->dstImage); + assert(dst_img_wrapper != nullptr); + + dst_img_wrapper->dirty = true; + } +} + +void VulkanStateTracker::TrackCmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer, + const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) +{ + if (pCopyImageToBufferInfo != nullptr && pCopyImageToBufferInfo->dstBuffer != VK_NULL_HANDLE) + { + vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = + vulkan_wrappers::GetWrapper(pCopyImageToBufferInfo->dstBuffer); + assert(dst_buffer_wrapper != nullptr); + + dst_buffer_wrapper->dirty = true; + } +} + +void VulkanStateTracker::TrackCmdBlitImage(VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkImageBlit* pRegions, + VkFilter filter) +{ + if (dstImage != VK_NULL_HANDLE) + { + vulkan_wrappers::ImageWrapper* dst_img_wrapper = + vulkan_wrappers::GetWrapper(dstImage); + assert(dst_img_wrapper != nullptr); + + dst_img_wrapper->dirty = true; + } +} + +void VulkanStateTracker::TrackCmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo) +{ + if (pBlitImageInfo != nullptr && pBlitImageInfo->dstImage != VK_NULL_HANDLE) + { + vulkan_wrappers::ImageWrapper* dst_img_wrapper = + vulkan_wrappers::GetWrapper(pBlitImageInfo->dstImage); + assert(dst_img_wrapper != nullptr); + + dst_img_wrapper->dirty = true; + } +} + +void VulkanStateTracker::TrackCmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo) +{ + TrackCmdBlitImage2(commandBuffer, pBlitImageInfo); +} + +void VulkanStateTracker::TrackCmdUpdateBuffer( + VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData) +{ + if (dstBuffer != VK_NULL_HANDLE) + { + vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = + vulkan_wrappers::GetWrapper(dstBuffer); + assert(dst_buffer_wrapper != nullptr); + + dst_buffer_wrapper->dirty = true; + } +} + +void VulkanStateTracker::TrackCmdFillBuffer( + VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data) +{ + if (dstBuffer != VK_NULL_HANDLE) + { + vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = + vulkan_wrappers::GetWrapper(dstBuffer); + assert(dst_buffer_wrapper != nullptr); + + dst_buffer_wrapper->dirty = true; + } +} + +void VulkanStateTracker::TrackCmdClearColorImage(VkCommandBuffer commandBuffer, + VkImage image, + VkImageLayout imageLayout, + const VkClearColorValue* pColor, + uint32_t rangeCount, + const VkImageSubresourceRange* pRanges) +{ + if (image != VK_NULL_HANDLE) + { + vulkan_wrappers::ImageWrapper* img_wrapper = vulkan_wrappers::GetWrapper(image); + assert(img_wrapper != nullptr); + + img_wrapper->dirty = true; + } +} + +void VulkanStateTracker::TrackCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, + VkImage image, + VkImageLayout imageLayout, + const VkClearDepthStencilValue* pDepthStencil, + uint32_t rangeCount, + const VkImageSubresourceRange* pRanges) +{ + if (image != VK_NULL_HANDLE) + { + vulkan_wrappers::ImageWrapper* img_wrapper = vulkan_wrappers::GetWrapper(image); + assert(img_wrapper != nullptr); + + img_wrapper->dirty = true; + } +} + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/vulkan_state_tracker.h b/framework/encode/vulkan_state_tracker.h index 768602f3a3..e3a88c3286 100644 --- a/framework/encode/vulkan_state_tracker.h +++ b/framework/encode/vulkan_state_tracker.h @@ -411,6 +411,102 @@ class VulkanStateTracker void TrackTlasToBlasDependencies(uint32_t command_buffer_count, const VkCommandBuffer* command_buffers); + void TrackCmdBindDescriptorSets(VkCommandBuffer commandBuffer, + VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, + uint32_t firstSet, + uint32_t descriptorSetCount, + const VkDescriptorSet* pDescriptorSets, + uint32_t dynamicOffsetCount, + const uint32_t* pDynamicOffsets); + + void TrackCmdBindDescriptorSets2KHR(VkCommandBuffer commandBuffer, + const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo); + + void TrackCmdCopyBuffer(VkCommandBuffer commandBuffer, + VkBuffer srcBuffer, + VkBuffer dstBuffer, + uint32_t regionCount, + const VkBufferCopy* pRegions); + + void TrackCmdCopyImage(VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkImageCopy* pRegions); + + void TrackCmdCopyBufferToImage(VkCommandBuffer commandBuffer, + VkBuffer srcBuffer, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkBufferImageCopy* pRegions); + + void TrackCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkBuffer dstBuffer, + uint32_t regionCount, + const VkBufferImageCopy* pRegions); + + void TrackCmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo); + + void TrackCmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo); + + void TrackCmdCopyBufferToImage2(VkCommandBuffer commandBuffer, + const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo); + + void TrackCmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, + const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo); + + void TrackCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo); + + void TrackCmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo); + + void TrackCmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer, + const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo); + + void TrackCmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer, + const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo); + + void TrackCmdBlitImage(VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkImageBlit* pRegions, + VkFilter filter); + + void TrackCmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo); + + void TrackCmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo); + + void TrackCmdUpdateBuffer(VkCommandBuffer commandBuffer, + VkBuffer dstBuffer, + VkDeviceSize dstOffset, + VkDeviceSize dataSize, + const void* pData); + + void TrackCmdFillBuffer( + VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data); + + void TrackCmdClearColorImage(VkCommandBuffer commandBuffer, + VkImage image, + VkImageLayout imageLayout, + const VkClearColorValue* pColor, + uint32_t rangeCount, + const VkImageSubresourceRange* pRanges); + + void TrackCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, + VkImage image, + VkImageLayout imageLayout, + const VkClearDepthStencilValue* pDepthStencil, + uint32_t rangeCount, + const VkImageSubresourceRange* pRanges); + private: template void AddGroupHandles(ParentHandle parent_handle, diff --git a/framework/encode/vulkan_state_tracker_initializers.h b/framework/encode/vulkan_state_tracker_initializers.h index 3847482795..98f5433375 100644 --- a/framework/encode/vulkan_state_tracker_initializers.h +++ b/framework/encode/vulkan_state_tracker_initializers.h @@ -725,6 +725,7 @@ inline void InitializeStatecreate_parameters = std::move(create_parameters); auto buffer = vulkan_wrappers::GetWrapper(create_info->buffer); + wrapper->buffer = buffer; wrapper->buffer_id = buffer->handle_id; } diff --git a/framework/util/spirv_parsing_util.cpp b/framework/util/spirv_parsing_util.cpp index 5e150e4804..26f53cecfe 100644 --- a/framework/util/spirv_parsing_util.cpp +++ b/framework/util/spirv_parsing_util.cpp @@ -498,5 +498,106 @@ std::vector SpirVParsingUtil::GetBufferRe return ret; } +static VkDescriptorType SpvReflectToVkDescriptorType(SpvReflectDescriptorType type) +{ + switch (type) + { + case SPV_REFLECT_DESCRIPTOR_TYPE_SAMPLER: + return VK_DESCRIPTOR_TYPE_SAMPLER; + + case SPV_REFLECT_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER: + return VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; + + case SPV_REFLECT_DESCRIPTOR_TYPE_SAMPLED_IMAGE: + return VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE; + + case SPV_REFLECT_DESCRIPTOR_TYPE_STORAGE_IMAGE: + return VK_DESCRIPTOR_TYPE_STORAGE_IMAGE; + + case SPV_REFLECT_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER: + return VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER; + + case SPV_REFLECT_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER: + return VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER; + + case SPV_REFLECT_DESCRIPTOR_TYPE_UNIFORM_BUFFER: + return VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; + + case SPV_REFLECT_DESCRIPTOR_TYPE_STORAGE_BUFFER: + return VK_DESCRIPTOR_TYPE_STORAGE_BUFFER; + + case SPV_REFLECT_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC: + return VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC; + + case SPV_REFLECT_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: + return VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC; + + case SPV_REFLECT_DESCRIPTOR_TYPE_INPUT_ATTACHMENT: + return VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT; + + case SPV_REFLECT_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR: + return VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR; + + default: + GFXRECON_LOG_WARNING("%s(): Unrecognised SPIRV-Reflect descriptor type"); + assert(0); + return VK_DESCRIPTOR_TYPE_MAX_ENUM; + } +} + +bool SpirVParsingUtil::SPIRVReflectPerformReflectionOnShaderModule( + size_t spirv_size, + const uint32_t* spirv_code, + encode::vulkan_state_info::ShaderReflectionDescriptorSetsInfos& shader_reflection) +{ + assert(spirv_size); + assert(spirv_code != nullptr); + + spv_reflect::ShaderModule reflection(spirv_size, spirv_code); + if (reflection.GetResult() != SPV_REFLECT_RESULT_SUCCESS) + { + GFXRECON_LOG_WARNING("Could not generate reflection data about shader module") + assert(0); + return false; + } + + // Scan shader descriptor bindings + uint32_t count = 0; + SpvReflectResult result = reflection.EnumerateDescriptorBindings(&count, nullptr); + if (result != SPV_REFLECT_RESULT_SUCCESS) + { + // GFXRECON_LOG_ERROR("Shader reflection on shader %" PRIu64 " failed", shader_info->capture_id); + assert(0); + return false; + } + + if (count) + { + std::vector bindings(count, nullptr); + result = reflection.EnumerateDescriptorBindings(&count, bindings.data()); + if (result != SPV_REFLECT_RESULT_SUCCESS) + { + // GFXRECON_LOG_ERROR("Shader reflection on shader %" PRIu64 " failed", shader_info->capture_id); + assert(0); + return false; + } + + for (const auto binding : bindings) + { + VkDescriptorType type = SpvReflectToVkDescriptorType(binding->descriptor_type); + bool readonly = ((binding->decoration_flags & SPV_REFLECT_DECORATION_NON_WRITABLE) == + SPV_REFLECT_DECORATION_NON_WRITABLE); + const uint32_t count = binding->count; + const bool is_array = binding->array.dims_count > 0; + + shader_reflection[binding->set].emplace(binding->binding, + encode::vulkan_state_info::ShaderReflectionDescriptorInfo( + type, readonly, binding->accessed, count, is_array)); + } + } + + return true; +} + GFXRECON_END_NAMESPACE(util) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/util/spirv_parsing_util.h b/framework/util/spirv_parsing_util.h index 2229497229..d60d92d8f6 100644 --- a/framework/util/spirv_parsing_util.h +++ b/framework/util/spirv_parsing_util.h @@ -29,6 +29,7 @@ #include #include "util/defines.h" +#include "encode/vulkan_state_info.h" GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(util) @@ -51,6 +52,11 @@ class SpirVParsingUtil [[nodiscard]] std::vector GetBufferReferenceInfos() const; + bool SPIRVReflectPerformReflectionOnShaderModule( + size_t spirv_size, + const uint32_t* spirv_code, + encode::vulkan_state_info::ShaderReflectionDescriptorSetsInfos& reflection); + private: class Instruction; From 66700a3ddf0d74eab111334b81522936d94ef62d Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Fri, 12 Jul 2024 15:22:35 +0300 Subject: [PATCH 03/99] State writer checks for dirty flag before dumping and prints statistics --- framework/encode/vulkan_state_writer.cpp | 423 ++++++++++++++--------- framework/encode/vulkan_state_writer.h | 8 +- 2 files changed, 257 insertions(+), 174 deletions(-) diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index 7e632a2da5..e28178c4d9 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -24,6 +24,7 @@ #include "encode/vulkan_state_writer.h" #include "encode/struct_pointer_encoder.h" +#include "encode/vulkan_handle_wrappers.h" #include "encode/vulkan_state_info.h" #include "format/format_util.h" #include "util/logging.h" @@ -1558,86 +1559,102 @@ void VulkanStateWriter::ProcessImageMemory(const vulkan_wrappers::DeviceWrapper* void VulkanStateWriter::WriteBufferMemoryState(const VulkanStateTable& state_table, DeviceResourceTables* resources, VkDeviceSize* max_resource_size, - VkDeviceSize* max_staging_copy_size) + VkDeviceSize* max_staging_copy_size, + size_t& dumped_bytes, + size_t& skipped_bytes) { assert((resources != nullptr) && (max_resource_size != nullptr) && (max_staging_copy_size != nullptr)); - state_table.VisitWrappers([&](const vulkan_wrappers::BufferWrapper* wrapper) { - assert(wrapper != nullptr); + dumped_bytes = 0; + skipped_bytes = 0; - // Perform memory binding. - const vulkan_wrappers::DeviceMemoryWrapper* memory_wrapper = - state_table.GetDeviceMemoryWrapper(wrapper->bind_memory_id); + state_table.VisitWrappers([&](vulkan_wrappers::BufferWrapper* wrapper) { + assert(wrapper != nullptr); - if (memory_wrapper != nullptr) + if (wrapper->dirty) { - const vulkan_wrappers::DeviceWrapper* device_wrapper = wrapper->bind_device; - const VulkanDeviceTable* device_table = &device_wrapper->layer_table; + wrapper->dirty = false; - assert((device_wrapper != nullptr) && (device_table != nullptr)); + // Perform memory binding. + const vulkan_wrappers::DeviceMemoryWrapper* memory_wrapper = + state_table.GetDeviceMemoryWrapper(wrapper->bind_memory_id); - // Write memory requirements query before bind command. - VkMemoryRequirements memory_requirements; + if (memory_wrapper != nullptr) + { + const vulkan_wrappers::DeviceWrapper* device_wrapper = wrapper->bind_device; + const VulkanDeviceTable* device_table = &device_wrapper->layer_table; - device_table->GetBufferMemoryRequirements(device_wrapper->handle, wrapper->handle, &memory_requirements); + assert((device_wrapper != nullptr) && (device_table != nullptr)); - encoder_.EncodeHandleIdValue(device_wrapper->handle_id); - encoder_.EncodeHandleIdValue(wrapper->handle_id); - EncodeStructPtr(&encoder_, &memory_requirements); + // Write memory requirements query before bind command. + VkMemoryRequirements memory_requirements; - WriteFunctionCall(format::ApiCall_vkGetBufferMemoryRequirements, ¶meter_stream_); - parameter_stream_.Clear(); + device_table->GetBufferMemoryRequirements( + device_wrapper->handle, wrapper->handle, &memory_requirements); - // Write memory bind command. - if (wrapper->bind_pnext == nullptr) - { encoder_.EncodeHandleIdValue(device_wrapper->handle_id); encoder_.EncodeHandleIdValue(wrapper->handle_id); - encoder_.EncodeHandleIdValue(memory_wrapper->handle_id); - encoder_.EncodeUInt64Value(wrapper->bind_offset); - encoder_.EncodeEnumValue(VK_SUCCESS); + EncodeStructPtr(&encoder_, &memory_requirements); - WriteFunctionCall(format::ApiCall_vkBindBufferMemory, ¶meter_stream_); - } - else - { - encoder_.EncodeHandleIdValue(device_wrapper->handle_id); - encoder_.EncodeUInt32Value(1); - - VkBindBufferMemoryInfo info = {}; - info.sType = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO; - info.pNext = wrapper->bind_pnext; - info.buffer = wrapper->handle; - info.memory = memory_wrapper->handle; - info.memoryOffset = wrapper->bind_offset; - EncodeStructArray(&encoder_, &info, 1); - encoder_.EncodeEnumValue(VK_SUCCESS); + WriteFunctionCall(format::ApiCall_vkGetBufferMemoryRequirements, ¶meter_stream_); + parameter_stream_.Clear(); - WriteFunctionCall(format::ApiCall_vkBindBufferMemory2, ¶meter_stream_); - } - parameter_stream_.Clear(); + // Write memory bind command. + if (wrapper->bind_pnext == nullptr) + { + encoder_.EncodeHandleIdValue(device_wrapper->handle_id); + encoder_.EncodeHandleIdValue(wrapper->handle_id); + encoder_.EncodeHandleIdValue(memory_wrapper->handle_id); + encoder_.EncodeUInt64Value(wrapper->bind_offset); + encoder_.EncodeEnumValue(VK_SUCCESS); - // Group buffers with memory bindings by device for memory snapshot. - ResourceSnapshotQueueFamilyTable& snapshot_table = (*resources)[device_wrapper]; - ResourceSnapshotInfo& snapshot_entry = snapshot_table[wrapper->queue_family_index]; + WriteFunctionCall(format::ApiCall_vkBindBufferMemory, ¶meter_stream_); + } + else + { + encoder_.EncodeHandleIdValue(device_wrapper->handle_id); + encoder_.EncodeUInt32Value(1); + + VkBindBufferMemoryInfo info = {}; + info.sType = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO; + info.pNext = wrapper->bind_pnext; + info.buffer = wrapper->handle; + info.memory = memory_wrapper->handle; + info.memoryOffset = wrapper->bind_offset; + EncodeStructArray(&encoder_, &info, 1); + encoder_.EncodeEnumValue(VK_SUCCESS); + + WriteFunctionCall(format::ApiCall_vkBindBufferMemory2, ¶meter_stream_); + } + parameter_stream_.Clear(); - BufferSnapshotInfo snapshot_info; - snapshot_info.buffer_wrapper = wrapper; - snapshot_info.memory_wrapper = memory_wrapper; - snapshot_info.memory_properties = GetMemoryProperties(device_wrapper, memory_wrapper); - snapshot_info.need_staging_copy = !IsBufferReadable(snapshot_info.memory_properties, memory_wrapper); + // Group buffers with memory bindings by device for memory snapshot. + ResourceSnapshotQueueFamilyTable& snapshot_table = (*resources)[device_wrapper]; + ResourceSnapshotInfo& snapshot_entry = snapshot_table[wrapper->queue_family_index]; - if ((*max_resource_size) < wrapper->created_size) - { - (*max_resource_size) = wrapper->created_size; - } + BufferSnapshotInfo snapshot_info; + snapshot_info.buffer_wrapper = wrapper; + snapshot_info.memory_wrapper = memory_wrapper; + snapshot_info.memory_properties = GetMemoryProperties(device_wrapper, memory_wrapper); + snapshot_info.need_staging_copy = !IsBufferReadable(snapshot_info.memory_properties, memory_wrapper); - if (snapshot_info.need_staging_copy && ((*max_staging_copy_size) < wrapper->created_size)) - { - (*max_staging_copy_size) = wrapper->created_size; - } + if ((*max_resource_size) < wrapper->created_size) + { + (*max_resource_size) = wrapper->created_size; + } + + if (snapshot_info.need_staging_copy && ((*max_staging_copy_size) < wrapper->created_size)) + { + (*max_staging_copy_size) = wrapper->created_size; + } - snapshot_entry.buffers.emplace_back(snapshot_info); + snapshot_entry.buffers.emplace_back(snapshot_info); + dumped_bytes += wrapper->created_size; + } + } + else + { + skipped_bytes += wrapper->created_size; } }); } @@ -1645,155 +1662,202 @@ void VulkanStateWriter::WriteBufferMemoryState(const VulkanStateTable& state_tab void VulkanStateWriter::WriteImageMemoryState(const VulkanStateTable& state_table, DeviceResourceTables* resources, VkDeviceSize* max_resource_size, - VkDeviceSize* max_staging_copy_size) + VkDeviceSize* max_staging_copy_size, + size_t& dumped_bytes, + size_t& skipped_bytes) { assert((resources != nullptr) && (max_resource_size != nullptr) && (max_staging_copy_size != nullptr)); - state_table.VisitWrappers([&](const vulkan_wrappers::ImageWrapper* wrapper) { + dumped_bytes = 0; + skipped_bytes = 0; + + state_table.VisitWrappers([&](vulkan_wrappers::ImageWrapper* wrapper) { assert(wrapper != nullptr); // Perform memory binding. const vulkan_wrappers::DeviceMemoryWrapper* memory_wrapper = state_table.GetDeviceMemoryWrapper(wrapper->bind_memory_id); - if ((wrapper->is_swapchain_image && memory_wrapper == nullptr && wrapper->bind_device != nullptr) || - (!wrapper->is_swapchain_image && memory_wrapper != nullptr)) + if (wrapper->dirty) { - const vulkan_wrappers::DeviceWrapper* device_wrapper = wrapper->bind_device; - const VulkanDeviceTable* device_table = &device_wrapper->layer_table; + wrapper->dirty = false; - assert((device_wrapper != nullptr) && (device_table != nullptr)); + if ((wrapper->is_swapchain_image && memory_wrapper == nullptr && wrapper->bind_device != nullptr) || + (!wrapper->is_swapchain_image && memory_wrapper != nullptr)) + { + const vulkan_wrappers::DeviceWrapper* device_wrapper = wrapper->bind_device; + const VulkanDeviceTable* device_table = &device_wrapper->layer_table; - // Write memory requirements query before bind command. - VkMemoryRequirements memory_requirements; + assert((device_wrapper != nullptr) && (device_table != nullptr)); - device_table->GetImageMemoryRequirements(device_wrapper->handle, wrapper->handle, &memory_requirements); + // Write memory requirements query before bind command. + VkMemoryRequirements memory_requirements; - encoder_.EncodeHandleIdValue(device_wrapper->handle_id); - encoder_.EncodeHandleIdValue(wrapper->handle_id); - EncodeStructPtr(&encoder_, &memory_requirements); + device_table->GetImageMemoryRequirements(device_wrapper->handle, wrapper->handle, &memory_requirements); - WriteFunctionCall(format::ApiCall_vkGetImageMemoryRequirements, ¶meter_stream_); - parameter_stream_.Clear(); - - // Write memory bind command. - if (wrapper->bind_pnext == nullptr) - { encoder_.EncodeHandleIdValue(device_wrapper->handle_id); encoder_.EncodeHandleIdValue(wrapper->handle_id); - encoder_.EncodeHandleIdValue(memory_wrapper->handle_id); - encoder_.EncodeUInt64Value(wrapper->bind_offset); - encoder_.EncodeEnumValue(VK_SUCCESS); + EncodeStructPtr(&encoder_, &memory_requirements); - WriteFunctionCall(format::ApiCall_vkBindImageMemory, ¶meter_stream_); - } - else - { - encoder_.EncodeHandleIdValue(device_wrapper->handle_id); - encoder_.EncodeUInt32Value(1); - - VkBindImageMemoryInfo info = {}; - info.sType = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO; - info.pNext = wrapper->bind_pnext; - info.image = wrapper->handle; - info.memory = memory_wrapper->handle; - info.memoryOffset = wrapper->bind_offset; - EncodeStructArray(&encoder_, &info, 1); - encoder_.EncodeEnumValue(VK_SUCCESS); - - WriteFunctionCall(format::ApiCall_vkBindImageMemory2, ¶meter_stream_); - } - parameter_stream_.Clear(); - - VkMemoryPropertyFlags memory_properties = 0; - if (memory_wrapper != nullptr) - { - memory_properties = GetMemoryProperties(device_wrapper, memory_wrapper); - } + WriteFunctionCall(format::ApiCall_vkGetImageMemoryRequirements, ¶meter_stream_); + parameter_stream_.Clear(); - bool is_transitioned = (wrapper->current_layout != VK_IMAGE_LAYOUT_UNDEFINED) && - (wrapper->current_layout != VK_IMAGE_LAYOUT_PREINITIALIZED); - bool is_writable = - (wrapper->tiling == VK_IMAGE_TILING_LINEAR) && - ((memory_properties & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) == VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT); + // Write memory bind command. + if (wrapper->bind_pnext == nullptr) + { + encoder_.EncodeHandleIdValue(device_wrapper->handle_id); + encoder_.EncodeHandleIdValue(wrapper->handle_id); + encoder_.EncodeHandleIdValue(memory_wrapper->handle_id); + encoder_.EncodeUInt64Value(wrapper->bind_offset); + encoder_.EncodeEnumValue(VK_SUCCESS); - // If an image is not host writable and has not been transitioned from the undefined or preinitialized - // layouts, no data could have been loaded into it and its data will be omitted from the state snapshot. - if (is_transitioned || is_writable) - { - // Group images with memory bindings by device for memory snapshot. - ResourceSnapshotQueueFamilyTable& snapshot_table = (*resources)[device_wrapper]; - ResourceSnapshotInfo& snapshot_entry = snapshot_table[wrapper->queue_family_index]; - graphics::VulkanResourcesUtil resource_util(device_wrapper->handle, - device_wrapper->physical_device->handle, - device_wrapper->layer_table, - *device_wrapper->physical_device->layer_table_ref, - device_wrapper->physical_device->memory_properties); + WriteFunctionCall(format::ApiCall_vkBindImageMemory, ¶meter_stream_); + } + else + { + encoder_.EncodeHandleIdValue(device_wrapper->handle_id); + encoder_.EncodeUInt32Value(1); + + VkBindImageMemoryInfo info = {}; + info.sType = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO; + info.pNext = wrapper->bind_pnext; + info.image = wrapper->handle; + info.memory = memory_wrapper->handle; + info.memoryOffset = wrapper->bind_offset; + EncodeStructArray(&encoder_, &info, 1); + encoder_.EncodeEnumValue(VK_SUCCESS); + + WriteFunctionCall(format::ApiCall_vkBindImageMemory2, ¶meter_stream_); + } + parameter_stream_.Clear(); - bool need_staging_copy = !IsImageReadable(memory_properties, memory_wrapper, wrapper); + VkMemoryPropertyFlags memory_properties = 0; + if (memory_wrapper != nullptr) + { + memory_properties = GetMemoryProperties(device_wrapper, memory_wrapper); + } - std::vector aspects; - bool combined_depth_stencil; - graphics::GetFormatAspects(wrapper->format, &aspects, &combined_depth_stencil); + bool is_transitioned = (wrapper->current_layout != VK_IMAGE_LAYOUT_UNDEFINED) && + (wrapper->current_layout != VK_IMAGE_LAYOUT_PREINITIALIZED); + bool is_writable = + (wrapper->tiling == VK_IMAGE_TILING_LINEAR) && + ((memory_properties & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) == VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT); - for (auto aspect : aspects) + // If an image is not host writable and has not been transitioned from the undefined or preinitialized + // layouts, no data could have been loaded into it and its data will be omitted from the state snapshot. + if (is_transitioned || is_writable) { - ImageSnapshotInfo snapshot_info; - - snapshot_info.image_wrapper = wrapper; - snapshot_info.memory_wrapper = memory_wrapper; - snapshot_info.memory_properties = memory_properties; - snapshot_info.need_staging_copy = need_staging_copy; - snapshot_info.aspect = aspect; - - snapshot_info.resource_size = resource_util.GetImageResourceSizesOptimal(wrapper->handle, - wrapper->format, - wrapper->image_type, - wrapper->extent, - wrapper->mip_levels, - wrapper->array_layers, - wrapper->tiling, - aspect, - nullptr, - &snapshot_info.level_sizes, - true); - - if ((*max_resource_size) < snapshot_info.resource_size) + // Group images with memory bindings by device for memory snapshot. + ResourceSnapshotQueueFamilyTable& snapshot_table = (*resources)[device_wrapper]; + ResourceSnapshotInfo& snapshot_entry = snapshot_table[wrapper->queue_family_index]; + graphics::VulkanResourcesUtil resource_util(device_wrapper->handle, + device_wrapper->physical_device->handle, + device_wrapper->layer_table, + *device_wrapper->physical_device->layer_table_ref, + device_wrapper->physical_device->memory_properties); + + bool need_staging_copy = !IsImageReadable(memory_properties, memory_wrapper, wrapper); + + std::vector aspects; + bool combined_depth_stencil; + graphics::GetFormatAspects(wrapper->format, &aspects, &combined_depth_stencil); + + for (auto aspect : aspects) { - (*max_resource_size) = snapshot_info.resource_size; - } + ImageSnapshotInfo snapshot_info; + + snapshot_info.image_wrapper = wrapper; + snapshot_info.memory_wrapper = memory_wrapper; + snapshot_info.memory_properties = memory_properties; + snapshot_info.need_staging_copy = need_staging_copy; + snapshot_info.aspect = aspect; + + snapshot_info.resource_size = + resource_util.GetImageResourceSizesOptimal(wrapper->handle, + wrapper->format, + wrapper->image_type, + wrapper->extent, + wrapper->mip_levels, + wrapper->array_layers, + wrapper->tiling, + aspect, + nullptr, + &snapshot_info.level_sizes, + true); + + if ((*max_resource_size) < snapshot_info.resource_size) + { + (*max_resource_size) = snapshot_info.resource_size; + } - if (snapshot_info.need_staging_copy && ((*max_staging_copy_size) < snapshot_info.resource_size)) - { - (*max_staging_copy_size) = snapshot_info.resource_size; - } + if (snapshot_info.need_staging_copy && ((*max_staging_copy_size) < snapshot_info.resource_size)) + { + (*max_staging_copy_size) = snapshot_info.resource_size; + } - snapshot_entry.images.emplace_back(snapshot_info); + snapshot_entry.images.emplace_back(snapshot_info); - // Write image subresource layout queries for linear/host-visible images. - if (is_writable) - { - VkImageAspectFlags aspect_flags = aspect; + dumped_bytes += snapshot_info.resource_size; - if (!combined_depth_stencil) - { - WriteImageSubresourceLayouts(wrapper, aspect_flags); - } - else + // Write image subresource layout queries for linear/host-visible images. + if (is_writable) { - // Specify combined depth-stencil aspect flags for combined depth-stencil formats when - // processing the depth aspect, while skipping image subresource layout query for - // stencil aspect. - if (aspect == VK_IMAGE_ASPECT_DEPTH_BIT) + VkImageAspectFlags aspect_flags = aspect; + + if (!combined_depth_stencil) { - aspect_flags = graphics::GetFormatAspectMask(wrapper->format); WriteImageSubresourceLayouts(wrapper, aspect_flags); } + else + { + // Specify combined depth-stencil aspect flags for combined depth-stencil formats when + // processing the depth aspect, while skipping image subresource layout query for + // stencil aspect. + if (aspect == VK_IMAGE_ASPECT_DEPTH_BIT) + { + aspect_flags = graphics::GetFormatAspectMask(wrapper->format); + WriteImageSubresourceLayouts(wrapper, aspect_flags); + } + } } } } } } + else + { + if ((wrapper->is_swapchain_image && memory_wrapper == nullptr && wrapper->bind_device != nullptr) || + (!wrapper->is_swapchain_image && memory_wrapper != nullptr)) + { + + const vulkan_wrappers::DeviceWrapper* device_wrapper = wrapper->bind_device; + graphics::VulkanResourcesUtil resource_util(device_wrapper->handle, + device_wrapper->physical_device->handle, + device_wrapper->layer_table, + *device_wrapper->physical_device->layer_table_ref, + device_wrapper->physical_device->memory_properties); + + std::vector aspects; + bool combined_depth_stencil; + graphics::GetFormatAspects(wrapper->format, &aspects, &combined_depth_stencil); + + for (auto aspect : aspects) + { + std::vector level_sizes; + skipped_bytes += resource_util.GetImageResourceSizesOptimal(wrapper->handle, + wrapper->format, + wrapper->image_type, + wrapper->extent, + wrapper->mip_levels, + wrapper->array_layers, + wrapper->tiling, + aspect, + nullptr, + &level_sizes, + true); + } + } + } }); } @@ -1837,8 +1901,23 @@ void VulkanStateWriter::WriteResourceMemoryState(const VulkanStateTable& state_t VkDeviceSize max_resource_size = 0; VkDeviceSize max_staging_copy_size = 0; - WriteBufferMemoryState(state_table, &resources, &max_resource_size, &max_staging_copy_size); - WriteImageMemoryState(state_table, &resources, &max_resource_size, &max_staging_copy_size); + size_t buffer_bytes_dumped; + size_t buffer_bytes_skipped; + WriteBufferMemoryState( + state_table, &resources, &max_resource_size, &max_staging_copy_size, buffer_bytes_dumped, buffer_bytes_skipped); + + size_t image_bytes_dumped; + size_t image_bytes_skipped; + WriteImageMemoryState( + state_table, &resources, &max_resource_size, &max_staging_copy_size, image_bytes_dumped, image_bytes_skipped); + + GFXRECON_WRITE_CONSOLE("--------------------------------------") + GFXRECON_WRITE_CONSOLE("%s()", __func__) + GFXRECON_WRITE_CONSOLE(" buffer_bytes_dumped: %zu", buffer_bytes_dumped); + GFXRECON_WRITE_CONSOLE(" buffer_bytes_skipped: %zu", buffer_bytes_skipped); + GFXRECON_WRITE_CONSOLE(" image_bytes_dumped: %zu", image_bytes_dumped); + GFXRECON_WRITE_CONSOLE(" image_bytes_skipped: %zu", image_bytes_skipped); + GFXRECON_WRITE_CONSOLE("--------------------------------------") // Write resource memory content. for (const auto& resource_entry : resources) diff --git a/framework/encode/vulkan_state_writer.h b/framework/encode/vulkan_state_writer.h index 3a2dbc2065..0120ed7b22 100644 --- a/framework/encode/vulkan_state_writer.h +++ b/framework/encode/vulkan_state_writer.h @@ -156,12 +156,16 @@ class VulkanStateWriter void WriteBufferMemoryState(const VulkanStateTable& state_table, DeviceResourceTables* resources, VkDeviceSize* max_resource_size, - VkDeviceSize* max_staging_copy_size); + VkDeviceSize* max_staging_copy_size, + size_t& dumped_bytes, + size_t& skipped_bytes); void WriteImageMemoryState(const VulkanStateTable& state_table, DeviceResourceTables* resources, VkDeviceSize* max_resource_size, - VkDeviceSize* max_staging_copy_size); + VkDeviceSize* max_staging_copy_size, + size_t& dumped_bytes, + size_t& skipped_bytes); void WriteImageSubresourceLayouts(const vulkan_wrappers::ImageWrapper* image_wrapper, VkImageAspectFlags aspect_flags); From cae00838da2250cff3f2b57a5f5964a8bb69b113 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sun, 14 Jul 2024 08:44:42 +0300 Subject: [PATCH 04/99] Move asset tracking in command buffer --- .../encode/custom_vulkan_encoder_commands.h | 189 +++++ framework/encode/vulkan_capture_manager.cpp | 345 ++++++++- framework/encode/vulkan_capture_manager.h | 106 +++ framework/encode/vulkan_handle_wrappers.h | 72 +- framework/encode/vulkan_state_info.h | 113 ++- framework/encode/vulkan_state_tracker.cpp | 711 ++++++++++++++---- framework/encode/vulkan_state_tracker.h | 117 +++ .../vulkan_state_tracker_initializers.h | 7 + framework/util/page_guard_manager.cpp | 15 + framework/util/page_guard_manager.h | 2 + framework/util/page_status_tracker.h | 6 +- framework/util/spirv_parsing_util.cpp | 2 + 12 files changed, 1447 insertions(+), 238 deletions(-) diff --git a/framework/encode/custom_vulkan_encoder_commands.h b/framework/encode/custom_vulkan_encoder_commands.h index 2ec1bb5f80..919ec97482 100644 --- a/framework/encode/custom_vulkan_encoder_commands.h +++ b/framework/encode/custom_vulkan_encoder_commands.h @@ -1220,6 +1220,195 @@ struct CustomEncoderPostCall +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, VkResult result, Args... args) + { + manager->PostProcess_vkCreateRayTracingPipelinesKHR(result, args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdBindDescriptorSets(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdBindDescriptorSets2KHR(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdTraceRaysIndirect2KHR(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdTraceRaysIndirectKHR(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdTraceRaysNV(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdTraceRaysKHR(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdDispatch(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdDispatchIndirect(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdDispatchBase(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdDispatchBaseKHR(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdDraw(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdDrawIndexed(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdDrawIndirect(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdDrawIndexedIndirect(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdDrawIndirectCount(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdDrawIndexedIndirectCount(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdDrawIndirectCountKHR(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdDrawIndexedIndirectCountKHR(args...); + } +}; GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/vulkan_capture_manager.cpp b/framework/encode/vulkan_capture_manager.cpp index e3724e0b1b..c266a9b100 100644 --- a/framework/encode/vulkan_capture_manager.cpp +++ b/framework/encode/vulkan_capture_manager.cpp @@ -24,6 +24,7 @@ #include "encode/vulkan_handle_wrappers.h" #include "vulkan/vulkan_core.h" +#include #include PROJECT_VERSION_HEADER_FILE #include "encode/struct_pointer_encoder.h" @@ -2454,6 +2455,23 @@ void VulkanCaptureManager::PreProcess_vkQueueSubmit(VkQueue queue, GFXRECON_UNREFERENCED_PARAMETER(pSubmits); GFXRECON_UNREFERENCED_PARAMETER(fence); + // This must be done before QueueSubmitWriteFillMemoryCmd is called + // and tracked mapped memory regions are reseted + if (IsCaptureModeTrack()) + { + if (pSubmits) + { + for (uint32_t s = 0; s < submitCount; ++s) + { + for (uint32_t c = 0; c < pSubmits[s].commandBufferCount; ++c) + { + state_tracker_->TrackMappedAssetsWrites(pSubmits[s].pCommandBuffers[c]); + state_tracker_->MarkReferencedAssetsAsDirty(pSubmits[s].pCommandBuffers[c]); + } + } + } + } + QueueSubmitWriteFillMemoryCmd(); PreQueueSubmit(); @@ -2481,6 +2499,23 @@ void VulkanCaptureManager::PreProcess_vkQueueSubmit2(VkQueue queue, GFXRECON_UNREFERENCED_PARAMETER(pSubmits); GFXRECON_UNREFERENCED_PARAMETER(fence); + // This must be done before QueueSubmitWriteFillMemoryCmd is called + // and tracked mapped memory regions are reseted + if (IsCaptureModeTrack()) + { + if (pSubmits) + { + for (uint32_t s = 0; s < submitCount; ++s) + { + for (uint32_t c = 0; c < pSubmits[s].commandBufferInfoCount; ++c) + { + state_tracker_->TrackMappedAssetsWrites(pSubmits[s].pCommandBufferInfos[c].commandBuffer); + state_tracker_->MarkReferencedAssetsAsDirty(pSubmits[s].pCommandBufferInfos[c].commandBuffer); + } + } + } + } + QueueSubmitWriteFillMemoryCmd(); PreQueueSubmit(); @@ -2871,16 +2906,9 @@ void VulkanCaptureManager::PostProcess_vkCmdBindPipeline(VkCommandBuffer com VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) { - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); - if (cmd_buf_wrapper != nullptr) + if (IsCaptureModeTrack()) { - vulkan_wrappers::PipelineWrapper* ppl_wrapper = - vulkan_wrappers::GetWrapper(pipeline); - if (ppl_wrapper != nullptr) - { - cmd_buf_wrapper->bound_pipeline = ppl_wrapper; - } + state_tracker_->TrackCmdBindPipeline(commandBuffer, pipelineBindPoint, pipeline); } } @@ -2894,12 +2922,21 @@ void VulkanCaptureManager::PostProcess_vkCreateGraphicsPipelines(VkResult { if (result == VK_SUCCESS && createInfoCount && pPipelines != nullptr) { - for (uint32_t i = 0; i < createInfoCount; ++i) + for (uint32_t p = 0; p < createInfoCount; ++p) { vulkan_wrappers::PipelineWrapper* ppl_wrapper = - vulkan_wrappers::GetWrapper(pPipelines[i]); + vulkan_wrappers::GetWrapper(pPipelines[p]); assert(ppl_wrapper != nullptr); - ppl_wrapper->pipeline_bind_point = VK_PIPELINE_BIND_POINT_GRAPHICS; + + for (uint32_t s = 0; s < pCreateInfos[p].stageCount; ++s) + { + const vulkan_wrappers::ShaderModuleWrapper* shader_wrapper = + vulkan_wrappers::GetWrapper( + pCreateInfos[p].pStages[s].module); + assert(shader_wrapper != nullptr); + + ppl_wrapper->bound_shaders.push_back(*shader_wrapper); + } } } } @@ -2914,16 +2951,294 @@ void VulkanCaptureManager::PostProcess_vkCreateComputePipelines(VkResult { if (result == VK_SUCCESS && createInfoCount && pPipelines != nullptr) { - for (uint32_t i = 0; i < createInfoCount; ++i) + for (uint32_t p = 0; p < createInfoCount; ++p) { vulkan_wrappers::PipelineWrapper* ppl_wrapper = - vulkan_wrappers::GetWrapper(pPipelines[i]); + vulkan_wrappers::GetWrapper(pPipelines[p]); assert(ppl_wrapper != nullptr); - ppl_wrapper->pipeline_bind_point = VK_PIPELINE_BIND_POINT_COMPUTE; + + const vulkan_wrappers::ShaderModuleWrapper* shader_wrapper = + vulkan_wrappers::GetWrapper(pCreateInfos[p].stage.module); + assert(shader_wrapper != nullptr); + + ppl_wrapper->bound_shaders.push_back(*shader_wrapper); } } } +void VulkanCaptureManager::PostProcess_vkCreateRayTracingPipelinesKHR( + VkResult result, + VkDevice device, + VkDeferredOperationKHR deferredOperation, + VkPipelineCache pipelineCache, + uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, + const VkAllocationCallbacks* pAllocator, + VkPipeline* pPipelines) +{ + if (result == VK_SUCCESS && createInfoCount && pPipelines != nullptr) + { + for (uint32_t p = 0; p < createInfoCount; ++p) + { + vulkan_wrappers::PipelineWrapper* ppl_wrapper = + vulkan_wrappers::GetWrapper(pPipelines[p]); + assert(ppl_wrapper != nullptr); + + for (uint32_t s = 0; s < pCreateInfos[p].stageCount; ++s) + { + const vulkan_wrappers::ShaderModuleWrapper* shader_wrapper = + vulkan_wrappers::GetWrapper( + pCreateInfos[p].pStages[s].module); + assert(shader_wrapper != nullptr); + + ppl_wrapper->bound_shaders.push_back(*shader_wrapper); + } + } + } +} + +void VulkanCaptureManager::PostProcess_vkCmdDraw(VkCommandBuffer commandBuffer, + uint32_t vertexCount, + uint32_t instanceCount, + uint32_t firstVertex, + uint32_t firstInstance) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdDraw(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdDrawIndexed(VkCommandBuffer commandBuffer, + uint32_t indexCount, + uint32_t instanceCount, + uint32_t firstIndex, + int32_t vertexOffset, + uint32_t firstInstance) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdDrawIndexed( + commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdDrawIndirect( + VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdDrawIndirect(commandBuffer, buffer, offset, drawCount, stride); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdDrawIndexedIndirect( + VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdDrawIndexedIndirect(commandBuffer, buffer, offset, drawCount, stride); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdDrawIndirectCount(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdDrawIndirectCount( + commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdDrawIndexedIndirectCount( + commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdDrawIndirectCountKHR( + commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdDrawIndexedIndirectCountKHR( + commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdDispatch(VkCommandBuffer commandBuffer, + uint32_t groupCountX, + uint32_t groupCountY, + uint32_t groupCountZ) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdDispatch(commandBuffer, groupCountX, groupCountY, groupCountZ); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdDispatchIndirect(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdDispatchIndirect(commandBuffer, buffer, offset); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdDispatchBase(VkCommandBuffer commandBuffer, + uint32_t baseGroupX, + uint32_t baseGroupY, + uint32_t baseGroupZ, + uint32_t groupCountX, + uint32_t groupCountY, + uint32_t groupCountZ) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdDispatchBase( + commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, + uint32_t baseGroupX, + uint32_t baseGroupY, + uint32_t baseGroupZ, + uint32_t groupCountX, + uint32_t groupCountY, + uint32_t groupCountZ) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdDispatchBaseKHR( + commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdTraceRaysNV(VkCommandBuffer commandBuffer, + VkBuffer raygenShaderBindingTableBuffer, + VkDeviceSize raygenShaderBindingOffset, + VkBuffer missShaderBindingTableBuffer, + VkDeviceSize missShaderBindingOffset, + VkDeviceSize missShaderBindingStride, + VkBuffer hitShaderBindingTableBuffer, + VkDeviceSize hitShaderBindingOffset, + VkDeviceSize hitShaderBindingStride, + VkBuffer callableShaderBindingTableBuffer, + VkDeviceSize callableShaderBindingOffset, + VkDeviceSize callableShaderBindingStride, + uint32_t width, + uint32_t height, + uint32_t depth) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdTraceRaysNV(commandBuffer, + raygenShaderBindingTableBuffer, + raygenShaderBindingOffset, + missShaderBindingTableBuffer, + missShaderBindingOffset, + missShaderBindingStride, + hitShaderBindingTableBuffer, + hitShaderBindingOffset, + hitShaderBindingStride, + callableShaderBindingTableBuffer, + callableShaderBindingOffset, + callableShaderBindingStride, + width, + height, + depth); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdTraceRaysKHR( + VkCommandBuffer commandBuffer, + const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, + uint32_t width, + uint32_t height, + uint32_t depth) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdTraceRaysKHR(commandBuffer, + pRaygenShaderBindingTable, + pMissShaderBindingTable, + pHitShaderBindingTable, + pCallableShaderBindingTable, + width, + height, + depth); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdTraceRaysIndirectKHR( + VkCommandBuffer commandBuffer, + const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, + VkDeviceAddress indirectDeviceAddress) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdTraceRaysIndirectKHR(commandBuffer, + pRaygenShaderBindingTable, + pMissShaderBindingTable, + pHitShaderBindingTable, + pCallableShaderBindingTable, + indirectDeviceAddress); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, + VkDeviceAddress indirectDeviceAddress) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdTraceRaysIndirect2KHR(commandBuffer, indirectDeviceAddress); + } +} + void VulkanCaptureManager::PostProcess_vkCmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, diff --git a/framework/encode/vulkan_capture_manager.h b/framework/encode/vulkan_capture_manager.h index f957eb8872..2ae0691f43 100644 --- a/framework/encode/vulkan_capture_manager.h +++ b/framework/encode/vulkan_capture_manager.h @@ -1364,6 +1364,112 @@ class VulkanCaptureManager : public ApiCaptureManager const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); + void PostProcess_vkCreateRayTracingPipelinesKHR(VkResult result, + VkDevice device, + VkDeferredOperationKHR deferredOperation, + VkPipelineCache pipelineCache, + uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, + const VkAllocationCallbacks* pAllocator, + VkPipeline* pPipelines); + +void PostProcess_vkCmdDraw(VkCommandBuffer commandBuffer, + uint32_t vertexCount, + uint32_t instanceCount, + uint32_t firstVertex, + uint32_t firstInstance); + +void PostProcess_vkCmdDrawIndexed(VkCommandBuffer commandBuffer, + uint32_t indexCount, + uint32_t instanceCount, + uint32_t firstIndex, + int32_t vertexOffset, + uint32_t firstInstance); + +void PostProcess_vkCmdDrawIndirect( + VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); + +void PostProcess_vkCmdDrawIndexedIndirect( + VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); + +void PostProcess_vkCmdDrawIndirectCount(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); + +void PostProcess_vkCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); + +void PostProcess_vkCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); + +void PostProcess_vkCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); + +void PostProcess_vkCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); +void PostProcess_vkCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset); +void PostProcess_vkCmdDispatchBase(VkCommandBuffer commandBuffer, + uint32_t baseGroupX, + uint32_t baseGroupY, + uint32_t baseGroupZ, + uint32_t groupCountX, + uint32_t groupCountY, + uint32_t groupCountZ); +void PostProcess_vkCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, + uint32_t baseGroupX, + uint32_t baseGroupY, + uint32_t baseGroupZ, + uint32_t groupCountX, + uint32_t groupCountY, + uint32_t groupCountZ); + +void PostProcess_vkCmdTraceRaysNV(VkCommandBuffer commandBuffer, + VkBuffer raygenShaderBindingTableBuffer, + VkDeviceSize raygenShaderBindingOffset, + VkBuffer missShaderBindingTableBuffer, + VkDeviceSize missShaderBindingOffset, + VkDeviceSize missShaderBindingStride, + VkBuffer hitShaderBindingTableBuffer, + VkDeviceSize hitShaderBindingOffset, + VkDeviceSize hitShaderBindingStride, + VkBuffer callableShaderBindingTableBuffer, + VkDeviceSize callableShaderBindingOffset, + VkDeviceSize callableShaderBindingStride, + uint32_t width, + uint32_t height, + uint32_t depth); + +void PostProcess_vkCmdTraceRaysKHR(VkCommandBuffer commandBuffer, + const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, + uint32_t width, + uint32_t height, + uint32_t depth); + +void PostProcess_vkCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, VkDeviceAddress indirectDeviceAddress); + +void PostProcess_vkCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress); + #if defined(__ANDROID__) void OverrideGetPhysicalDeviceSurfacePresentModesKHR(uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes); #endif diff --git a/framework/encode/vulkan_handle_wrappers.h b/framework/encode/vulkan_handle_wrappers.h index 555cabde28..dd3c171ba9 100644 --- a/framework/encode/vulkan_handle_wrappers.h +++ b/framework/encode/vulkan_handle_wrappers.h @@ -73,7 +73,6 @@ struct HandleWrapper // // clang-format off -// struct PipelineCacheWrapper : public HandleWrapper {}; struct SamplerWrapper : public HandleWrapper {}; struct SamplerYcbcrConversionWrapper : public HandleWrapper {}; struct DebugReportCallbackEXTWrapper : public HandleWrapper {}; @@ -166,30 +165,6 @@ struct EventWrapper : public HandleWrapper DeviceWrapper* device{ nullptr }; }; -struct DeviceMemoryWrapper : public HandleWrapper -{ - uint32_t memory_type_index{ std::numeric_limits::max() }; - VkDeviceSize allocation_size{ 0 }; - // This is the device which was used to allocate the memory. - // Spec states if the memory can be mapped, the mapping device must be this device. - // The device wrapper will be initialized when allocating the memory. Some handling - // like StateTracker::TrackTlasToBlasDependencies may use it before mapping - // the memory. - DeviceWrapper* parent_device{ nullptr }; - const void* mapped_data{ nullptr }; - VkDeviceSize mapped_offset{ 0 }; - VkDeviceSize mapped_size{ 0 }; - VkMemoryMapFlags mapped_flags{ 0 }; - void* external_allocation{ nullptr }; - uintptr_t shadow_allocation{ util::PageGuardManager::kNullShadowHandle }; - AHardwareBuffer* hardware_buffer{ nullptr }; - format::HandleId hardware_buffer_memory_id{ format::kNullHandleId }; - - // State tracking info for memory with device addresses. - format::HandleId device_id{ format::kNullHandleId }; - VkDeviceAddress address{ 0 }; -}; - struct BufferWrapper : public HandleWrapper { DeviceWrapper* bind_device{ nullptr }; @@ -228,7 +203,38 @@ struct ImageWrapper : public HandleWrapper bool is_swapchain_image{ false }; std::set parent_swapchains; - bool dirty{ true }; + bool dirty{ true }; + size_t size; +}; + +struct DeviceMemoryWrapper : public HandleWrapper +{ + uint32_t memory_type_index{ std::numeric_limits::max() }; + VkDeviceSize allocation_size{ 0 }; + // This is the device which was used to allocate the memory. + // Spec states if the memory can be mapped, the mapping device must be this device. + // The device wrapper will be initialized when allocating the memory. Some handling + // like StateTracker::TrackTlasToBlasDependencies may use it before mapping + // the memory. + DeviceWrapper* parent_device{ nullptr }; + const void* mapped_data{ nullptr }; + VkDeviceSize mapped_offset{ 0 }; + VkDeviceSize mapped_size{ 0 }; + VkMemoryMapFlags mapped_flags{ 0 }; + void* external_allocation{ nullptr }; + uintptr_t shadow_allocation{ util::PageGuardManager::kNullShadowHandle }; + AHardwareBuffer* hardware_buffer{ nullptr }; + format::HandleId hardware_buffer_memory_id{ format::kNullHandleId }; + + // State tracking info for memory with device addresses. + format::HandleId device_id{ format::kNullHandleId }; + VkDeviceAddress address{ 0 }; + + struct + { + std::vector images; + std::vector buffers; + } bound_assets; }; struct BufferViewWrapper : public HandleWrapper @@ -343,8 +349,7 @@ struct PipelineWrapper : public HandleWrapper // TODO: Base pipeline // TODO: Pipeline cache - VkPipelineBindPoint pipeline_bind_point; - std::unordered_map descriptor_sets; + std::vector bound_shaders; }; struct AccelerationStructureKHRWrapper; @@ -396,7 +401,16 @@ struct CommandBufferWrapper : public HandleWrapper }; std::vector> tlas_build_info_map; - const PipelineWrapper* bound_pipeline{ nullptr }; + const PipelineWrapper* bound_pipelines[vulkan_state_info::PipelineBindPoints::kBindPoint_count]{ nullptr }; + + std::unordered_map + bound_descriptors[vulkan_state_info::PipelineBindPoints::kBindPoint_count]; + + struct + { + std::vector images; + std::vector buffers; + } referenced_assets; }; struct DeferredOperationKHRWrapper : public HandleWrapper diff --git a/framework/encode/vulkan_state_info.h b/framework/encode/vulkan_state_info.h index 6a7123da8b..7e04b8a4dc 100644 --- a/framework/encode/vulkan_state_info.h +++ b/framework/encode/vulkan_state_info.h @@ -25,10 +25,12 @@ #include "format/format.h" #include "util/defines.h" +#include "util/logging.h" #include "util/memory_output_stream.h" #include "encode/handle_unwrap_memory.h" #include "vulkan/vulkan.h" +#include "vulkan/vulkan_core.h" #include #include @@ -83,32 +85,6 @@ struct DescriptorInfo std::unique_ptr mutable_type; }; -struct ShaderReflectionDescriptorInfo -{ - ShaderReflectionDescriptorInfo( - VkDescriptorType type, bool readonly, uint32_t accessed, uint32_t count, bool is_array) : - type(type), - readonly(readonly), accessed(accessed), count(count), is_array(is_array) - {} - - ShaderReflectionDescriptorInfo(const ShaderReflectionDescriptorInfo& other) : - type(other.type), readonly(other.readonly), accessed(other.accessed), count(other.count), - is_array(other.is_array) - {} - - VkDescriptorType type; - bool readonly; - uint32_t accessed; - uint32_t count; - bool is_array; -}; - -// One entry per descriptor binding -using ShaderReflectionDescriptorSetInfo = std::unordered_map; - -// One entry per descriptor set -using ShaderReflectionDescriptorSetsInfos = std::unordered_map; - struct CreateDependencyInfo { format::HandleId handle_id{ format::kNullHandleId }; @@ -163,6 +139,91 @@ enum CommandHandleType : uint32_t NumHandleTypes // THIS MUST BE THE LAST ENUM VALUE ! }; +struct ShaderReflectionDescriptorInfo +{ + ShaderReflectionDescriptorInfo( + VkDescriptorType type, bool readonly, uint32_t accessed, uint32_t count, bool is_array) : + type(type), + readonly(readonly), accessed(accessed), count(count), is_array(is_array) + {} + + ShaderReflectionDescriptorInfo(const ShaderReflectionDescriptorInfo& other) : + type(other.type), readonly(other.readonly), accessed(other.accessed), count(other.count), + is_array(other.is_array) + {} + + VkDescriptorType type; + bool readonly; + uint32_t accessed; + uint32_t count; + bool is_array; +}; + +// One entry per descriptor binding +using ShaderReflectionDescriptorSetInfo = std::unordered_map; + +// One entry per descriptor set +using ShaderReflectionDescriptorSetsInfos = std::unordered_map; + +enum PipelineBindPoints +{ + kBindPoint_graphics = 0, + kBindPoint_compute, + kBindPoint_ray_tracing, + + kBindPoint_count +}; + +static PipelineBindPoints VkPipelinePointToPipelinePoint(VkPipelineBindPoint bind_point) +{ + switch (bind_point) + { + + case VK_PIPELINE_BIND_POINT_GRAPHICS: + return kBindPoint_graphics; + case VK_PIPELINE_BIND_POINT_COMPUTE: + return kBindPoint_compute; + case VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR: + return kBindPoint_ray_tracing; + default: + assert(0); + return kBindPoint_graphics; + } +} + +static void VkShaderStageFlagsToPipelinePoint(VkShaderStageFlags stage_flags, std::vector& points) +{ + if (((stage_flags & VK_SHADER_STAGE_VERTEX_BIT) == VK_SHADER_STAGE_VERTEX_BIT) || + ((stage_flags & VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT) == VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT) || + ((stage_flags & VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT) == VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT) || + ((stage_flags & VK_SHADER_STAGE_GEOMETRY_BIT) == VK_SHADER_STAGE_GEOMETRY_BIT) || + ((stage_flags & VK_SHADER_STAGE_FRAGMENT_BIT) == VK_SHADER_STAGE_FRAGMENT_BIT)) + { + points.push_back(kBindPoint_graphics); + } + + if ((stage_flags & VK_SHADER_STAGE_COMPUTE_BIT) == VK_SHADER_STAGE_COMPUTE_BIT) + { + points.push_back(kBindPoint_graphics); + } + + if (((stage_flags & VK_SHADER_STAGE_RAYGEN_BIT_KHR) == VK_SHADER_STAGE_RAYGEN_BIT_KHR) || + ((stage_flags & VK_SHADER_STAGE_ANY_HIT_BIT_KHR) == VK_SHADER_STAGE_ANY_HIT_BIT_KHR) || + ((stage_flags & VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR) == VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR) || + ((stage_flags & VK_SHADER_STAGE_MISS_BIT_KHR) == VK_SHADER_STAGE_MISS_BIT_KHR) || + ((stage_flags & VK_SHADER_STAGE_INTERSECTION_BIT_KHR) == VK_SHADER_STAGE_INTERSECTION_BIT_KHR) || + ((stage_flags & VK_SHADER_STAGE_CALLABLE_BIT_KHR) == VK_SHADER_STAGE_CALLABLE_BIT_KHR)) + { + points.push_back(kBindPoint_ray_tracing); + } + + if (((stage_flags & VK_SHADER_STAGE_TASK_BIT_EXT) == VK_SHADER_STAGE_TASK_BIT_EXT) || + ((stage_flags & VK_SHADER_STAGE_MESH_BIT_EXT) == VK_SHADER_STAGE_MESH_BIT_EXT)) + { + GFXRECON_LOG_ERROR("shader stages 0x%x not handled", stage_flags); + } +} + GFXRECON_END_NAMESPACE(vulkan_state_info) GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index 1e32a0fc3a..b7f10a4053 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -28,10 +28,14 @@ #include "encode/vulkan_handle_wrapper_util.h" #include "encode/vulkan_track_struct.h" #include "graphics/vulkan_struct_get_pnext.h" +#include "util/platform.h" #include "vulkan/vulkan_core.h" +#include "util/page_status_tracker.h" + #include #include +#include GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(encode) @@ -54,6 +58,14 @@ void VulkanStateTracker::TrackCommandExecution(vulkan_wrappers::CommandBufferWra wrapper->pending_layouts.clear(); wrapper->recorded_queries.clear(); wrapper->tlas_build_info_map.clear(); + wrapper->referenced_assets.buffers.clear(); + wrapper->referenced_assets.images.clear(); + for (uint32_t point = vulkan_state_info::kBindPoint_graphics; point != vulkan_state_info::kBindPoint_count; + ++point) + { + wrapper->bound_descriptors[point].clear(); + } + memset(wrapper->bound_pipelines, 0, sizeof(wrapper->bound_pipelines)); for (size_t i = 0; i < vulkan_state_info::CommandHandleType::NumHandleTypes; ++i) { @@ -94,6 +106,14 @@ void VulkanStateTracker::TrackResetCommandPool(VkCommandPool command_pool) entry.second->pending_layouts.clear(); entry.second->recorded_queries.clear(); entry.second->tlas_build_info_map.clear(); + entry.second->referenced_assets.buffers.clear(); + entry.second->referenced_assets.images.clear(); + for (uint32_t point = vulkan_state_info::kBindPoint_graphics; point != vulkan_state_info::kBindPoint_count; + ++point) + { + entry.second->bound_descriptors[point].clear(); + } + memset(entry.second->bound_pipelines, 0, sizeof(entry.second->bound_pipelines)); for (size_t i = 0; i < vulkan_state_info::CommandHandleType::NumHandleTypes; ++i) { @@ -347,6 +367,11 @@ void VulkanStateTracker::TrackBufferMemoryBinding( wrapper->bind_offset = memoryOffset; wrapper->bind_pnext = nullptr; + vulkan_wrappers::DeviceMemoryWrapper* mem_wrapper = + vulkan_wrappers::GetWrapper(memory); + assert(mem_wrapper != nullptr); + mem_wrapper->bound_assets.buffers.push_back(wrapper); + if (bind_info_pnext != nullptr) { wrapper->bind_pnext = vulkan_trackers::TrackStruct(bind_info_pnext, wrapper->bind_pnext_memory); @@ -411,6 +436,11 @@ void VulkanStateTracker::TrackImageMemoryBinding( wrapper->bind_offset = memoryOffset; wrapper->bind_pnext = nullptr; + vulkan_wrappers::DeviceMemoryWrapper* mem_wrapper = + vulkan_wrappers::GetWrapper(memory); + assert(mem_wrapper != nullptr); + mem_wrapper->bound_assets.images.push_back(wrapper); + if (bind_info_pnext != nullptr) { wrapper->bind_pnext = vulkan_trackers::TrackStruct(bind_info_pnext, wrapper->bind_pnext_memory); @@ -1871,75 +1901,20 @@ void VulkanStateTracker::TrackCmdBindDescriptorSets(VkCommandBuffer comma uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets) { - if (pDescriptorSets != nullptr) + if (pDescriptorSets != nullptr && commandBuffer != VK_NULL_HANDLE) { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + for (uint32_t i = 0; i < descriptorSetCount; ++i) { - vulkan_wrappers::DescriptorSetWrapper* desc_wrapper = + vulkan_wrappers::DescriptorSetWrapper* desc_set_wrapper = vulkan_wrappers::GetWrapper(pDescriptorSets[i]); + assert(desc_set_wrapper != nullptr); - for (auto& binding : desc_wrapper->bindings) - { - switch (binding.second.type) - { - case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE: - { - assert(binding.second.count); - assert(binding.second.storage_images); - - for (uint32_t si = 0; si < binding.second.count; ++si) - { - const vulkan_wrappers::ImageViewWrapper* img_view_wrapper = - vulkan_wrappers::GetWrapper( - binding.second.storage_images[si].imageView); - assert(img_view_wrapper != nullptr); - - vulkan_wrappers::ImageWrapper* img_wrapper = img_view_wrapper->image; - img_wrapper->dirty = true; - } - } - break; - - case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: - case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: - { - assert(binding.second.count); - assert(binding.second.storage_buffers); - - for (uint32_t sb = 0; sb < binding.second.count; ++sb) - { - vulkan_wrappers::BufferWrapper* buffer_wrapper = - vulkan_wrappers::GetWrapper( - binding.second.storage_buffers[sb].buffer); - assert(buffer_wrapper != nullptr); - - buffer_wrapper->dirty = true; - } - } - break; - - case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER: - { - assert(binding.second.count); - assert(binding.second.storage_texel_buffer_views); - - for (uint32_t stb = 0; stb < binding.second.count; ++stb) - { - const vulkan_wrappers::BufferViewWrapper* buffer_view_wrapper = - vulkan_wrappers::GetWrapper( - binding.second.storage_texel_buffer_views[stb]); - assert(buffer_view_wrapper != nullptr); - - vulkan_wrappers::BufferWrapper* buffer_wrapper = buffer_view_wrapper->buffer; - buffer_wrapper->dirty = true; - } - } - break; - - default: - break; - } - } + cmd_buf_wrapper->bound_descriptors[vulkan_state_info::VkPipelinePointToPipelinePoint(pipelineBindPoint)] + [firstSet + i] = desc_set_wrapper; } } } @@ -1947,77 +1922,48 @@ void VulkanStateTracker::TrackCmdBindDescriptorSets(VkCommandBuffer comma void VulkanStateTracker::TrackCmdBindDescriptorSets2KHR(VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo) { - if (pBindDescriptorSetsInfo != nullptr && pBindDescriptorSetsInfo->pDescriptorSets != nullptr) + if (pBindDescriptorSetsInfo != nullptr && pBindDescriptorSetsInfo->pDescriptorSets != nullptr && + commandBuffer != VK_NULL_HANDLE) { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + for (uint32_t i = 0; i < pBindDescriptorSetsInfo->descriptorSetCount; ++i) { - vulkan_wrappers::DescriptorSetWrapper* desc_wrapper = + vulkan_wrappers::DescriptorSetWrapper* desc_set_wrapper = vulkan_wrappers::GetWrapper( pBindDescriptorSetsInfo->pDescriptorSets[i]); + assert(desc_set_wrapper != nullptr); - for (auto& binding : desc_wrapper->bindings) - { - switch (binding.second.type) - { - case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE: - { - assert(binding.second.count); - assert(binding.second.storage_images); - - for (uint32_t si = 0; si < binding.second.count; ++si) - { - const vulkan_wrappers::ImageViewWrapper* img_view_wrapper = - vulkan_wrappers::GetWrapper( - binding.second.storage_images[si].imageView); - assert(img_view_wrapper != nullptr); - - vulkan_wrappers::ImageWrapper* img_wrapper = img_view_wrapper->image; - img_wrapper->dirty = true; - } - } - break; - - case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: - case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: - { - assert(binding.second.count); - assert(binding.second.storage_buffers); - - for (uint32_t sb = 0; sb < binding.second.count; ++sb) - { - vulkan_wrappers::BufferWrapper* buffer_wrapper = - vulkan_wrappers::GetWrapper( - binding.second.storage_buffers[sb].buffer); - assert(buffer_wrapper != nullptr); - - buffer_wrapper->dirty = true; - } - } - break; + std::vector points; + vulkan_state_info::VkShaderStageFlagsToPipelinePoint(pBindDescriptorSetsInfo->stageFlags, points); - case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER: - { - assert(binding.second.count); - assert(binding.second.storage_texel_buffer_views); + for (auto point : points) + { + cmd_buf_wrapper->bound_descriptors[point][pBindDescriptorSetsInfo->firstSet + i] = desc_set_wrapper; + } + } + } +} - for (uint32_t stb = 0; stb < binding.second.count; ++stb) - { - const vulkan_wrappers::BufferViewWrapper* buffer_view_wrapper = - vulkan_wrappers::GetWrapper( - binding.second.storage_texel_buffer_views[stb]); - assert(buffer_view_wrapper != nullptr); +void VulkanStateTracker::TrackCmdBindPipeline(VkCommandBuffer commandBuffer, + VkPipelineBindPoint pipelineBindPoint, + VkPipeline pipeline) +{ + if (commandBuffer != VK_NULL_HANDLE && pipeline != VK_NULL_HANDLE) + { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper); - vulkan_wrappers::BufferWrapper* buffer_wrapper = buffer_view_wrapper->buffer; - buffer_wrapper->dirty = true; - } - } - break; + const vulkan_wrappers::PipelineWrapper* ppl_wrapper = + vulkan_wrappers::GetWrapper(pipeline); + assert(ppl_wrapper != nullptr); - default: - break; - } - } - } + vulkan_state_info::PipelineBindPoints bind_point = + vulkan_state_info::VkPipelinePointToPipelinePoint(pipelineBindPoint); + cmd_buf_wrapper->bound_pipelines[bind_point] = ppl_wrapper; } } @@ -2027,13 +1973,17 @@ void VulkanStateTracker::TrackCmdCopyBuffer(VkCommandBuffer commandBuffer, uint32_t regionCount, const VkBufferCopy* pRegions) { - if (dstBuffer != VK_NULL_HANDLE) + if (dstBuffer != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = vulkan_wrappers::GetWrapper(dstBuffer); assert(dst_buffer_wrapper != nullptr); - dst_buffer_wrapper->dirty = true; + cmd_buf_wrapper->referenced_assets.buffers.push_back(dst_buffer_wrapper); } } @@ -2045,13 +1995,15 @@ void VulkanStateTracker::TrackCmdCopyImage(VkCommandBuffer commandBuffer, uint32_t regionCount, const VkImageCopy* pRegions) { - if (dstImage != VK_NULL_HANDLE) + if (dstImage != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + vulkan_wrappers::ImageWrapper* dst_img_wrapper = vulkan_wrappers::GetWrapper(dstImage); assert(dst_img_wrapper != nullptr); - - dst_img_wrapper->dirty = true; } } @@ -2062,13 +2014,17 @@ void VulkanStateTracker::TrackCmdCopyBufferToImage(VkCommandBuffer comm uint32_t regionCount, const VkBufferImageCopy* pRegions) { - if (dstImage != nullptr) + if (dstImage != nullptr && commandBuffer != VK_NULL_HANDLE) { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + vulkan_wrappers::ImageWrapper* dst_img_wrapper = vulkan_wrappers::GetWrapper(dstImage); assert(dst_img_wrapper != nullptr); - dst_img_wrapper->dirty = true; + cmd_buf_wrapper->referenced_assets.images.push_back(dst_img_wrapper); } } @@ -2079,113 +2035,153 @@ void VulkanStateTracker::TrackCmdCopyImageToBuffer(VkCommandBuffer comm uint32_t regionCount, const VkBufferImageCopy* pRegions) { - if (dstBuffer != VK_NULL_HANDLE) + if (dstBuffer != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = vulkan_wrappers::GetWrapper(dstBuffer); assert(dst_buffer_wrapper != nullptr); - dst_buffer_wrapper->dirty = true; + cmd_buf_wrapper->referenced_assets.buffers.push_back(dst_buffer_wrapper); } } void VulkanStateTracker::TrackCmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) { - if (pCopyBufferInfo != nullptr && pCopyBufferInfo->dstBuffer != VK_NULL_HANDLE) + if (pCopyBufferInfo != nullptr && pCopyBufferInfo->dstBuffer != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = vulkan_wrappers::GetWrapper(pCopyBufferInfo->dstBuffer); assert(dst_buffer_wrapper != nullptr); - dst_buffer_wrapper->dirty = true; + cmd_buf_wrapper->referenced_assets.buffers.push_back(dst_buffer_wrapper); } } void VulkanStateTracker::TrackCmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) { - if (pCopyImageInfo != nullptr && pCopyImageInfo->dstImage != VK_NULL_HANDLE) + if (pCopyImageInfo != nullptr && pCopyImageInfo->dstImage != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + vulkan_wrappers::ImageWrapper* dst_img_wrapper = vulkan_wrappers::GetWrapper(pCopyImageInfo->dstImage); assert(dst_img_wrapper != nullptr); - dst_img_wrapper->dirty = true; + cmd_buf_wrapper->referenced_assets.images.push_back(dst_img_wrapper); } } void VulkanStateTracker::TrackCmdCopyBufferToImage2(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) { - if (pCopyBufferToImageInfo != nullptr && pCopyBufferToImageInfo->dstImage != VK_NULL_HANDLE) + if (pCopyBufferToImageInfo != nullptr && pCopyBufferToImageInfo->dstImage != VK_NULL_HANDLE && + commandBuffer != VK_NULL_HANDLE) { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + vulkan_wrappers::ImageWrapper* dst_img_wrapper = vulkan_wrappers::GetWrapper(pCopyBufferToImageInfo->dstImage); assert(dst_img_wrapper != nullptr); - dst_img_wrapper->dirty = true; + cmd_buf_wrapper->referenced_assets.images.push_back(dst_img_wrapper); } } void VulkanStateTracker::TrackCmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) { - if (pCopyImageToBufferInfo != nullptr && pCopyImageToBufferInfo->dstBuffer != VK_NULL_HANDLE) + if (pCopyImageToBufferInfo != nullptr && pCopyImageToBufferInfo->dstBuffer != VK_NULL_HANDLE && + commandBuffer != VK_NULL_HANDLE) { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = vulkan_wrappers::GetWrapper(pCopyImageToBufferInfo->dstBuffer); assert(dst_buffer_wrapper != nullptr); - dst_buffer_wrapper->dirty = true; + cmd_buf_wrapper->referenced_assets.buffers.push_back(dst_buffer_wrapper); } } void VulkanStateTracker::TrackCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) { - if (pCopyBufferInfo != nullptr && pCopyBufferInfo->dstBuffer != VK_NULL_HANDLE) + if (pCopyBufferInfo != nullptr && pCopyBufferInfo->dstBuffer != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = vulkan_wrappers::GetWrapper(pCopyBufferInfo->dstBuffer); assert(dst_buffer_wrapper != nullptr); - dst_buffer_wrapper->dirty = true; + cmd_buf_wrapper->referenced_assets.buffers.push_back(dst_buffer_wrapper); } } void VulkanStateTracker::TrackCmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) { - if (pCopyImageInfo != nullptr && pCopyImageInfo->dstImage != VK_NULL_HANDLE) + if (pCopyImageInfo != nullptr && pCopyImageInfo->dstImage != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + vulkan_wrappers::ImageWrapper* dst_img_wrapper = vulkan_wrappers::GetWrapper(pCopyImageInfo->dstImage); assert(dst_img_wrapper != nullptr); - dst_img_wrapper->dirty = true; + cmd_buf_wrapper->referenced_assets.images.push_back(dst_img_wrapper); } } void VulkanStateTracker::TrackCmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) { - if (pCopyBufferToImageInfo != nullptr && pCopyBufferToImageInfo->dstImage != VK_NULL_HANDLE) + if (pCopyBufferToImageInfo != nullptr && pCopyBufferToImageInfo->dstImage != VK_NULL_HANDLE && + commandBuffer != VK_NULL_HANDLE) { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + vulkan_wrappers::ImageWrapper* dst_img_wrapper = vulkan_wrappers::GetWrapper(pCopyBufferToImageInfo->dstImage); assert(dst_img_wrapper != nullptr); - dst_img_wrapper->dirty = true; + cmd_buf_wrapper->referenced_assets.images.push_back(dst_img_wrapper); } } void VulkanStateTracker::TrackCmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) { - if (pCopyImageToBufferInfo != nullptr && pCopyImageToBufferInfo->dstBuffer != VK_NULL_HANDLE) + if (pCopyImageToBufferInfo != nullptr && pCopyImageToBufferInfo->dstBuffer != VK_NULL_HANDLE && + commandBuffer != VK_NULL_HANDLE) { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = vulkan_wrappers::GetWrapper(pCopyImageToBufferInfo->dstBuffer); assert(dst_buffer_wrapper != nullptr); - dst_buffer_wrapper->dirty = true; + cmd_buf_wrapper->referenced_assets.buffers.push_back(dst_buffer_wrapper); } } @@ -2198,25 +2194,33 @@ void VulkanStateTracker::TrackCmdBlitImage(VkCommandBuffer commandBuffer, const VkImageBlit* pRegions, VkFilter filter) { - if (dstImage != VK_NULL_HANDLE) + if (dstImage != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + vulkan_wrappers::ImageWrapper* dst_img_wrapper = vulkan_wrappers::GetWrapper(dstImage); assert(dst_img_wrapper != nullptr); - dst_img_wrapper->dirty = true; + cmd_buf_wrapper->referenced_assets.images.push_back(dst_img_wrapper); } } void VulkanStateTracker::TrackCmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo) { - if (pBlitImageInfo != nullptr && pBlitImageInfo->dstImage != VK_NULL_HANDLE) + if (pBlitImageInfo != nullptr && pBlitImageInfo->dstImage != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + vulkan_wrappers::ImageWrapper* dst_img_wrapper = vulkan_wrappers::GetWrapper(pBlitImageInfo->dstImage); assert(dst_img_wrapper != nullptr); - dst_img_wrapper->dirty = true; + cmd_buf_wrapper->referenced_assets.images.push_back(dst_img_wrapper); } } @@ -2228,26 +2232,34 @@ void VulkanStateTracker::TrackCmdBlitImage2KHR(VkCommandBuffer commandBuffer, co void VulkanStateTracker::TrackCmdUpdateBuffer( VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData) { - if (dstBuffer != VK_NULL_HANDLE) + if (dstBuffer != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = vulkan_wrappers::GetWrapper(dstBuffer); assert(dst_buffer_wrapper != nullptr); - dst_buffer_wrapper->dirty = true; + cmd_buf_wrapper->referenced_assets.buffers.push_back(dst_buffer_wrapper); } } void VulkanStateTracker::TrackCmdFillBuffer( VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data) { - if (dstBuffer != VK_NULL_HANDLE) + if (dstBuffer != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = vulkan_wrappers::GetWrapper(dstBuffer); assert(dst_buffer_wrapper != nullptr); - dst_buffer_wrapper->dirty = true; + cmd_buf_wrapper->referenced_assets.buffers.push_back(dst_buffer_wrapper); } } @@ -2258,12 +2270,17 @@ void VulkanStateTracker::TrackCmdClearColorImage(VkCommandBuffer uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { - if (image != VK_NULL_HANDLE) + if (image != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) { - vulkan_wrappers::ImageWrapper* img_wrapper = vulkan_wrappers::GetWrapper(image); - assert(img_wrapper != nullptr); + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); - img_wrapper->dirty = true; + vulkan_wrappers::ImageWrapper* dst_img_wrapper = + vulkan_wrappers::GetWrapper(image); + assert(dst_img_wrapper != nullptr); + + cmd_buf_wrapper->referenced_assets.images.push_back(dst_img_wrapper); } } @@ -2274,12 +2291,374 @@ void VulkanStateTracker::TrackCmdClearDepthStencilImage(VkCommandBuffer uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { - if (image != VK_NULL_HANDLE) + if (image != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) + { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + + vulkan_wrappers::ImageWrapper* dst_img_wrapper = + vulkan_wrappers::GetWrapper(image); + assert(dst_img_wrapper != nullptr); + + cmd_buf_wrapper->referenced_assets.images.push_back(dst_img_wrapper); + } +} + +void VulkanStateTracker::TrackMappedAssetsWrites(VkCommandBuffer commandBuffer) +{ + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + + util::PageGuardManager* manager = util::PageGuardManager::Get(); + assert(manager != nullptr); + + std::unordered_map memories_page_status; + manager->GetModifiedMemoryRegions(memories_page_status); + const size_t page_size = util::platform::GetSystemPageSize(); + + for (const auto& entry : memories_page_status) + { + vulkan_wrappers::DeviceMemoryWrapper* dev_mem_wrapper = state_table_.GetDeviceMemoryWrapper(entry.first); + assert(dev_mem_wrapper != nullptr); + + for (auto img : dev_mem_wrapper->bound_assets.images) + { + if (img->is_swapchain_image) + { + continue; + } + + for (auto dirty_page : entry.second) + { + const size_t page_offset_start = dirty_page * page_size; + const size_t page_offset_end = (dirty_page + 1) * page_size; + + if ((img->bind_offset >= page_offset_start && img->bind_offset <= page_offset_end) || + ((img->bind_offset + img->size) >= page_offset_start && + (img->bind_offset + img->size) <= page_offset_end) || + (img->bind_offset >= page_offset_start && (img->bind_offset + img->size) >= page_offset_end)) + { + img->dirty = true; + cmd_buf_wrapper->referenced_assets.images.push_back(img); + break; + } + } + } + + for (auto buf : dev_mem_wrapper->bound_assets.buffers) + { + for (auto dirty_page : entry.second) + { + const size_t page_offset_start = dirty_page * page_size; + const size_t page_offset_end = (dirty_page + 1) * page_size; + + if ((buf->bind_offset >= page_offset_start && buf->bind_offset <= page_offset_end) || + ((buf->bind_offset + buf->created_size) >= page_offset_start && + (buf->bind_offset + buf->created_size) <= page_offset_end) || + (buf->bind_offset >= page_offset_start && + (buf->bind_offset + buf->created_size) >= page_offset_end)) + { + buf->dirty = true; + cmd_buf_wrapper->referenced_assets.buffers.push_back(buf); + break; + } + } + } + } +} + +void VulkanStateTracker::TrackPipelineDescriptors(vulkan_wrappers::CommandBufferWrapper* command_wrapper, + vulkan_state_info::PipelineBindPoints ppl_bind_point) +{ + assert(command_wrapper != nullptr); + assert(ppl_bind_point < vulkan_state_info::PipelineBindPoints::kBindPoint_count); + + const vulkan_wrappers::PipelineWrapper* ppl_wrapper = command_wrapper->bound_pipelines[ppl_bind_point]; + if (ppl_wrapper != nullptr) + { + for (const auto& stage : ppl_wrapper->bound_shaders) + { + for (const auto& set : stage.used_descriptors_info) + { + const uint32_t desc_set_index = set.first; + for (const auto& desc : set.second) + { + if (desc.second.accessed) + { + const uint32_t binding_index = desc.first; + const vulkan_wrappers::DescriptorSetWrapper* desc_set_wrapper = + command_wrapper->bound_descriptors[ppl_bind_point][desc_set_index]; + assert(desc_set_wrapper); + + const auto& descriptor_binding = desc_set_wrapper->bindings.find(binding_index); + assert(descriptor_binding != desc_set_wrapper->bindings.end()); + + switch (descriptor_binding->second.type) + { + case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE: + { + for (uint32_t a = 0; a < descriptor_binding->second.count; ++a) + { + vulkan_wrappers::ImageViewWrapper* img_view_wrapper = + vulkan_wrappers::GetWrapper( + descriptor_binding->second.storage_images[a].imageView); + + if (img_view_wrapper != nullptr && img_view_wrapper->image != nullptr) + { + command_wrapper->referenced_assets.images.push_back(img_view_wrapper->image); + } + } + } + break; + + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: + { + for (uint32_t a = 0; a < descriptor_binding->second.count; ++a) + { + vulkan_wrappers::BufferWrapper* buf_wrapper = + vulkan_wrappers::GetWrapper( + descriptor_binding->second.storage_buffers[a].buffer); + if (buf_wrapper != nullptr) + { + command_wrapper->referenced_assets.buffers.push_back(buf_wrapper); + } + } + } + break; + + case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER: + { + for (uint32_t a = 0; a < descriptor_binding->second.count; ++a) + { + vulkan_wrappers::BufferViewWrapper* buf_view_wrapper = + vulkan_wrappers::GetWrapper( + descriptor_binding->second.storage_texel_buffer_views[a]); + if (buf_view_wrapper != nullptr && buf_view_wrapper->buffer != nullptr) + { + command_wrapper->referenced_assets.buffers.push_back(buf_view_wrapper->buffer); + } + } + } + break; + + // Rest of descriptors are immutable within a shader + default: + break; + } + } + } + } + } + } +} + +void VulkanStateTracker::TrackCmdDraw(VkCommandBuffer commandBuffer, + uint32_t vertexCount, + uint32_t instanceCount, + uint32_t firstVertex, + uint32_t firstInstance) +{ + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_graphics); +} + +void VulkanStateTracker::TrackCmdDrawIndexed(VkCommandBuffer commandBuffer, + uint32_t indexCount, + uint32_t instanceCount, + uint32_t firstIndex, + int32_t vertexOffset, + uint32_t firstInstance) +{ + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_graphics); +} + +void VulkanStateTracker::TrackCmdDrawIndirect( + VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) +{ + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_graphics); +} + +void VulkanStateTracker::TrackCmdDrawIndexedIndirect( + VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) +{ + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_graphics); +} + +void VulkanStateTracker::TrackCmdDrawIndirectCount(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride) +{ + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_graphics); +} + +void VulkanStateTracker::TrackCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride) +{ + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_graphics); +} + +void VulkanStateTracker::TrackCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride) +{ + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_graphics); +} + +void VulkanStateTracker::TrackCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride) +{ + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_graphics); +} + +void VulkanStateTracker::TrackCmdDispatch(VkCommandBuffer commandBuffer, + uint32_t groupCountX, + uint32_t groupCountY, + uint32_t groupCountZ) +{ + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_compute); +} + +void VulkanStateTracker::TrackCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) +{ + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_compute); +} + +void VulkanStateTracker::TrackCmdDispatchBase(VkCommandBuffer commandBuffer, + uint32_t baseGroupX, + uint32_t baseGroupY, + uint32_t baseGroupZ, + uint32_t groupCountX, + uint32_t groupCountY, + uint32_t groupCountZ) +{ + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_compute); +} + +void VulkanStateTracker::TrackCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, + uint32_t baseGroupX, + uint32_t baseGroupY, + uint32_t baseGroupZ, + uint32_t groupCountX, + uint32_t groupCountY, + uint32_t groupCountZ) +{ + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_compute); +} + +void VulkanStateTracker::TrackCmdTraceRaysNV(VkCommandBuffer commandBuffer, + VkBuffer raygenShaderBindingTableBuffer, + VkDeviceSize raygenShaderBindingOffset, + VkBuffer missShaderBindingTableBuffer, + VkDeviceSize missShaderBindingOffset, + VkDeviceSize missShaderBindingStride, + VkBuffer hitShaderBindingTableBuffer, + VkDeviceSize hitShaderBindingOffset, + VkDeviceSize hitShaderBindingStride, + VkBuffer callableShaderBindingTableBuffer, + VkDeviceSize callableShaderBindingOffset, + VkDeviceSize callableShaderBindingStride, + uint32_t width, + uint32_t height, + uint32_t depth) +{ + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_ray_tracing); +} + +void VulkanStateTracker::TrackCmdTraceRaysKHR(VkCommandBuffer commandBuffer, + const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, + uint32_t width, + uint32_t height, + uint32_t depth) +{ + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_ray_tracing); +} + +void VulkanStateTracker::TrackCmdTraceRaysIndirectKHR( + VkCommandBuffer commandBuffer, + const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, + VkDeviceAddress indirectDeviceAddress) +{ + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_ray_tracing); +} + +void VulkanStateTracker::TrackCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, + VkDeviceAddress indirectDeviceAddress) +{ + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_ray_tracing); +} + +void VulkanStateTracker::MarkReferencedAssetsAsDirty(VkCommandBuffer commandBuffer) +{ + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + + for (auto img : cmd_buf_wrapper->referenced_assets.images) { - vulkan_wrappers::ImageWrapper* img_wrapper = vulkan_wrappers::GetWrapper(image); - assert(img_wrapper != nullptr); + img->dirty = true; + } - img_wrapper->dirty = true; + for (auto buf : cmd_buf_wrapper->referenced_assets.buffers) + { + buf->dirty = true; } } diff --git a/framework/encode/vulkan_state_tracker.h b/framework/encode/vulkan_state_tracker.h index e3a88c3286..57acaabde9 100644 --- a/framework/encode/vulkan_state_tracker.h +++ b/framework/encode/vulkan_state_tracker.h @@ -25,6 +25,7 @@ #include "encode/descriptor_update_template_info.h" #include "encode/vulkan_handle_wrappers.h" +#include "encode/vulkan_state_info.h" #include "generated/generated_vulkan_state_table.h" #include "encode/vulkan_state_tracker_initializers.h" #include "encode/vulkan_state_writer.h" @@ -423,6 +424,9 @@ class VulkanStateTracker void TrackCmdBindDescriptorSets2KHR(VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo); + void + TrackCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline); + void TrackCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, @@ -507,6 +511,116 @@ class VulkanStateTracker uint32_t rangeCount, const VkImageSubresourceRange* pRanges); + void TrackCmdDraw(VkCommandBuffer commandBuffer, + uint32_t vertexCount, + uint32_t instanceCount, + uint32_t firstVertex, + uint32_t firstInstance); + + void TrackCmdDrawIndexed(VkCommandBuffer commandBuffer, + uint32_t indexCount, + uint32_t instanceCount, + uint32_t firstIndex, + int32_t vertexOffset, + uint32_t firstInstance); + + void TrackCmdDrawIndirect( + VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); + + void TrackCmdDrawIndexedIndirect( + VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); + + void TrackCmdDrawIndirectCount(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); + + void TrackCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); + + void TrackCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); + + void TrackCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); + + void + TrackCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); + + void TrackCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset); + + void TrackCmdDispatchBase(VkCommandBuffer commandBuffer, + uint32_t baseGroupX, + uint32_t baseGroupY, + uint32_t baseGroupZ, + uint32_t groupCountX, + uint32_t groupCountY, + uint32_t groupCountZ); + + void TrackCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, + uint32_t baseGroupX, + uint32_t baseGroupY, + uint32_t baseGroupZ, + uint32_t groupCountX, + uint32_t groupCountY, + uint32_t groupCountZ); + + void TrackCmdTraceRaysNV(VkCommandBuffer commandBuffer, + VkBuffer raygenShaderBindingTableBuffer, + VkDeviceSize raygenShaderBindingOffset, + VkBuffer missShaderBindingTableBuffer, + VkDeviceSize missShaderBindingOffset, + VkDeviceSize missShaderBindingStride, + VkBuffer hitShaderBindingTableBuffer, + VkDeviceSize hitShaderBindingOffset, + VkDeviceSize hitShaderBindingStride, + VkBuffer callableShaderBindingTableBuffer, + VkDeviceSize callableShaderBindingOffset, + VkDeviceSize callableShaderBindingStride, + uint32_t width, + uint32_t height, + uint32_t depth); + + void TrackCmdTraceRaysKHR(VkCommandBuffer commandBuffer, + const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, + uint32_t width, + uint32_t height, + uint32_t depth); + + void TrackCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer, + const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, + VkDeviceAddress indirectDeviceAddress); + + void TrackCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress); + + void TrackMappedAssetsWrites(VkCommandBuffer commandBuffer); + + void MarkReferencedAssetsAsDirty(VkCommandBuffer commandBuffer); + private: template void AddGroupHandles(ParentHandle parent_handle, @@ -574,6 +688,9 @@ class VulkanStateTracker void TrackQuerySubmissions(vulkan_wrappers::CommandBufferWrapper* command_wrapper); + void TrackPipelineDescriptors(vulkan_wrappers::CommandBufferWrapper* command_wrapper, + vulkan_state_info::PipelineBindPoints ppl_bind_point); + std::mutex state_table_mutex_; VulkanStateTable state_table_; diff --git a/framework/encode/vulkan_state_tracker_initializers.h b/framework/encode/vulkan_state_tracker_initializers.h index 98f5433375..c26d18b8aa 100644 --- a/framework/encode/vulkan_state_tracker_initializers.h +++ b/framework/encode/vulkan_state_tracker_initializers.h @@ -35,6 +35,7 @@ #include "graphics/vulkan_struct_get_pnext.h" #include "vulkan/vulkan.h" +#include "vulkan/vulkan_core.h" #include #include @@ -643,6 +644,12 @@ inline void InitializeStatequeue_family_index = create_info->pQueueFamilyIndices[0]; } + + const VulkanDeviceTable* device_table = vulkan_wrappers::GetDeviceTable(parent_handle); + VkMemoryRequirements image_mem_reqs; + assert(wrapper->handle != VK_NULL_HANDLE); + device_table->GetImageMemoryRequirements(parent_handle, wrapper->handle, &image_mem_reqs); + wrapper->size = image_mem_reqs.size; } template <> diff --git a/framework/util/page_guard_manager.cpp b/framework/util/page_guard_manager.cpp index c65a158660..3ea58f6123 100644 --- a/framework/util/page_guard_manager.cpp +++ b/framework/util/page_guard_manager.cpp @@ -25,6 +25,7 @@ #include "util/page_guard_manager.h" #include "util/logging.h" +#include "util/page_status_tracker.h" #include "util/platform.h" #include @@ -1369,5 +1370,19 @@ const void* PageGuardManager::GetMappedMemory(uint64_t memory_id) const return nullptr; } +void PageGuardManager::GetModifiedMemoryRegions( + std::unordered_map& memories_page_status) +{ + memories_page_status.clear(); + + for (auto& entry : memory_info_) + { + PageStatusTracker::PageStatus writes; + entry.second.status_tracker.GetActiveWrites(writes); + memories_page_status.emplace( + std::piecewise_construct, std::forward_as_tuple(entry.first), std::forward_as_tuple(std::move(writes))); + } +} + GFXRECON_END_NAMESPACE(util) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/util/page_guard_manager.h b/framework/util/page_guard_manager.h index 3c543416fb..8075e0dcec 100644 --- a/framework/util/page_guard_manager.h +++ b/framework/util/page_guard_manager.h @@ -145,6 +145,8 @@ class PageGuardManager void UffdUnblockRtSignal(); + void GetModifiedMemoryRegions(std::unordered_map &memories_page_status); + protected: PageGuardManager(); diff --git a/framework/util/page_status_tracker.h b/framework/util/page_status_tracker.h index 2db47b2bce..45500d4830 100644 --- a/framework/util/page_status_tracker.h +++ b/framework/util/page_status_tracker.h @@ -37,6 +37,9 @@ GFXRECON_BEGIN_NAMESPACE(util) class PageStatusTracker { + public: + typedef std::vector PageStatus; + public: PageStatusTracker(size_t page_count) : active_writes_(page_count, 0), active_reads_(page_count, 0) {} @@ -50,8 +53,7 @@ class PageStatusTracker void SetAllBlocksActiveWrite() { std::fill(active_writes_.begin(), active_writes_.end(), 1); } - private: - typedef std::vector PageStatus; + void GetActiveWrites(PageStatus& writes) { writes = active_writes_; } private: PageStatus active_writes_; //< Track blocks that have been written. diff --git a/framework/util/spirv_parsing_util.cpp b/framework/util/spirv_parsing_util.cpp index 26f53cecfe..991d14da8d 100644 --- a/framework/util/spirv_parsing_util.cpp +++ b/framework/util/spirv_parsing_util.cpp @@ -553,6 +553,8 @@ bool SpirVParsingUtil::SPIRVReflectPerformReflectionOnShaderModule( assert(spirv_size); assert(spirv_code != nullptr); + shader_reflection.clear(); + spv_reflect::ShaderModule reflection(spirv_size, spirv_code); if (reflection.GetResult() != SPV_REFLECT_RESULT_SUCCESS) { From 7a280d2ae4c44b6c661ca9e5dc7bc0aa27d16ec4 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sun, 14 Jul 2024 18:41:12 +0300 Subject: [PATCH 05/99] Print exec time of WriteResourceMemoryState --- framework/encode/vulkan_state_writer.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index e28178c4d9..b6efc1a766 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -1901,6 +1901,8 @@ void VulkanStateWriter::WriteResourceMemoryState(const VulkanStateTable& state_t VkDeviceSize max_resource_size = 0; VkDeviceSize max_staging_copy_size = 0; + auto started = std::chrono::high_resolution_clock::now(); + size_t buffer_bytes_dumped; size_t buffer_bytes_skipped; WriteBufferMemoryState( @@ -1911,14 +1913,6 @@ void VulkanStateWriter::WriteResourceMemoryState(const VulkanStateTable& state_t WriteImageMemoryState( state_table, &resources, &max_resource_size, &max_staging_copy_size, image_bytes_dumped, image_bytes_skipped); - GFXRECON_WRITE_CONSOLE("--------------------------------------") - GFXRECON_WRITE_CONSOLE("%s()", __func__) - GFXRECON_WRITE_CONSOLE(" buffer_bytes_dumped: %zu", buffer_bytes_dumped); - GFXRECON_WRITE_CONSOLE(" buffer_bytes_skipped: %zu", buffer_bytes_skipped); - GFXRECON_WRITE_CONSOLE(" image_bytes_dumped: %zu", image_bytes_dumped); - GFXRECON_WRITE_CONSOLE(" image_bytes_skipped: %zu", image_bytes_skipped); - GFXRECON_WRITE_CONSOLE("--------------------------------------") - // Write resource memory content. for (const auto& resource_entry : resources) { @@ -1975,6 +1969,18 @@ void VulkanStateWriter::WriteResourceMemoryState(const VulkanStateTable& state_t GFXRECON_LOG_ERROR("Failed to create a staging buffer to process trim state"); } } + + auto done = std::chrono::high_resolution_clock::now(); + uint32_t time = std::chrono::duration_cast(done - started).count(); + + GFXRECON_WRITE_CONSOLE("--------------------------------------") + GFXRECON_WRITE_CONSOLE("%s()", __func__) + GFXRECON_WRITE_CONSOLE(" buffer_bytes_dumped: %zu", buffer_bytes_dumped); + GFXRECON_WRITE_CONSOLE(" buffer_bytes_skipped: %zu", buffer_bytes_skipped); + GFXRECON_WRITE_CONSOLE(" image_bytes_dumped: %zu", image_bytes_dumped); + GFXRECON_WRITE_CONSOLE(" image_bytes_skipped: %zu", image_bytes_skipped); + GFXRECON_WRITE_CONSOLE(" saved in %u ms", time); + GFXRECON_WRITE_CONSOLE("--------------------------------------") } void VulkanStateWriter::WriteMappedMemoryState(const VulkanStateTable& state_table) From e9c9c3bc2177d37de39d05336d4c53151d655f85 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 15 Jul 2024 14:56:01 +0300 Subject: [PATCH 06/99] Track non swapchain images attachments with stope_op_store --- framework/encode/vulkan_handle_wrappers.h | 11 +++++-- framework/encode/vulkan_state_tracker.cpp | 29 ++++++++++++++++--- .../vulkan_state_tracker_initializers.h | 8 +++-- 3 files changed, 39 insertions(+), 9 deletions(-) diff --git a/framework/encode/vulkan_handle_wrappers.h b/framework/encode/vulkan_handle_wrappers.h index dd3c171ba9..82a41b6518 100644 --- a/framework/encode/vulkan_handle_wrappers.h +++ b/framework/encode/vulkan_handle_wrappers.h @@ -283,9 +283,14 @@ struct QueryPoolWrapper : public HandleWrapper struct RenderPassWrapper : public HandleWrapper { - // Final image attachment layouts to be used for processing image layout transitions after calls to - // vkCmdEndRenderPass. - std::vector attachment_final_layouts; + struct + { + // Final image attachment layouts to be used for processing image layout transitions after calls to + // vkCmdEndRenderPass. + std::vector attachment_final_layouts; + std::vector store_op; + std::vector stencil_store_op; + } attachment_info; }; struct DescriptorUpdateTemplateWrapper : public HandleWrapper diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index b7f10a4053..a2430cd1a2 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -29,6 +29,7 @@ #include "encode/vulkan_track_struct.h" #include "graphics/vulkan_struct_get_pnext.h" #include "util/platform.h" +#include "Vulkan-Utility-Libraries/vk_format_utils.h" #include "vulkan/vulkan_core.h" #include "util/page_status_tracker.h" @@ -64,8 +65,8 @@ void VulkanStateTracker::TrackCommandExecution(vulkan_wrappers::CommandBufferWra ++point) { wrapper->bound_descriptors[point].clear(); + wrapper->bound_pipelines[point] = nullptr; } - memset(wrapper->bound_pipelines, 0, sizeof(wrapper->bound_pipelines)); for (size_t i = 0; i < vulkan_state_info::CommandHandleType::NumHandleTypes; ++i) { @@ -112,8 +113,8 @@ void VulkanStateTracker::TrackResetCommandPool(VkCommandPool command_pool) ++point) { entry.second->bound_descriptors[point].clear(); + entry.second->bound_pipelines[point] = nullptr; } - memset(entry.second->bound_pipelines, 0, sizeof(entry.second->bound_pipelines)); for (size_t i = 0; i < vulkan_state_info::CommandHandleType::NumHandleTypes; ++i) { @@ -472,6 +473,26 @@ void VulkanStateTracker::TrackBeginRenderPass(VkCommandBuffer command_buffer, co vulkan_wrappers::GetWrapper(begin_info->renderPass); wrapper->render_pass_framebuffer = vulkan_wrappers::GetWrapper(begin_info->framebuffer); + + if (wrapper->render_pass_framebuffer != nullptr) + { + for (size_t i = 0; i < wrapper->render_pass_framebuffer->attachments.size(); ++i) + { + if (wrapper->render_pass_framebuffer->attachments[i]->is_swapchain_image) + { + continue; + } + + const bool has_stencil = vkuFormatHasStencil(wrapper->render_pass_framebuffer->attachments[i]->format); + if ((!has_stencil && + wrapper->active_render_pass->attachment_info.store_op[i] == VK_ATTACHMENT_STORE_OP_STORE) || + (has_stencil && + wrapper->active_render_pass->attachment_info.stencil_store_op[i] == VK_ATTACHMENT_STORE_OP_STORE)) + { + wrapper->referenced_assets.images.push_back(wrapper->render_pass_framebuffer->attachments[i]); + } + } + } } void VulkanStateTracker::TrackEndRenderPass(VkCommandBuffer command_buffer) @@ -486,12 +507,12 @@ void VulkanStateTracker::TrackEndRenderPass(VkCommandBuffer command_buffer) assert((framebuffer_wrapper != nullptr) && (render_pass_wrapper != nullptr)); uint32_t attachment_count = static_cast(framebuffer_wrapper->attachments.size()); - assert(attachment_count <= render_pass_wrapper->attachment_final_layouts.size()); + assert(attachment_count <= render_pass_wrapper->attachment_info.attachment_final_layouts.size()); for (uint32_t i = 0; i < attachment_count; ++i) { wrapper->pending_layouts[framebuffer_wrapper->attachments[i]] = - render_pass_wrapper->attachment_final_layouts[i]; + render_pass_wrapper->attachment_info.attachment_final_layouts[i]; } // Clear the active render pass state now that the pass has ended. diff --git a/framework/encode/vulkan_state_tracker_initializers.h b/framework/encode/vulkan_state_tracker_initializers.h index c26d18b8aa..3de3336ffe 100644 --- a/framework/encode/vulkan_state_tracker_initializers.h +++ b/framework/encode/vulkan_state_tracker_initializers.h @@ -338,7 +338,9 @@ inline void InitializeStateattachmentCount; ++i) { - wrapper->attachment_final_layouts.push_back(create_info->pAttachments[i].finalLayout); + wrapper->attachment_info.attachment_final_layouts.push_back(create_info->pAttachments[i].finalLayout); + wrapper->attachment_info.store_op.push_back(create_info->pAttachments[i].storeOp); + wrapper->attachment_info.stencil_store_op.push_back(create_info->pAttachments[i].stencilStoreOp); } } } @@ -364,7 +366,9 @@ inline void InitializeStateattachmentCount; ++i) { - wrapper->attachment_final_layouts.push_back(create_info->pAttachments[i].finalLayout); + wrapper->attachment_info.attachment_final_layouts.push_back(create_info->pAttachments[i].finalLayout); + wrapper->attachment_info.store_op.push_back(create_info->pAttachments[i].storeOp); + wrapper->attachment_info.stencil_store_op.push_back(create_info->pAttachments[i].stencilStoreOp); } } } From 237082f4e5275e79a03d18e3e7ad9be9293d7670 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 15 Jul 2024 14:56:40 +0300 Subject: [PATCH 07/99] A fix in TrackMappedAssetsWrites --- framework/encode/vulkan_state_tracker.cpp | 37 ++++++++++++++++------- framework/util/page_guard_manager.cpp | 6 ++-- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index a2430cd1a2..1c8e62a3a3 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -2344,6 +2344,7 @@ void VulkanStateTracker::TrackMappedAssetsWrites(VkCommandBuffer commandBuffer) vulkan_wrappers::DeviceMemoryWrapper* dev_mem_wrapper = state_table_.GetDeviceMemoryWrapper(entry.first); assert(dev_mem_wrapper != nullptr); + size_t page = 0; for (auto img : dev_mem_wrapper->bound_assets.images) { if (img->is_swapchain_image) @@ -2351,37 +2352,46 @@ void VulkanStateTracker::TrackMappedAssetsWrites(VkCommandBuffer commandBuffer) continue; } - for (auto dirty_page : entry.second) + for (; page < entry.second.size(); ++page) { - const size_t page_offset_start = dirty_page * page_size; - const size_t page_offset_end = (dirty_page + 1) * page_size; + if (!entry.second[page]) + { + continue; + } + + const size_t page_offset_start = page * page_size; + const size_t page_offset_end = (page + 1) * page_size; if ((img->bind_offset >= page_offset_start && img->bind_offset <= page_offset_end) || ((img->bind_offset + img->size) >= page_offset_start && (img->bind_offset + img->size) <= page_offset_end) || - (img->bind_offset >= page_offset_start && (img->bind_offset + img->size) >= page_offset_end)) + (img->bind_offset <= page_offset_start && (img->bind_offset + img->size) >= page_offset_end)) { - img->dirty = true; cmd_buf_wrapper->referenced_assets.images.push_back(img); break; } } } + page = 0; for (auto buf : dev_mem_wrapper->bound_assets.buffers) { - for (auto dirty_page : entry.second) + for (; page < entry.second.size(); ++page) { - const size_t page_offset_start = dirty_page * page_size; - const size_t page_offset_end = (dirty_page + 1) * page_size; + if (!entry.second[page]) + { + continue; + } + + const size_t page_offset_start = page * page_size; + const size_t page_offset_end = (page + 1) * page_size; if ((buf->bind_offset >= page_offset_start && buf->bind_offset <= page_offset_end) || ((buf->bind_offset + buf->created_size) >= page_offset_start && (buf->bind_offset + buf->created_size) <= page_offset_end) || - (buf->bind_offset >= page_offset_start && + (buf->bind_offset <= page_offset_start && (buf->bind_offset + buf->created_size) >= page_offset_end)) { - buf->dirty = true; cmd_buf_wrapper->referenced_assets.buffers.push_back(buf); break; } @@ -2414,7 +2424,10 @@ void VulkanStateTracker::TrackPipelineDescriptors(vulkan_wrappers::CommandBuffer assert(desc_set_wrapper); const auto& descriptor_binding = desc_set_wrapper->bindings.find(binding_index); - assert(descriptor_binding != desc_set_wrapper->bindings.end()); + if (descriptor_binding == desc_set_wrapper->bindings.end()) + { + continue; + } switch (descriptor_binding->second.type) { @@ -2674,11 +2687,13 @@ void VulkanStateTracker::MarkReferencedAssetsAsDirty(VkCommandBuffer commandBuff for (auto img : cmd_buf_wrapper->referenced_assets.images) { + assert(img); img->dirty = true; } for (auto buf : cmd_buf_wrapper->referenced_assets.buffers) { + assert(buf); buf->dirty = true; } } diff --git a/framework/util/page_guard_manager.cpp b/framework/util/page_guard_manager.cpp index 3ea58f6123..e8eb14fcd9 100644 --- a/framework/util/page_guard_manager.cpp +++ b/framework/util/page_guard_manager.cpp @@ -1377,10 +1377,8 @@ void PageGuardManager::GetModifiedMemoryRegions( for (auto& entry : memory_info_) { - PageStatusTracker::PageStatus writes; - entry.second.status_tracker.GetActiveWrites(writes); - memories_page_status.emplace( - std::piecewise_construct, std::forward_as_tuple(entry.first), std::forward_as_tuple(std::move(writes))); + auto new_entry = memories_page_status.emplace(entry.first, PageStatusTracker::PageStatus()); + entry.second.status_tracker.GetActiveWrites(new_entry.first->second); } } From 58c88b5c660c208849208e24719d8d3bc70aee1d Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 15 Jul 2024 18:26:35 +0300 Subject: [PATCH 08/99] Print runtime of whole WriteState() --- framework/encode/vulkan_state_writer.cpp | 101 +++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index b6efc1a766..0bb28e479e 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -95,6 +95,9 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint // clang-format off blocks_written_ = 0; + uint32_t time, total_time = 0; + auto started = std::chrono::high_resolution_clock::now(); + format::Marker marker; marker.header.size = sizeof(marker.marker_type) + sizeof(marker.frame_number); marker.header.type = format::kStateMarkerBlock; @@ -111,6 +114,12 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint WriteDeviceState(state_table); StandardCreateWrite(state_table); + auto done = std::chrono::high_resolution_clock::now(); + time = std::chrono::duration_cast(done - started).count(); + total_time += time; + GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); + started = std::chrono::high_resolution_clock::now(); + // Utility object creation. StandardCreateWrite(state_table); StandardCreateWrite(state_table); @@ -118,34 +127,76 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint StandardCreateWrite(state_table); WritePrivateDataSlotState(state_table); + done = std::chrono::high_resolution_clock::now(); + time = std::chrono::duration_cast(done - started).count(); + total_time += time; + GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); + started = std::chrono::high_resolution_clock::now(); + // Synchronization primitive creation. WriteFenceState(state_table); WriteEventState(state_table); WriteSemaphoreState(state_table); + done = std::chrono::high_resolution_clock::now(); + time = std::chrono::duration_cast(done - started).count(); + total_time += time; + GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); + started = std::chrono::high_resolution_clock::now(); + // WSI object creation. StandardCreateWrite(state_table); StandardCreateWrite(state_table); WriteSurfaceKhrState(state_table); WriteSwapchainKhrState(state_table); + done = std::chrono::high_resolution_clock::now(); + time = std::chrono::duration_cast(done - started).count(); + total_time += time; + GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); + started = std::chrono::high_resolution_clock::now(); + // Resource creation. WriteBufferState(state_table); StandardCreateWrite(state_table); WriteDeviceMemoryState(state_table); + done = std::chrono::high_resolution_clock::now(); + time = std::chrono::duration_cast(done - started).count(); + total_time += time; + GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); + started = std::chrono::high_resolution_clock::now(); + // Bind memory after buffer/image creation and memory allocation. The buffer/image needs to be created before memory // allocation for extensions like dedicated allocation that require a valid buffer/image handle at memory allocation. WriteResourceMemoryState(state_table); + done = std::chrono::high_resolution_clock::now(); + time = std::chrono::duration_cast(done - started).count(); + total_time += time; + GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); + started = std::chrono::high_resolution_clock::now(); + // Map memory after uploading resource data to buffers and images, which may require mapping resource memory ranges. WriteMappedMemoryState(state_table); + done = std::chrono::high_resolution_clock::now(); + time = std::chrono::duration_cast(done - started).count(); + total_time += time; + GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); + started = std::chrono::high_resolution_clock::now(); + WriteBufferViewState(state_table); WriteImageViewState(state_table); StandardCreateWrite(state_table); StandardCreateWrite(state_table); + done = std::chrono::high_resolution_clock::now(); + time = std::chrono::duration_cast(done - started).count(); + total_time += time; + GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); + started = std::chrono::high_resolution_clock::now(); + // Render object creation. StandardCreateWrite(state_table); WriteFramebufferState(state_table); @@ -159,11 +210,37 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint StandardCreateWrite(state_table); StandardCreateWrite(state_table); + done = std::chrono::high_resolution_clock::now(); + time = std::chrono::duration_cast(done - started).count(); + total_time += time; + GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); + started = std::chrono::high_resolution_clock::now(); + // Descriptor creation. StandardCreateWrite(state_table); + + done = std::chrono::high_resolution_clock::now(); + time = std::chrono::duration_cast(done - started).count(); + total_time += time; + GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); + started = std::chrono::high_resolution_clock::now(); + StandardCreateWrite(state_table); + + done = std::chrono::high_resolution_clock::now(); + time = std::chrono::duration_cast(done - started).count(); + total_time += time; + GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); + started = std::chrono::high_resolution_clock::now(); + WriteDescriptorSetState(state_table); + done = std::chrono::high_resolution_clock::now(); + time = std::chrono::duration_cast(done - started).count(); + total_time += time; + GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); + started = std::chrono::high_resolution_clock::now(); + // Query object creation. WriteQueryPoolState(state_table); StandardCreateWrite(state_table); @@ -173,21 +250,45 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint StandardCreateWrite(state_table); StandardCreateWrite(state_table); + done = std::chrono::high_resolution_clock::now(); + time = std::chrono::duration_cast(done - started).count(); + total_time += time; + GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); + started = std::chrono::high_resolution_clock::now(); + // Command creation. StandardCreateWrite(state_table); WriteCommandBufferState(state_table); StandardCreateWrite(state_table); // TODO: If we intend to support this, we need to reserve command space after creation. WriteTrimCommandPool(state_table); + done = std::chrono::high_resolution_clock::now(); + time = std::chrono::duration_cast(done - started).count(); + total_time += time; + GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); + started = std::chrono::high_resolution_clock::now(); + // Process swapchain image acquire. WriteSwapchainImageState(state_table); + done = std::chrono::high_resolution_clock::now(); + time = std::chrono::duration_cast(done - started).count(); + total_time += time; + GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); + started = std::chrono::high_resolution_clock::now(); + marker.marker_type = format::kEndMarker; output_stream_->Write(&marker, sizeof(marker)); // For the EndMarker meta command ++blocks_written_; + + GFXRECON_WRITE_CONSOLE("--------------------------------------") + GFXRECON_WRITE_CONSOLE("%s()", __func__) + GFXRECON_WRITE_CONSOLE(" saved in %u ms", total_time); + GFXRECON_WRITE_CONSOLE("--------------------------------------") + return blocks_written_; // clang-format on } From 8b172cbe55449ee912ff07aa03bb393d9a28c5bf Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Thu, 18 Jul 2024 17:25:45 +0300 Subject: [PATCH 09/99] Write and read new metacomands --- framework/decode/file_processor.cpp | 76 +- framework/decode/file_processor.h | 6 + framework/encode/api_capture_manager.h | 8 +- framework/encode/capture_manager.cpp | 46 +- framework/encode/capture_manager.h | 2 + framework/encode/d3d12_capture_manager.cpp | 6 +- framework/encode/d3d12_capture_manager.h | 4 +- framework/encode/vulkan_capture_manager.cpp | 8 +- framework/encode/vulkan_capture_manager.h | 196 ++-- framework/encode/vulkan_handle_wrappers.h | 2 + framework/encode/vulkan_state_tracker.cpp | 8 + framework/encode/vulkan_state_tracker.h | 17 +- framework/encode/vulkan_state_writer.cpp | 1096 ++++++++++--------- framework/encode/vulkan_state_writer.h | 33 +- framework/format/format.h | 20 +- framework/util/file_output_stream.cpp | 5 +- framework/util/file_output_stream.h | 6 + framework/util/file_path.cpp | 5 +- 18 files changed, 871 insertions(+), 673 deletions(-) diff --git a/framework/decode/file_processor.cpp b/framework/decode/file_processor.cpp index 304fe3bc2f..d994c618dd 100644 --- a/framework/decode/file_processor.cpp +++ b/framework/decode/file_processor.cpp @@ -25,12 +25,14 @@ #include "decode/file_processor.h" #include "decode/decode_allocator.h" +#include "format/format.h" #include "format/format_util.h" #include "util/compressor.h" #include "util/logging.h" #include "util/platform.h" #include +#include #include GFXRECON_BEGIN_NAMESPACE(gfxrecon) @@ -42,7 +44,8 @@ const uint32_t kFirstFrame = 0; FileProcessor::FileProcessor() : file_header_{}, file_descriptor_(nullptr), current_frame_number_(kFirstFrame), bytes_read_(0), error_state_(kErrorInvalidFileDescriptor), annotation_handler_(nullptr), compressor_(nullptr), block_index_(0), - api_call_index_(0), block_limit_(0), capture_uses_frame_markers_(false), first_frame_(kFirstFrame + 1) + api_call_index_(0), block_limit_(0), capture_uses_frame_markers_(false), first_frame_(kFirstFrame + 1), + asset_file_descriptor_(nullptr), current_file_descriptor_(nullptr) {} FileProcessor::FileProcessor(uint64_t block_limit) : FileProcessor() @@ -60,7 +63,12 @@ FileProcessor::~FileProcessor() if (file_descriptor_) { - fclose(file_descriptor_); + util::platform::FileClose(file_descriptor_); + } + + if (asset_file_descriptor_) + { + util::platform::FileClose(asset_file_descriptor_); } DecodeAllocator::DestroyInstance(); @@ -91,7 +99,7 @@ bool FileProcessor::Initialize(const std::string& filename) } else { - fclose(file_descriptor_); + util::platform::FileClose(file_descriptor_); file_descriptor_ = nullptr; } } @@ -104,6 +112,19 @@ bool FileProcessor::Initialize(const std::string& filename) return success; } +bool FileProcessor::OpenAssetFile() +{ + int result = util::platform::FileOpen(&asset_file_descriptor_, asset_filename_.c_str(), "rb"); + if (result || asset_file_descriptor_ == nullptr) + { + GFXRECON_LOG_ERROR("Failed to open file %s", asset_filename_.c_str()); + error_state_ = kErrorOpeningFile; + return false; + } + + return true; +} + bool FileProcessor::ProcessNextFrame() { bool success = IsFileValid(); @@ -467,7 +488,9 @@ bool FileProcessor::ReadCompressedParameterBuffer(size_t compressed_buffer_size bool FileProcessor::ReadBytes(void* buffer, size_t buffer_size) { - if (util::platform::FileRead(buffer, buffer_size, file_descriptor_)) + FILE* fd = current_file_descriptor_ != nullptr ? current_file_descriptor_ : file_descriptor_; + + if (util::platform::FileRead(buffer, buffer_size, fd)) { bytes_read_ += buffer_size; return true; @@ -1842,6 +1865,51 @@ bool FileProcessor::ProcessMetaData(const format::BlockHeader& block_header, for decoder->DispatchSetEnvironmentVariablesCommand(header, env_string); } } + else if (meta_data_type == format::MetaDataType::kAssetFilename) + { + // This command does not support compression. + assert(block_header.type != format::BlockType::kCompressedMetaDataBlock); + + format::AssetFilame asset_filename_cmd; + uint32_t length; + success = ReadBytes(&asset_filename_cmd.thread_id, sizeof(asset_filename_cmd.thread_id)); + success = success && ReadBytes(&length, sizeof(length)); + + std::vector name(length + 1); + success = ReadBytes(name.data(), length); + name[length] = '\0'; + + asset_filename_ = std::string(name.data()); + + OpenAssetFile(); + } + else if (meta_data_type == format::MetaDataType::kLoadAssetFromFile) + { + format::LoadAssetFromAssetFile load_asset; + success = ReadBytes(&load_asset.thread_id, sizeof(load_asset.thread_id)); + success = success && ReadBytes(&load_asset.asset_id, sizeof(load_asset.asset_id)); + success = success && ReadBytes(&load_asset.offset, sizeof(load_asset.offset)); + + util::platform::FileSeek(asset_file_descriptor_, load_asset.offset, util::platform::FileSeekSet); + current_file_descriptor_ = asset_file_descriptor_; + + format::BlockHeader block_header; + success = ReadBlockHeader(&block_header); + assert(format::RemoveCompressedBlockBit(block_header.type) == format::BlockType::kMetaDataBlock); + + format::MetaDataId meta_data_id = + format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_None, format::MetaDataType::kUnknownMetaDataType); + + success = ReadBytes(&meta_data_id, sizeof(meta_data_id)); + + format::MetaDataType meta_data_type = format::GetMetaDataType(meta_data_id); + + assert(meta_data_type == format::MetaDataType::kInitBufferCommand || + meta_data_type == format::MetaDataType::kInitImageCommand); + + ProcessMetaData(block_header, meta_data_id); + current_file_descriptor_ = file_descriptor_; + } else { if ((meta_data_type == format::MetaDataType::kReserved23) || diff --git a/framework/decode/file_processor.h b/framework/decode/file_processor.h index 8b8a9fb6c4..bd5febbc5f 100644 --- a/framework/decode/file_processor.h +++ b/framework/decode/file_processor.h @@ -169,6 +169,8 @@ class FileProcessor bool IsFileValid() const { return (file_descriptor_ && !feof(file_descriptor_) && !ferror(file_descriptor_)); } + bool OpenAssetFile(); + private: std::string filename_; format::FileHeader file_header_; @@ -184,6 +186,10 @@ class FileProcessor bool enable_print_block_info_{ false }; int64_t block_index_from_{ 0 }; int64_t block_index_to_{ 0 }; + + std::string asset_filename_; + FILE* asset_file_descriptor_; + FILE* current_file_descriptor_; }; GFXRECON_END_NAMESPACE(decode) diff --git a/framework/encode/api_capture_manager.h b/framework/encode/api_capture_manager.h index 6f38c35283..09551bcf67 100644 --- a/framework/encode/api_capture_manager.h +++ b/framework/encode/api_capture_manager.h @@ -43,9 +43,11 @@ class ApiCaptureManager static auto AcquireExclusiveApiCallLock() { return std::move(CommonCaptureManager::AcquireExclusiveApiCallLock()); } // Virtual interface - virtual void CreateStateTracker() = 0; - virtual void DestroyStateTracker() = 0; - virtual void WriteTrackedState(util::FileOutputStream* file_stream, format::ThreadId thread_id) = 0; + virtual void CreateStateTracker() = 0; + virtual void DestroyStateTracker() = 0; + virtual void WriteTrackedState(util::FileOutputStream* file_stream, + format::ThreadId thread_id, + util::FileOutputStream* asseet_file_stream = nullptr) = 0; virtual CaptureSettings::TraceSettings GetDefaultTraceSettings(); format::ApiFamilyId GetApiFamily() const { return api_family_; } diff --git a/framework/encode/capture_manager.cpp b/framework/encode/capture_manager.cpp index ca9c99fa7f..6135070b05 100644 --- a/framework/encode/capture_manager.cpp +++ b/framework/encode/capture_manager.cpp @@ -22,6 +22,7 @@ ** DEALINGS IN THE SOFTWARE. */ +#include #include PROJECT_VERSION_HEADER_FILE #include "encode/capture_manager.h" @@ -381,6 +382,16 @@ bool CommonCaptureManager::Initialize(format::ApiFamilyId api_ { GFXRECON_ASSERT(trace_settings.trim_boundary != CaptureSettings::TrimBoundary::kUnknown); + std::string asset_file_name = CreateAssetFilename(base_filename_); + asset_file_stream_ = std::make_unique(asset_file_name, kFileStreamBufferSize); + + GFXRECON_WRITE_CONSOLE("asset_file_name: %s", asset_file_name.c_str()) + + if (!asset_file_stream_->IsValid()) + { + asset_file_stream_ = nullptr; + } + // Override default kModeWrite capture mode. trim_enabled_ = true; trim_boundary_ = trace_settings.trim_boundary; @@ -701,6 +712,13 @@ void CommonCaptureManager::CheckContinueCaptureForWriteMode(format::ApiFamilyId trim_enabled_ = false; trim_boundary_ = CaptureSettings::TrimBoundary::kUnknown; capture_mode_ = kModeDisabled; + + if (asset_file_stream_) + { + asset_file_stream_->Flush(); + asset_file_stream_ = nullptr; + } + // Clean up all of the capture manager's state trackers for (auto& manager_it : api_capture_managers_) { @@ -917,6 +935,32 @@ std::string CommonCaptureManager::CreateTrimFilename(const std::string& base return util::filepath::InsertFilenamePostfix(base_filename, range_string); } +std::string CommonCaptureManager::CreateAssetFilename(const std::string& base_filename) const +{ + GFXRECON_WRITE_CONSOLE("%s()", __func__) + GFXRECON_WRITE_CONSOLE(" base_filename: %s", base_filename.c_str()) + + std::string asset_filename = base_filename; + + size_t dot_pos = base_filename.rfind('.'); + if (dot_pos != std::string::npos) + { + GFXRECON_WRITE_CONSOLE("base_filename.substr(dot_pos): %s", base_filename.substr(dot_pos).c_str()) + if (base_filename.substr(dot_pos) == ".gfxr") + { + asset_filename.insert(dot_pos, "_asset_file"); + } + } + else + { + asset_filename += std::string("_asset_file"); + } + + GFXRECON_WRITE_CONSOLE(" asset_filename: %s", asset_filename.c_str()) + + return asset_filename; +} + bool CommonCaptureManager::CreateCaptureFile(format::ApiFamilyId api_family, const std::string& base_filename) { bool success = true; @@ -1057,7 +1101,7 @@ void CommonCaptureManager::ActivateTrimming() for (auto& manager : api_capture_managers_) { - manager.first->WriteTrackedState(file_stream_.get(), thread_data->thread_id_); + manager.first->WriteTrackedState(file_stream_.get(), thread_data->thread_id_, asset_file_stream_.get()); } } diff --git a/framework/encode/capture_manager.h b/framework/encode/capture_manager.h index c30710ce17..60e1c698d2 100644 --- a/framework/encode/capture_manager.h +++ b/framework/encode/capture_manager.h @@ -264,6 +264,7 @@ class CommonCaptureManager util::ScreenshotFormat GetScreenShotFormat() const { return screenshot_format_; } std::string CreateTrimFilename(const std::string& base_filename, const util::UintRange& trim_range); + std::string CreateAssetFilename(const std::string& base_filename) const; bool CreateCaptureFile(format::ApiFamilyId api_family, const std::string& base_filename); void WriteCaptureOptions(std::string& operation_annotation); void ActivateTrimming(); @@ -343,6 +344,7 @@ class CommonCaptureManager capture_settings_; // Settings from the settings file and environment at capture manager creation time. std::unique_ptr file_stream_; + std::unique_ptr asset_file_stream_; format::EnabledOptions file_options_; std::string base_filename_; bool timestamp_filename_; diff --git a/framework/encode/d3d12_capture_manager.cpp b/framework/encode/d3d12_capture_manager.cpp index 1cd0f6d1c5..702d08153a 100644 --- a/framework/encode/d3d12_capture_manager.cpp +++ b/framework/encode/d3d12_capture_manager.cpp @@ -169,10 +169,12 @@ void D3D12CaptureManager::EndCommandListMethodCallCapture(ID3D12CommandList_Wrap EndMethodCallCapture(); } -void D3D12CaptureManager::WriteTrackedState(util::FileOutputStream* file_stream, format::ThreadId thread_id) +void D3D12CaptureManager::WriteTrackedState(util::FileOutputStream* file_stream, + format::ThreadId thread_id, + util::FileOutputStream* assert_file_stream) { Dx12StateWriter state_writer(file_stream, GetCompressor(), thread_id); - state_tracker_->WriteState(&state_writer, GetCurrentFrame()); + state_tracker_->WriteState(&state_writer, GetCurrentFrame(), assert_file_stream); } void D3D12CaptureManager::PreAcquireSwapChainImages(IDXGISwapChain_Wrapper* wrapper, diff --git a/framework/encode/d3d12_capture_manager.h b/framework/encode/d3d12_capture_manager.h index 16b510d7fb..7f78c6c7e6 100644 --- a/framework/encode/d3d12_capture_manager.h +++ b/framework/encode/d3d12_capture_manager.h @@ -769,7 +769,9 @@ class D3D12CaptureManager : public ApiCaptureManager virtual void DestroyStateTracker() override { state_tracker_ = nullptr; } - virtual void WriteTrackedState(util::FileOutputStream* file_stream, format::ThreadId thread_id) override; + virtual void WriteTrackedState(util::FileOutputStream* file_stream, + format::ThreadId thread_id, + util::FileOutputStream* assert_file_stream = nullptr) override; void PreAcquireSwapChainImages(IDXGISwapChain_Wrapper* wrapper, IUnknown* command_queue, diff --git a/framework/encode/vulkan_capture_manager.cpp b/framework/encode/vulkan_capture_manager.cpp index c266a9b100..4192d3dd13 100644 --- a/framework/encode/vulkan_capture_manager.cpp +++ b/framework/encode/vulkan_capture_manager.cpp @@ -100,10 +100,12 @@ void VulkanCaptureManager::DestroyInstance() singleton_->common_manager_->DestroyInstance(singleton_); } -void VulkanCaptureManager::WriteTrackedState(util::FileOutputStream* file_stream, format::ThreadId thread_id) +void VulkanCaptureManager::WriteTrackedState(util::FileOutputStream* file_stream, + format::ThreadId thread_id, + util::FileOutputStream* asset_file_stream) { - VulkanStateWriter state_writer(file_stream, GetCompressor(), thread_id); - uint64_t n_blocks = state_tracker_->WriteState(&state_writer, GetCurrentFrame()); + uint64_t n_blocks = + state_tracker_->WriteState(file_stream, thread_id, asset_file_stream, GetCompressor(), GetCurrentFrame()); common_manager_->IncrementBlockIndex(n_blocks); } diff --git a/framework/encode/vulkan_capture_manager.h b/framework/encode/vulkan_capture_manager.h index 2ae0691f43..d8628ad71c 100644 --- a/framework/encode/vulkan_capture_manager.h +++ b/framework/encode/vulkan_capture_manager.h @@ -1373,102 +1373,110 @@ class VulkanCaptureManager : public ApiCaptureManager const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); -void PostProcess_vkCmdDraw(VkCommandBuffer commandBuffer, - uint32_t vertexCount, - uint32_t instanceCount, - uint32_t firstVertex, - uint32_t firstInstance); - -void PostProcess_vkCmdDrawIndexed(VkCommandBuffer commandBuffer, - uint32_t indexCount, - uint32_t instanceCount, - uint32_t firstIndex, - int32_t vertexOffset, - uint32_t firstInstance); - -void PostProcess_vkCmdDrawIndirect( + void PostProcess_vkCmdDraw(VkCommandBuffer commandBuffer, + uint32_t vertexCount, + uint32_t instanceCount, + uint32_t firstVertex, + uint32_t firstInstance); + + void PostProcess_vkCmdDrawIndexed(VkCommandBuffer commandBuffer, + uint32_t indexCount, + uint32_t instanceCount, + uint32_t firstIndex, + int32_t vertexOffset, + uint32_t firstInstance); + + void PostProcess_vkCmdDrawIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); -void PostProcess_vkCmdDrawIndexedIndirect( + void PostProcess_vkCmdDrawIndexedIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); -void PostProcess_vkCmdDrawIndirectCount(VkCommandBuffer commandBuffer, - VkBuffer buffer, - VkDeviceSize offset, - VkBuffer countBuffer, - VkDeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride); - -void PostProcess_vkCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, - VkBuffer buffer, - VkDeviceSize offset, - VkBuffer countBuffer, - VkDeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride); - -void PostProcess_vkCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, - VkBuffer buffer, - VkDeviceSize offset, - VkBuffer countBuffer, - VkDeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride); - -void PostProcess_vkCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, - VkBuffer buffer, - VkDeviceSize offset, - VkBuffer countBuffer, - VkDeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride); - -void PostProcess_vkCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); -void PostProcess_vkCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset); -void PostProcess_vkCmdDispatchBase(VkCommandBuffer commandBuffer, - uint32_t baseGroupX, - uint32_t baseGroupY, - uint32_t baseGroupZ, - uint32_t groupCountX, - uint32_t groupCountY, - uint32_t groupCountZ); -void PostProcess_vkCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, - uint32_t baseGroupX, - uint32_t baseGroupY, - uint32_t baseGroupZ, - uint32_t groupCountX, - uint32_t groupCountY, - uint32_t groupCountZ); - -void PostProcess_vkCmdTraceRaysNV(VkCommandBuffer commandBuffer, - VkBuffer raygenShaderBindingTableBuffer, - VkDeviceSize raygenShaderBindingOffset, - VkBuffer missShaderBindingTableBuffer, - VkDeviceSize missShaderBindingOffset, - VkDeviceSize missShaderBindingStride, - VkBuffer hitShaderBindingTableBuffer, - VkDeviceSize hitShaderBindingOffset, - VkDeviceSize hitShaderBindingStride, - VkBuffer callableShaderBindingTableBuffer, - VkDeviceSize callableShaderBindingOffset, - VkDeviceSize callableShaderBindingStride, - uint32_t width, - uint32_t height, - uint32_t depth); - -void PostProcess_vkCmdTraceRaysKHR(VkCommandBuffer commandBuffer, - const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, - const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, - const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, - const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, - uint32_t width, - uint32_t height, - uint32_t depth); - -void PostProcess_vkCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, VkDeviceAddress indirectDeviceAddress); - -void PostProcess_vkCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress); + void PostProcess_vkCmdDrawIndirectCount(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); + + void PostProcess_vkCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); + + void PostProcess_vkCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); + + void PostProcess_vkCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); + + void PostProcess_vkCmdDispatch(VkCommandBuffer commandBuffer, + uint32_t groupCountX, + uint32_t groupCountY, + uint32_t groupCountZ); + void PostProcess_vkCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset); + void PostProcess_vkCmdDispatchBase(VkCommandBuffer commandBuffer, + uint32_t baseGroupX, + uint32_t baseGroupY, + uint32_t baseGroupZ, + uint32_t groupCountX, + uint32_t groupCountY, + uint32_t groupCountZ); + void PostProcess_vkCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, + uint32_t baseGroupX, + uint32_t baseGroupY, + uint32_t baseGroupZ, + uint32_t groupCountX, + uint32_t groupCountY, + uint32_t groupCountZ); + + void PostProcess_vkCmdTraceRaysNV(VkCommandBuffer commandBuffer, + VkBuffer raygenShaderBindingTableBuffer, + VkDeviceSize raygenShaderBindingOffset, + VkBuffer missShaderBindingTableBuffer, + VkDeviceSize missShaderBindingOffset, + VkDeviceSize missShaderBindingStride, + VkBuffer hitShaderBindingTableBuffer, + VkDeviceSize hitShaderBindingOffset, + VkDeviceSize hitShaderBindingStride, + VkBuffer callableShaderBindingTableBuffer, + VkDeviceSize callableShaderBindingOffset, + VkDeviceSize callableShaderBindingStride, + uint32_t width, + uint32_t height, + uint32_t depth); + + void PostProcess_vkCmdTraceRaysKHR(VkCommandBuffer commandBuffer, + const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, + uint32_t width, + uint32_t height, + uint32_t depth); + + void PostProcess_vkCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer, + const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, + VkDeviceAddress indirectDeviceAddress); + + void PostProcess_vkCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress); #if defined(__ANDROID__) void OverrideGetPhysicalDeviceSurfacePresentModesKHR(uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes); @@ -1483,7 +1491,9 @@ void PostProcess_vkCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDev virtual void DestroyStateTracker() override { state_tracker_ = nullptr; } - virtual void WriteTrackedState(util::FileOutputStream* file_stream, format::ThreadId thread_id) override; + virtual void WriteTrackedState(util::FileOutputStream* file_stream, + format::ThreadId thread_id, + util::FileOutputStream* assert_file_stream = nullptr) override; private: struct HardwareBufferInfo diff --git a/framework/encode/vulkan_handle_wrappers.h b/framework/encode/vulkan_handle_wrappers.h index 82a41b6518..e2002e1473 100644 --- a/framework/encode/vulkan_handle_wrappers.h +++ b/framework/encode/vulkan_handle_wrappers.h @@ -321,6 +321,8 @@ struct DescriptorSetWrapper : public HandleWrapper // Creation info for objects used to allocate the descriptor set, which may have been destroyed after descriptor set // allocation. vulkan_state_info::CreateDependencyInfo set_layout_dependency; + + bool dirty{ true }; }; struct DescriptorPoolWrapper : public HandleWrapper diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index 1c8e62a3a3..dbedb38c73 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -684,6 +684,8 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w auto wrapper = vulkan_wrappers::GetWrapper(write->dstSet); assert(wrapper != nullptr); + wrapper->dirty = true; + // Descriptor update rules specify that a write descriptorCount that is greater than the binding's count // will result in updates to consecutive bindings, where the next binding is dstBinding+1 and // starting from array element 0. Track the current count, binding, and array element to handle @@ -890,6 +892,8 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w } } } + + } if (copies != nullptr) @@ -901,6 +905,8 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w auto src_wrapper = vulkan_wrappers::GetWrapper(copy->srcSet); assert((dst_wrapper != nullptr) && (src_wrapper != nullptr)); + dst_wrapper->dirty = true; + // Descriptor update rules specify that a write descriptorCount that is greater than the binding's count // will result in updates to/from consecutive bindings. uint32_t current_count = copy->descriptorCount; @@ -1038,6 +1044,8 @@ void VulkanStateTracker::TrackUpdateDescriptorSetWithTemplate(VkDescriptorSet auto wrapper = vulkan_wrappers::GetWrapper(set); const uint8_t* bytes = reinterpret_cast(data); + wrapper->dirty = true; + for (const auto& entry : template_info->image_info) { // Descriptor update rules specify that a write descriptorCount that is greater than the binding's count diff --git a/framework/encode/vulkan_state_tracker.h b/framework/encode/vulkan_state_tracker.h index 57acaabde9..564c1249ec 100644 --- a/framework/encode/vulkan_state_tracker.h +++ b/framework/encode/vulkan_state_tracker.h @@ -53,15 +53,16 @@ class VulkanStateTracker ~VulkanStateTracker(); - uint64_t WriteState(VulkanStateWriter* writer, uint64_t frame_number) + uint64_t WriteState(util::FileOutputStream* file_stream, + format::ThreadId thread_id, + util::FileOutputStream* asset_file_stream, + util::Compressor* compressor, + uint64_t frame_number) { - if (writer != nullptr) - { - std::unique_lock lock(state_table_mutex_); - return writer->WriteState(state_table_, frame_number); - } + VulkanStateWriter state_writer(file_stream, compressor, thread_id, asset_file_offsets_, asset_file_stream); - return 0; + std::unique_lock lock(state_table_mutex_); + return state_writer.WriteState(state_table_, frame_number); } template @@ -699,6 +700,8 @@ class VulkanStateTracker // Keeps track of acceleration structures' device addresses std::unordered_map as_device_addresses_map; + + std::unordered_map asset_file_offsets_; }; GFXRECON_END_NAMESPACE(encode) diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index 0bb28e479e..ccd9a80449 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -26,12 +26,14 @@ #include "encode/struct_pointer_encoder.h" #include "encode/vulkan_handle_wrappers.h" #include "encode/vulkan_state_info.h" +#include "format/format.h" #include "format/format_util.h" #include "util/logging.h" #include #include #include +#include #include #include @@ -79,11 +81,14 @@ static bool IsImageReadable(VkMemoryPropertyFlags property (memory_wrapper->mapped_size == VK_WHOLE_SIZE))))); } -VulkanStateWriter::VulkanStateWriter(util::FileOutputStream* output_stream, - util::Compressor* compressor, - format::ThreadId thread_id) : +VulkanStateWriter::VulkanStateWriter(util::FileOutputStream* output_stream, + util::Compressor* compressor, + format::ThreadId thread_id, + std::unordered_map& asset_file_offsets, + util::FileOutputStream* asset_file_stream) : output_stream_(output_stream), - compressor_(compressor), thread_id_(thread_id), encoder_(¶meter_stream_) + compressor_(compressor), thread_id_(thread_id), encoder_(¶meter_stream_), asset_file_stream_(asset_file_stream), + asset_file_offsets_(asset_file_offsets) { assert(output_stream != nullptr); } @@ -95,7 +100,6 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint // clang-format off blocks_written_ = 0; - uint32_t time, total_time = 0; auto started = std::chrono::high_resolution_clock::now(); format::Marker marker; @@ -114,12 +118,6 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint WriteDeviceState(state_table); StandardCreateWrite(state_table); - auto done = std::chrono::high_resolution_clock::now(); - time = std::chrono::duration_cast(done - started).count(); - total_time += time; - GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); - started = std::chrono::high_resolution_clock::now(); - // Utility object creation. StandardCreateWrite(state_table); StandardCreateWrite(state_table); @@ -127,76 +125,35 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint StandardCreateWrite(state_table); WritePrivateDataSlotState(state_table); - done = std::chrono::high_resolution_clock::now(); - time = std::chrono::duration_cast(done - started).count(); - total_time += time; - GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); - started = std::chrono::high_resolution_clock::now(); - // Synchronization primitive creation. WriteFenceState(state_table); WriteEventState(state_table); WriteSemaphoreState(state_table); - done = std::chrono::high_resolution_clock::now(); - time = std::chrono::duration_cast(done - started).count(); - total_time += time; - GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); - started = std::chrono::high_resolution_clock::now(); - // WSI object creation. StandardCreateWrite(state_table); StandardCreateWrite(state_table); WriteSurfaceKhrState(state_table); WriteSwapchainKhrState(state_table); - done = std::chrono::high_resolution_clock::now(); - time = std::chrono::duration_cast(done - started).count(); - total_time += time; - GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); - started = std::chrono::high_resolution_clock::now(); - // Resource creation. WriteBufferState(state_table); StandardCreateWrite(state_table); WriteDeviceMemoryState(state_table); - done = std::chrono::high_resolution_clock::now(); - time = std::chrono::duration_cast(done - started).count(); - total_time += time; - GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); - started = std::chrono::high_resolution_clock::now(); - // Bind memory after buffer/image creation and memory allocation. The buffer/image needs to be created before memory // allocation for extensions like dedicated allocation that require a valid buffer/image handle at memory allocation. + WriteAssetFilename(); WriteResourceMemoryState(state_table); - done = std::chrono::high_resolution_clock::now(); - time = std::chrono::duration_cast(done - started).count(); - total_time += time; - GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); - started = std::chrono::high_resolution_clock::now(); - // Map memory after uploading resource data to buffers and images, which may require mapping resource memory ranges. WriteMappedMemoryState(state_table); - done = std::chrono::high_resolution_clock::now(); - time = std::chrono::duration_cast(done - started).count(); - total_time += time; - GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); - started = std::chrono::high_resolution_clock::now(); - WriteBufferViewState(state_table); WriteImageViewState(state_table); StandardCreateWrite(state_table); StandardCreateWrite(state_table); - done = std::chrono::high_resolution_clock::now(); - time = std::chrono::duration_cast(done - started).count(); - total_time += time; - GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); - started = std::chrono::high_resolution_clock::now(); - // Render object creation. StandardCreateWrite(state_table); WriteFramebufferState(state_table); @@ -210,37 +167,13 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint StandardCreateWrite(state_table); StandardCreateWrite(state_table); - done = std::chrono::high_resolution_clock::now(); - time = std::chrono::duration_cast(done - started).count(); - total_time += time; - GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); - started = std::chrono::high_resolution_clock::now(); - // Descriptor creation. StandardCreateWrite(state_table); - done = std::chrono::high_resolution_clock::now(); - time = std::chrono::duration_cast(done - started).count(); - total_time += time; - GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); - started = std::chrono::high_resolution_clock::now(); - StandardCreateWrite(state_table); - done = std::chrono::high_resolution_clock::now(); - time = std::chrono::duration_cast(done - started).count(); - total_time += time; - GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); - started = std::chrono::high_resolution_clock::now(); - WriteDescriptorSetState(state_table); - done = std::chrono::high_resolution_clock::now(); - time = std::chrono::duration_cast(done - started).count(); - total_time += time; - GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); - started = std::chrono::high_resolution_clock::now(); - // Query object creation. WriteQueryPoolState(state_table); StandardCreateWrite(state_table); @@ -250,32 +183,15 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint StandardCreateWrite(state_table); StandardCreateWrite(state_table); - done = std::chrono::high_resolution_clock::now(); - time = std::chrono::duration_cast(done - started).count(); - total_time += time; - GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); - started = std::chrono::high_resolution_clock::now(); - // Command creation. StandardCreateWrite(state_table); WriteCommandBufferState(state_table); StandardCreateWrite(state_table); // TODO: If we intend to support this, we need to reserve command space after creation. WriteTrimCommandPool(state_table); - done = std::chrono::high_resolution_clock::now(); - time = std::chrono::duration_cast(done - started).count(); - total_time += time; - GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); - started = std::chrono::high_resolution_clock::now(); - // Process swapchain image acquire. WriteSwapchainImageState(state_table); - done = std::chrono::high_resolution_clock::now(); - time = std::chrono::duration_cast(done - started).count(); - total_time += time; - GFXRECON_WRITE_CONSOLE(" %u - %u ms", __LINE__, time); - started = std::chrono::high_resolution_clock::now(); marker.marker_type = format::kEndMarker; output_stream_->Write(&marker, sizeof(marker)); @@ -283,16 +199,39 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint // For the EndMarker meta command ++blocks_written_; - + auto done = std::chrono::high_resolution_clock::now(); + uint32_t time = std::chrono::duration_cast(done - started).count(); GFXRECON_WRITE_CONSOLE("--------------------------------------") GFXRECON_WRITE_CONSOLE("%s()", __func__) - GFXRECON_WRITE_CONSOLE(" saved in %u ms", total_time); + GFXRECON_WRITE_CONSOLE(" saved in %u ms", time); GFXRECON_WRITE_CONSOLE("--------------------------------------") return blocks_written_; // clang-format on } +void VulkanStateWriter::WriteAssetFilename() +{ + if (asset_file_stream_ == nullptr) + { + assert(0); + return; + } + + const std::string filename = asset_file_stream_->GetFilename(); + + format::AssetFilame asset_filename_cmd; + asset_filename_cmd.meta_header.block_header.type = format::BlockType::kMetaDataBlock; + asset_filename_cmd.meta_header.block_header.size = + format::GetMetaDataBlockBaseSize(asset_filename_cmd) + filename.length(); + asset_filename_cmd.meta_header.meta_data_id = + format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kAssetFilename); + asset_filename_cmd.length = filename.length(); + + output_stream_->Write(&asset_filename_cmd, sizeof(asset_filename_cmd)); + output_stream_->Write(filename.c_str(), filename.length()); +} + void VulkanStateWriter::WritePhysicalDeviceState(const VulkanStateTable& state_table) { std::set processed; @@ -944,69 +883,78 @@ void VulkanStateWriter::WriteDescriptorSetState(const VulkanStateTable& state_ta } }); - state_table.VisitWrappers([&](const vulkan_wrappers::DescriptorSetWrapper* wrapper) { + state_table.VisitWrappers([&](vulkan_wrappers::DescriptorSetWrapper* wrapper) { assert(wrapper != nullptr); - // Filter duplicate calls to vkAllocateDescriptorSets for descriptor sets that were allocated by the same API - // call and reference the same parameter buffer. - if (processed.find(wrapper->create_parameters.get()) == processed.end()) + // if (wrapper->dirty) { - // Write descriptor set creation call and add the parameter buffer to the processed set. - WriteFunctionCall(wrapper->create_call_id, wrapper->create_parameters.get()); - processed.insert(wrapper->create_parameters.get()); - } - - VkWriteDescriptorSet write = { VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET }; - write.dstSet = wrapper->handle; + wrapper->dirty = false; - for (const auto& binding_entry : wrapper->bindings) - { - const vulkan_state_info::DescriptorInfo* binding = &binding_entry.second; - bool active = false; + // Filter duplicate calls to vkAllocateDescriptorSets for descriptor sets that were allocated by the same + // API call and reference the same parameter buffer. + if (processed.find(wrapper->create_parameters.get()) == processed.end()) + { + // Write descriptor set creation call and add the parameter buffer to the processed set. + WriteFunctionCall(wrapper->create_call_id, wrapper->create_parameters.get()); + processed.insert(wrapper->create_parameters.get()); + } - write.dstBinding = binding_entry.first; + VkWriteDescriptorSet write = { VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET }; + write.dstSet = wrapper->handle; - for (uint32_t i = 0; i < binding->count; ++i) + for (const auto& binding_entry : wrapper->bindings) { - VkDescriptorType descriptor_type; - bool write_descriptor = CheckDescriptorStatus(binding, i, state_table, &descriptor_type); + const vulkan_state_info::DescriptorInfo* binding = &binding_entry.second; + bool active = false; + + write.dstBinding = binding_entry.first; - if (active != write_descriptor) + for (uint32_t i = 0; i < binding->count; ++i) { - if (!active) + VkDescriptorType descriptor_type; + bool write_descriptor = CheckDescriptorStatus(binding, i, state_table, &descriptor_type); + + if (active != write_descriptor) { - // Start of an active descriptor write range. - active = true; - write.dstArrayElement = i; - write.descriptorType = descriptor_type; + if (!active) + { + // Start of an active descriptor write range. + active = true; + write.dstArrayElement = i; + write.descriptorType = descriptor_type; + } + else + { + // End of an active descriptor write range. + active = false; + write.descriptorCount = i - write.dstArrayElement; + WriteDescriptorUpdateCommand(wrapper->device->handle_id, binding, &write); + } } - else + else if (active && (descriptor_type != write.descriptorType)) { - // End of an active descriptor write range. - active = false; + // Mutable descriptor type change within an active write range + // End current range write.descriptorCount = i - write.dstArrayElement; WriteDescriptorUpdateCommand(wrapper->device->handle_id, binding, &write); + // Start new range + write.descriptorType = descriptor_type; + write.dstArrayElement = i; } } - else if (active && (descriptor_type != write.descriptorType)) + + // Process final range, when last item in array contained an active write. + if (active) { - // Mutable descriptor type change within an active write range - // End current range - write.descriptorCount = i - write.dstArrayElement; + write.descriptorCount = binding->count - write.dstArrayElement; WriteDescriptorUpdateCommand(wrapper->device->handle_id, binding, &write); - // Start new range - write.descriptorType = descriptor_type; - write.dstArrayElement = i; } } - - // Process final range, when last item in array contained an active write. - if (active) - { - write.descriptorCount = binding->count - write.dstArrayElement; - WriteDescriptorUpdateCommand(wrapper->device->handle_id, binding, &write); - } } + // else + // { + + // } }); // Temporary object destruction. @@ -1402,7 +1350,9 @@ void VulkanStateWriter::ProcessHardwareBuffer(format::HandleId memory_id, void VulkanStateWriter::ProcessBufferMemory(const vulkan_wrappers::DeviceWrapper* device_wrapper, const std::vector& buffer_snapshot_info, - graphics::VulkanResourcesUtil& resource_util) + graphics::VulkanResourcesUtil& resource_util, + size_t& dumped_bytes, + size_t& skipped_bytes) { assert(device_wrapper != nullptr); @@ -1410,107 +1360,166 @@ void VulkanStateWriter::ProcessBufferMemory(const vulkan_wrappers::DeviceWrapper for (const auto& snapshot_entry : buffer_snapshot_info) { - const vulkan_wrappers::BufferWrapper* buffer_wrapper = snapshot_entry.buffer_wrapper; + vulkan_wrappers::BufferWrapper* buffer_wrapper = snapshot_entry.buffer_wrapper; const vulkan_wrappers::DeviceMemoryWrapper* memory_wrapper = snapshot_entry.memory_wrapper; const uint8_t* bytes = nullptr; std::vector data; - assert((buffer_wrapper != nullptr) && (memory_wrapper != nullptr)); - - if (snapshot_entry.need_staging_copy) - { - VkResult result = resource_util.ReadFromBufferResource( - buffer_wrapper->handle, buffer_wrapper->created_size, 0, buffer_wrapper->queue_family_index, data); + assert((buffer_wrapper != nullptr)); - if (result == VK_SUCCESS) - { - bytes = data.data(); - } - } - else + if (buffer_wrapper->dirty) { - assert((memory_wrapper->mapped_data == nullptr) || (memory_wrapper->mapped_offset == 0)); + assert(memory_wrapper != nullptr); + buffer_wrapper->dirty = false; - VkResult result = VK_SUCCESS; - - if (memory_wrapper->mapped_data == nullptr) + if (snapshot_entry.need_staging_copy) { - void* map_ptr = nullptr; - result = device_table->MapMemory(device_wrapper->handle, - memory_wrapper->handle, - buffer_wrapper->bind_offset, - buffer_wrapper->created_size, - 0, - &map_ptr); + VkResult result = resource_util.ReadFromBufferResource( + buffer_wrapper->handle, buffer_wrapper->created_size, 0, buffer_wrapper->queue_family_index, data); if (result == VK_SUCCESS) { - bytes = reinterpret_cast(map_ptr); + bytes = data.data(); } } else { - bytes = reinterpret_cast(memory_wrapper->mapped_data) + buffer_wrapper->bind_offset; - } + assert((memory_wrapper->mapped_data == nullptr) || (memory_wrapper->mapped_offset == 0)); - if ((result == VK_SUCCESS) && !IsMemoryCoherent(snapshot_entry.memory_properties)) - { - InvalidateMappedMemoryRange( - device_wrapper, memory_wrapper->handle, buffer_wrapper->bind_offset, buffer_wrapper->created_size); - } - } + VkResult result = VK_SUCCESS; - if (bytes != nullptr) - { - GFXRECON_CHECK_CONVERSION_DATA_LOSS(size_t, buffer_wrapper->created_size); + if (memory_wrapper->mapped_data == nullptr) + { + void* map_ptr = nullptr; + result = device_table->MapMemory(device_wrapper->handle, + memory_wrapper->handle, + buffer_wrapper->bind_offset, + buffer_wrapper->created_size, + 0, + &map_ptr); + + if (result == VK_SUCCESS) + { + bytes = reinterpret_cast(map_ptr); + } + } + else + { + bytes = reinterpret_cast(memory_wrapper->mapped_data) + buffer_wrapper->bind_offset; + } - size_t data_size = static_cast(buffer_wrapper->created_size); - format::InitBufferCommandHeader upload_cmd; + if ((result == VK_SUCCESS) && !IsMemoryCoherent(snapshot_entry.memory_properties)) + { + InvalidateMappedMemoryRange(device_wrapper, + memory_wrapper->handle, + buffer_wrapper->bind_offset, + buffer_wrapper->created_size); + } + } - upload_cmd.meta_header.block_header.type = format::kMetaDataBlock; - upload_cmd.meta_header.meta_data_id = - format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kInitBufferCommand); - upload_cmd.thread_id = thread_id_; - upload_cmd.device_id = device_wrapper->handle_id; - upload_cmd.buffer_id = buffer_wrapper->handle_id; - upload_cmd.data_size = data_size; + assert(bytes); - if (compressor_ != nullptr) + if (bytes != nullptr) { - size_t compressed_size = compressor_->Compress(data_size, bytes, &compressed_parameter_buffer_, 0); + GFXRECON_CHECK_CONVERSION_DATA_LOSS(size_t, buffer_wrapper->created_size); + + size_t data_size = static_cast(buffer_wrapper->created_size); + format::InitBufferCommandHeader upload_cmd; - if ((compressed_size > 0) && (compressed_size < data_size)) + upload_cmd.meta_header.block_header.type = format::kMetaDataBlock; + upload_cmd.meta_header.meta_data_id = format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_Vulkan, + format::MetaDataType::kInitBufferCommand); + upload_cmd.thread_id = thread_id_; + upload_cmd.device_id = device_wrapper->handle_id; + upload_cmd.buffer_id = buffer_wrapper->handle_id; + upload_cmd.data_size = data_size; + + if (compressor_ != nullptr) { - upload_cmd.meta_header.block_header.type = format::BlockType::kCompressedMetaDataBlock; + size_t compressed_size = compressor_->Compress(data_size, bytes, &compressed_parameter_buffer_, 0); + + if ((compressed_size > 0) && (compressed_size < data_size)) + { + upload_cmd.meta_header.block_header.type = format::BlockType::kCompressedMetaDataBlock; - bytes = compressed_parameter_buffer_.data(); - data_size = compressed_size; + bytes = compressed_parameter_buffer_.data(); + data_size = compressed_size; + } } - } - // Calculate size of packet with compressed or uncompressed data size. - upload_cmd.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(upload_cmd) + data_size; + // Calculate size of packet with compressed or uncompressed data size. + upload_cmd.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(upload_cmd) + data_size; - output_stream_->Write(&upload_cmd, sizeof(upload_cmd)); - output_stream_->Write(bytes, data_size); - ++blocks_written_; + if (asset_file_stream_ != nullptr) + { + const int64_t offset = asset_file_stream_->GetOffset(); + + asset_file_stream_->Write(&upload_cmd, sizeof(upload_cmd)); + asset_file_stream_->Write(bytes, data_size); + + dumped_bytes += data_size; + + asset_file_offsets_[buffer_wrapper->handle_id] = offset; + + format::LoadAssetFromAssetFile load_asset_cmd; + load_asset_cmd.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(load_asset_cmd); + load_asset_cmd.meta_header.block_header.type = format::kMetaDataBlock; + load_asset_cmd.meta_header.meta_data_id = format::MakeMetaDataId( + format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kLoadAssetFromFile); + load_asset_cmd.thread_id = thread_id_; + load_asset_cmd.asset_id = buffer_wrapper->handle_id; + load_asset_cmd.offset = offset; + + output_stream_->Write(&load_asset_cmd, sizeof(load_asset_cmd)); + } + else + { + assert(0); + output_stream_->Write(&upload_cmd, sizeof(upload_cmd)); + output_stream_->Write(bytes, data_size); + } + ++blocks_written_; - if (!snapshot_entry.need_staging_copy && memory_wrapper->mapped_data == nullptr) + if (!snapshot_entry.need_staging_copy && memory_wrapper->mapped_data == nullptr) + { + device_table->UnmapMemory(device_wrapper->handle, memory_wrapper->handle); + } + } + else { - device_table->UnmapMemory(device_wrapper->handle, memory_wrapper->handle); + GFXRECON_LOG_ERROR("Trimming state snapshot failed to retrieve memory content for buffer %" PRIu64, + buffer_wrapper->handle_id); } } else { - GFXRECON_LOG_ERROR("Trimming state snapshot failed to retrieve memory content for buffer %" PRIu64, - buffer_wrapper->handle_id); + assert(asset_file_offsets_.find(buffer_wrapper->handle_id) != asset_file_offsets_.end()); + + const int64_t offset = asset_file_offsets_[buffer_wrapper->handle_id]; + + skipped_bytes += buffer_wrapper->created_size; + + format::LoadAssetFromAssetFile load_asset_cmd; + load_asset_cmd.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(load_asset_cmd); + load_asset_cmd.meta_header.block_header.type = format::kMetaDataBlock; + load_asset_cmd.meta_header.meta_data_id = + format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kLoadAssetFromFile); + load_asset_cmd.thread_id = thread_id_; + load_asset_cmd.asset_id = buffer_wrapper->handle_id; + load_asset_cmd.offset = offset; + + asset_file_offsets_[buffer_wrapper->handle_id] = offset; + + output_stream_->Write(&load_asset_cmd, sizeof(load_asset_cmd)); } } } void VulkanStateWriter::ProcessImageMemory(const vulkan_wrappers::DeviceWrapper* device_wrapper, const std::vector& image_snapshot_info, - graphics::VulkanResourcesUtil& resource_util) + graphics::VulkanResourcesUtil& resource_util, + size_t& dumped_bytes, + size_t& skipped_bytes) { assert(device_wrapper != nullptr); @@ -1518,141 +1527,199 @@ void VulkanStateWriter::ProcessImageMemory(const vulkan_wrappers::DeviceWrapper* for (const auto& snapshot_entry : image_snapshot_info) { - const vulkan_wrappers::ImageWrapper* image_wrapper = snapshot_entry.image_wrapper; + vulkan_wrappers::ImageWrapper* image_wrapper = snapshot_entry.image_wrapper; const vulkan_wrappers::DeviceMemoryWrapper* memory_wrapper = snapshot_entry.memory_wrapper; const uint8_t* bytes = nullptr; std::vector data; - assert((image_wrapper != nullptr) && ((image_wrapper->is_swapchain_image && memory_wrapper == nullptr) || - (!image_wrapper->is_swapchain_image && memory_wrapper != nullptr))); - - if (snapshot_entry.need_staging_copy) - { - std::vector subresource_offsets; - std::vector subresource_sizes; - bool scaling_supported; - - VkResult result = resource_util.ReadFromImageResourceStaging(image_wrapper->handle, - image_wrapper->format, - image_wrapper->image_type, - image_wrapper->extent, - image_wrapper->mip_levels, - image_wrapper->array_layers, - image_wrapper->tiling, - image_wrapper->samples, - image_wrapper->current_layout, - image_wrapper->queue_family_index, - snapshot_entry.aspect, - data, - subresource_offsets, - subresource_sizes, - scaling_supported, - true); - - if (result == VK_SUCCESS) - { - bytes = data.data(); - } - } - else if (!image_wrapper->is_swapchain_image) + assert(image_wrapper != nullptr); + + if (image_wrapper->dirty) { - assert((memory_wrapper != nullptr) && - ((memory_wrapper->mapped_data == nullptr) || (memory_wrapper->mapped_offset == 0))); + assert((image_wrapper->is_swapchain_image && memory_wrapper == nullptr) || + (!image_wrapper->is_swapchain_image && memory_wrapper != nullptr)); - VkResult result = VK_SUCCESS; + image_wrapper->dirty = false; - if (memory_wrapper->mapped_data == nullptr) + if (snapshot_entry.need_staging_copy) { - void* map_ptr = nullptr; - result = device_table->MapMemory(device_wrapper->handle, - memory_wrapper->handle, - image_wrapper->bind_offset, - snapshot_entry.resource_size, - 0, - &map_ptr); + std::vector subresource_offsets; + std::vector subresource_sizes; + bool scaling_supported; + + VkResult result = resource_util.ReadFromImageResourceStaging(image_wrapper->handle, + image_wrapper->format, + image_wrapper->image_type, + image_wrapper->extent, + image_wrapper->mip_levels, + image_wrapper->array_layers, + image_wrapper->tiling, + image_wrapper->samples, + image_wrapper->current_layout, + image_wrapper->queue_family_index, + snapshot_entry.aspect, + data, + subresource_offsets, + subresource_sizes, + scaling_supported, + true); if (result == VK_SUCCESS) { - bytes = reinterpret_cast(map_ptr); + bytes = data.data(); } } - else + else if (!image_wrapper->is_swapchain_image) { - bytes = reinterpret_cast(memory_wrapper->mapped_data) + image_wrapper->bind_offset; + assert((memory_wrapper != nullptr) && + ((memory_wrapper->mapped_data == nullptr) || (memory_wrapper->mapped_offset == 0))); + + VkResult result = VK_SUCCESS; + + if (memory_wrapper->mapped_data == nullptr) + { + void* map_ptr = nullptr; + result = device_table->MapMemory(device_wrapper->handle, + memory_wrapper->handle, + image_wrapper->bind_offset, + snapshot_entry.resource_size, + 0, + &map_ptr); + + if (result == VK_SUCCESS) + { + bytes = reinterpret_cast(map_ptr); + } + } + else + { + bytes = reinterpret_cast(memory_wrapper->mapped_data) + image_wrapper->bind_offset; + } + + if ((result == VK_SUCCESS) && !IsMemoryCoherent(snapshot_entry.memory_properties)) + { + InvalidateMappedMemoryRange(device_wrapper, + memory_wrapper->handle, + image_wrapper->bind_offset, + snapshot_entry.resource_size); + } } - if ((result == VK_SUCCESS) && !IsMemoryCoherent(snapshot_entry.memory_properties)) + if (!image_wrapper->is_swapchain_image) { - InvalidateMappedMemoryRange( - device_wrapper, memory_wrapper->handle, image_wrapper->bind_offset, snapshot_entry.resource_size); - } - } + format::InitImageCommandHeader upload_cmd; + + // Packet size without the resource data. + upload_cmd.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(upload_cmd); + upload_cmd.meta_header.block_header.type = format::kMetaDataBlock; + upload_cmd.meta_header.meta_data_id = format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_Vulkan, + format::MetaDataType::kInitImageCommand); + upload_cmd.thread_id = thread_id_; + upload_cmd.device_id = device_wrapper->handle_id; + upload_cmd.image_id = image_wrapper->handle_id; + upload_cmd.aspect = snapshot_entry.aspect; + upload_cmd.layout = image_wrapper->current_layout; + + if (bytes != nullptr) + { + GFXRECON_CHECK_CONVERSION_DATA_LOSS(size_t, snapshot_entry.resource_size); - if (!image_wrapper->is_swapchain_image) - { - format::InitImageCommandHeader upload_cmd; + size_t data_size = static_cast(snapshot_entry.resource_size); - // Packet size without the resource data. - upload_cmd.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(upload_cmd); - upload_cmd.meta_header.block_header.type = format::kMetaDataBlock; - upload_cmd.meta_header.meta_data_id = - format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kInitImageCommand); - upload_cmd.thread_id = thread_id_; - upload_cmd.device_id = device_wrapper->handle_id; - upload_cmd.image_id = image_wrapper->handle_id; - upload_cmd.aspect = snapshot_entry.aspect; - upload_cmd.layout = image_wrapper->current_layout; + // Store uncompressed data size in packet. + upload_cmd.data_size = data_size; + upload_cmd.level_count = image_wrapper->mip_levels; - if (bytes != nullptr) - { - GFXRECON_CHECK_CONVERSION_DATA_LOSS(size_t, snapshot_entry.resource_size); + if (compressor_ != nullptr) + { + size_t compressed_size = + compressor_->Compress(data_size, bytes, &compressed_parameter_buffer_, 0); - size_t data_size = static_cast(snapshot_entry.resource_size); + if ((compressed_size > 0) && (compressed_size < data_size)) + { + upload_cmd.meta_header.block_header.type = format::BlockType::kCompressedMetaDataBlock; - // Store uncompressed data size in packet. - upload_cmd.data_size = data_size; - upload_cmd.level_count = image_wrapper->mip_levels; + bytes = compressed_parameter_buffer_.data(); + data_size = compressed_size; + } + } - if (compressor_ != nullptr) - { - size_t compressed_size = compressor_->Compress(data_size, bytes, &compressed_parameter_buffer_, 0); + // Calculate size of packet with compressed or uncompressed data size. + assert(!snapshot_entry.level_sizes.empty() && + (snapshot_entry.level_sizes.size() == upload_cmd.level_count)); + size_t levels_size = snapshot_entry.level_sizes.size() * sizeof(snapshot_entry.level_sizes[0]); - if ((compressed_size > 0) && (compressed_size < data_size)) + upload_cmd.meta_header.block_header.size += levels_size + data_size; + + if (asset_file_stream_ != nullptr) { - upload_cmd.meta_header.block_header.type = format::BlockType::kCompressedMetaDataBlock; + const int64_t offset = asset_file_stream_->GetOffset(); - bytes = compressed_parameter_buffer_.data(); - data_size = compressed_size; - } - } + asset_file_offsets_[image_wrapper->handle_id] = offset; - // Calculate size of packet with compressed or uncompressed data size. - assert(!snapshot_entry.level_sizes.empty() && - (snapshot_entry.level_sizes.size() == upload_cmd.level_count)); - size_t levels_size = snapshot_entry.level_sizes.size() * sizeof(snapshot_entry.level_sizes[0]); + asset_file_stream_->Write(&upload_cmd, sizeof(upload_cmd)); + asset_file_stream_->Write(snapshot_entry.level_sizes.data(), levels_size); + asset_file_stream_->Write(bytes, data_size); - upload_cmd.meta_header.block_header.size += levels_size + data_size; + dumped_bytes += levels_size + data_size; - output_stream_->Write(&upload_cmd, sizeof(upload_cmd)); - output_stream_->Write(snapshot_entry.level_sizes.data(), levels_size); - output_stream_->Write(bytes, data_size); + format::LoadAssetFromAssetFile load_asset_cmd; + load_asset_cmd.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(load_asset_cmd); + load_asset_cmd.meta_header.block_header.type = format::kMetaDataBlock; + load_asset_cmd.meta_header.meta_data_id = format::MakeMetaDataId( + format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kLoadAssetFromFile); + load_asset_cmd.thread_id = thread_id_; + load_asset_cmd.asset_id = image_wrapper->handle_id; + load_asset_cmd.offset = offset; - if (!snapshot_entry.need_staging_copy && memory_wrapper->mapped_data == nullptr) + output_stream_->Write(&load_asset_cmd, sizeof(load_asset_cmd)); + } + else + { + assert(0); + output_stream_->Write(&upload_cmd, sizeof(upload_cmd)); + output_stream_->Write(snapshot_entry.level_sizes.data(), levels_size); + output_stream_->Write(bytes, data_size); + } + + if (!snapshot_entry.need_staging_copy && memory_wrapper->mapped_data == nullptr) + { + device_table->UnmapMemory(device_wrapper->handle, memory_wrapper->handle); + } + } + else { - device_table->UnmapMemory(device_wrapper->handle, memory_wrapper->handle); + // Write a packet without resource data; replay must still perform a layout transition at image + // initialization. + upload_cmd.data_size = 0; + upload_cmd.level_count = 0; + + output_stream_->Write(&upload_cmd, sizeof(upload_cmd)); } - } - else - { - // Write a packet without resource data; replay must still perform a layout transition at image - // initialization. - upload_cmd.data_size = 0; - upload_cmd.level_count = 0; - output_stream_->Write(&upload_cmd, sizeof(upload_cmd)); + ++blocks_written_; } + } + else + { + assert(asset_file_offsets_.find(image_wrapper->handle_id) != asset_file_offsets_.end()); - ++blocks_written_; + const int64_t offset = asset_file_offsets_[image_wrapper->handle_id]; + + format::LoadAssetFromAssetFile load_asset_cmd; + load_asset_cmd.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(load_asset_cmd); + load_asset_cmd.meta_header.block_header.type = format::kMetaDataBlock; + load_asset_cmd.meta_header.meta_data_id = + format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kLoadAssetFromFile); + load_asset_cmd.thread_id = thread_id_; + load_asset_cmd.asset_id = image_wrapper->handle_id; + load_asset_cmd.offset = offset; + + skipped_bytes += image_wrapper->size; + + asset_file_offsets_[image_wrapper->handle_id] = offset; + + output_stream_->Write(&load_asset_cmd, sizeof(load_asset_cmd)); } } } @@ -1660,102 +1727,86 @@ void VulkanStateWriter::ProcessImageMemory(const vulkan_wrappers::DeviceWrapper* void VulkanStateWriter::WriteBufferMemoryState(const VulkanStateTable& state_table, DeviceResourceTables* resources, VkDeviceSize* max_resource_size, - VkDeviceSize* max_staging_copy_size, - size_t& dumped_bytes, - size_t& skipped_bytes) + VkDeviceSize* max_staging_copy_size) { assert((resources != nullptr) && (max_resource_size != nullptr) && (max_staging_copy_size != nullptr)); - dumped_bytes = 0; - skipped_bytes = 0; - state_table.VisitWrappers([&](vulkan_wrappers::BufferWrapper* wrapper) { assert(wrapper != nullptr); - if (wrapper->dirty) + // Perform memory binding. + const vulkan_wrappers::DeviceMemoryWrapper* memory_wrapper = + state_table.GetDeviceMemoryWrapper(wrapper->bind_memory_id); + + if (memory_wrapper != nullptr) { - wrapper->dirty = false; + const vulkan_wrappers::DeviceWrapper* device_wrapper = wrapper->bind_device; + const VulkanDeviceTable* device_table = &device_wrapper->layer_table; - // Perform memory binding. - const vulkan_wrappers::DeviceMemoryWrapper* memory_wrapper = - state_table.GetDeviceMemoryWrapper(wrapper->bind_memory_id); + assert((device_wrapper != nullptr) && (device_table != nullptr)); - if (memory_wrapper != nullptr) - { - const vulkan_wrappers::DeviceWrapper* device_wrapper = wrapper->bind_device; - const VulkanDeviceTable* device_table = &device_wrapper->layer_table; + // Group buffers with memory bindings by device for memory snapshot. + ResourceSnapshotQueueFamilyTable& snapshot_table = (*resources)[device_wrapper]; + ResourceSnapshotInfo& snapshot_entry = snapshot_table[wrapper->queue_family_index]; - assert((device_wrapper != nullptr) && (device_table != nullptr)); + // Write memory requirements query before bind command. + VkMemoryRequirements memory_requirements; - // Write memory requirements query before bind command. - VkMemoryRequirements memory_requirements; + device_table->GetBufferMemoryRequirements(device_wrapper->handle, wrapper->handle, &memory_requirements); - device_table->GetBufferMemoryRequirements( - device_wrapper->handle, wrapper->handle, &memory_requirements); + encoder_.EncodeHandleIdValue(device_wrapper->handle_id); + encoder_.EncodeHandleIdValue(wrapper->handle_id); + EncodeStructPtr(&encoder_, &memory_requirements); + WriteFunctionCall(format::ApiCall_vkGetBufferMemoryRequirements, ¶meter_stream_); + parameter_stream_.Clear(); + + // Write memory bind command. + if (wrapper->bind_pnext == nullptr) + { encoder_.EncodeHandleIdValue(device_wrapper->handle_id); encoder_.EncodeHandleIdValue(wrapper->handle_id); - EncodeStructPtr(&encoder_, &memory_requirements); - - WriteFunctionCall(format::ApiCall_vkGetBufferMemoryRequirements, ¶meter_stream_); - parameter_stream_.Clear(); - - // Write memory bind command. - if (wrapper->bind_pnext == nullptr) - { - encoder_.EncodeHandleIdValue(device_wrapper->handle_id); - encoder_.EncodeHandleIdValue(wrapper->handle_id); - encoder_.EncodeHandleIdValue(memory_wrapper->handle_id); - encoder_.EncodeUInt64Value(wrapper->bind_offset); - encoder_.EncodeEnumValue(VK_SUCCESS); - - WriteFunctionCall(format::ApiCall_vkBindBufferMemory, ¶meter_stream_); - } - else - { - encoder_.EncodeHandleIdValue(device_wrapper->handle_id); - encoder_.EncodeUInt32Value(1); - - VkBindBufferMemoryInfo info = {}; - info.sType = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO; - info.pNext = wrapper->bind_pnext; - info.buffer = wrapper->handle; - info.memory = memory_wrapper->handle; - info.memoryOffset = wrapper->bind_offset; - EncodeStructArray(&encoder_, &info, 1); - encoder_.EncodeEnumValue(VK_SUCCESS); - - WriteFunctionCall(format::ApiCall_vkBindBufferMemory2, ¶meter_stream_); - } - parameter_stream_.Clear(); + encoder_.EncodeHandleIdValue(memory_wrapper->handle_id); + encoder_.EncodeUInt64Value(wrapper->bind_offset); + encoder_.EncodeEnumValue(VK_SUCCESS); - // Group buffers with memory bindings by device for memory snapshot. - ResourceSnapshotQueueFamilyTable& snapshot_table = (*resources)[device_wrapper]; - ResourceSnapshotInfo& snapshot_entry = snapshot_table[wrapper->queue_family_index]; + WriteFunctionCall(format::ApiCall_vkBindBufferMemory, ¶meter_stream_); + } + else + { + encoder_.EncodeHandleIdValue(device_wrapper->handle_id); + encoder_.EncodeUInt32Value(1); + + VkBindBufferMemoryInfo info = {}; + info.sType = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO; + info.pNext = wrapper->bind_pnext; + info.buffer = wrapper->handle; + info.memory = memory_wrapper->handle; + info.memoryOffset = wrapper->bind_offset; + EncodeStructArray(&encoder_, &info, 1); + encoder_.EncodeEnumValue(VK_SUCCESS); - BufferSnapshotInfo snapshot_info; - snapshot_info.buffer_wrapper = wrapper; - snapshot_info.memory_wrapper = memory_wrapper; - snapshot_info.memory_properties = GetMemoryProperties(device_wrapper, memory_wrapper); - snapshot_info.need_staging_copy = !IsBufferReadable(snapshot_info.memory_properties, memory_wrapper); + WriteFunctionCall(format::ApiCall_vkBindBufferMemory2, ¶meter_stream_); + } + parameter_stream_.Clear(); - if ((*max_resource_size) < wrapper->created_size) - { - (*max_resource_size) = wrapper->created_size; - } + BufferSnapshotInfo snapshot_info; + snapshot_info.buffer_wrapper = wrapper; + snapshot_info.memory_wrapper = memory_wrapper; + snapshot_info.memory_properties = GetMemoryProperties(device_wrapper, memory_wrapper); + snapshot_info.need_staging_copy = !IsBufferReadable(snapshot_info.memory_properties, memory_wrapper); - if (snapshot_info.need_staging_copy && ((*max_staging_copy_size) < wrapper->created_size)) - { - (*max_staging_copy_size) = wrapper->created_size; - } + if ((*max_resource_size) < wrapper->created_size) + { + (*max_resource_size) = wrapper->created_size; + } - snapshot_entry.buffers.emplace_back(snapshot_info); - dumped_bytes += wrapper->created_size; + if (snapshot_info.need_staging_copy && ((*max_staging_copy_size) < wrapper->created_size)) + { + (*max_staging_copy_size) = wrapper->created_size; } - } - else - { - skipped_bytes += wrapper->created_size; + + snapshot_entry.buffers.emplace_back(snapshot_info); } }); } @@ -1763,15 +1814,10 @@ void VulkanStateWriter::WriteBufferMemoryState(const VulkanStateTable& state_tab void VulkanStateWriter::WriteImageMemoryState(const VulkanStateTable& state_table, DeviceResourceTables* resources, VkDeviceSize* max_resource_size, - VkDeviceSize* max_staging_copy_size, - size_t& dumped_bytes, - size_t& skipped_bytes) + VkDeviceSize* max_staging_copy_size) { assert((resources != nullptr) && (max_resource_size != nullptr) && (max_staging_copy_size != nullptr)); - dumped_bytes = 0; - skipped_bytes = 0; - state_table.VisitWrappers([&](vulkan_wrappers::ImageWrapper* wrapper) { assert(wrapper != nullptr); @@ -1779,186 +1825,144 @@ void VulkanStateWriter::WriteImageMemoryState(const VulkanStateTable& state_tabl const vulkan_wrappers::DeviceMemoryWrapper* memory_wrapper = state_table.GetDeviceMemoryWrapper(wrapper->bind_memory_id); - if (wrapper->dirty) + if ((wrapper->is_swapchain_image && memory_wrapper == nullptr && wrapper->bind_device != nullptr) || + (!wrapper->is_swapchain_image && memory_wrapper != nullptr)) { - wrapper->dirty = false; + const vulkan_wrappers::DeviceWrapper* device_wrapper = wrapper->bind_device; + const VulkanDeviceTable* device_table = &device_wrapper->layer_table; - if ((wrapper->is_swapchain_image && memory_wrapper == nullptr && wrapper->bind_device != nullptr) || - (!wrapper->is_swapchain_image && memory_wrapper != nullptr)) - { - const vulkan_wrappers::DeviceWrapper* device_wrapper = wrapper->bind_device; - const VulkanDeviceTable* device_table = &device_wrapper->layer_table; + assert((device_wrapper != nullptr) && (device_table != nullptr)); - assert((device_wrapper != nullptr) && (device_table != nullptr)); + // Write memory requirements query before bind command. + VkMemoryRequirements memory_requirements; - // Write memory requirements query before bind command. - VkMemoryRequirements memory_requirements; + device_table->GetImageMemoryRequirements(device_wrapper->handle, wrapper->handle, &memory_requirements); - device_table->GetImageMemoryRequirements(device_wrapper->handle, wrapper->handle, &memory_requirements); + encoder_.EncodeHandleIdValue(device_wrapper->handle_id); + encoder_.EncodeHandleIdValue(wrapper->handle_id); + EncodeStructPtr(&encoder_, &memory_requirements); + WriteFunctionCall(format::ApiCall_vkGetImageMemoryRequirements, ¶meter_stream_); + parameter_stream_.Clear(); + + // Write memory bind command. + if (wrapper->bind_pnext == nullptr) + { encoder_.EncodeHandleIdValue(device_wrapper->handle_id); encoder_.EncodeHandleIdValue(wrapper->handle_id); - EncodeStructPtr(&encoder_, &memory_requirements); + encoder_.EncodeHandleIdValue(memory_wrapper->handle_id); + encoder_.EncodeUInt64Value(wrapper->bind_offset); + encoder_.EncodeEnumValue(VK_SUCCESS); - WriteFunctionCall(format::ApiCall_vkGetImageMemoryRequirements, ¶meter_stream_); - parameter_stream_.Clear(); + WriteFunctionCall(format::ApiCall_vkBindImageMemory, ¶meter_stream_); + } + else + { + encoder_.EncodeHandleIdValue(device_wrapper->handle_id); + encoder_.EncodeUInt32Value(1); + + VkBindImageMemoryInfo info = {}; + info.sType = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO; + info.pNext = wrapper->bind_pnext; + info.image = wrapper->handle; + info.memory = memory_wrapper->handle; + info.memoryOffset = wrapper->bind_offset; + EncodeStructArray(&encoder_, &info, 1); + encoder_.EncodeEnumValue(VK_SUCCESS); - // Write memory bind command. - if (wrapper->bind_pnext == nullptr) - { - encoder_.EncodeHandleIdValue(device_wrapper->handle_id); - encoder_.EncodeHandleIdValue(wrapper->handle_id); - encoder_.EncodeHandleIdValue(memory_wrapper->handle_id); - encoder_.EncodeUInt64Value(wrapper->bind_offset); - encoder_.EncodeEnumValue(VK_SUCCESS); + WriteFunctionCall(format::ApiCall_vkBindImageMemory2, ¶meter_stream_); + } + parameter_stream_.Clear(); - WriteFunctionCall(format::ApiCall_vkBindImageMemory, ¶meter_stream_); - } - else - { - encoder_.EncodeHandleIdValue(device_wrapper->handle_id); - encoder_.EncodeUInt32Value(1); - - VkBindImageMemoryInfo info = {}; - info.sType = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO; - info.pNext = wrapper->bind_pnext; - info.image = wrapper->handle; - info.memory = memory_wrapper->handle; - info.memoryOffset = wrapper->bind_offset; - EncodeStructArray(&encoder_, &info, 1); - encoder_.EncodeEnumValue(VK_SUCCESS); - - WriteFunctionCall(format::ApiCall_vkBindImageMemory2, ¶meter_stream_); - } - parameter_stream_.Clear(); + VkMemoryPropertyFlags memory_properties = 0; + if (memory_wrapper != nullptr) + { + memory_properties = GetMemoryProperties(device_wrapper, memory_wrapper); + } - VkMemoryPropertyFlags memory_properties = 0; - if (memory_wrapper != nullptr) - { - memory_properties = GetMemoryProperties(device_wrapper, memory_wrapper); - } + bool is_transitioned = (wrapper->current_layout != VK_IMAGE_LAYOUT_UNDEFINED) && + (wrapper->current_layout != VK_IMAGE_LAYOUT_PREINITIALIZED); + bool is_writable = + (wrapper->tiling == VK_IMAGE_TILING_LINEAR) && + ((memory_properties & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) == VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT); + + // If an image is not host writable and has not been transitioned from the undefined or preinitialized + // layouts, no data could have been loaded into it and its data will be omitted from the state snapshot. + if (is_transitioned || is_writable) + { + // Group images with memory bindings by device for memory snapshot. + ResourceSnapshotQueueFamilyTable& snapshot_table = (*resources)[device_wrapper]; + ResourceSnapshotInfo& snapshot_entry = snapshot_table[wrapper->queue_family_index]; + graphics::VulkanResourcesUtil resource_util(device_wrapper->handle, + device_wrapper->physical_device->handle, + device_wrapper->layer_table, + *device_wrapper->physical_device->layer_table_ref, + device_wrapper->physical_device->memory_properties); - bool is_transitioned = (wrapper->current_layout != VK_IMAGE_LAYOUT_UNDEFINED) && - (wrapper->current_layout != VK_IMAGE_LAYOUT_PREINITIALIZED); - bool is_writable = - (wrapper->tiling == VK_IMAGE_TILING_LINEAR) && - ((memory_properties & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) == VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT); + bool need_staging_copy = !IsImageReadable(memory_properties, memory_wrapper, wrapper); - // If an image is not host writable and has not been transitioned from the undefined or preinitialized - // layouts, no data could have been loaded into it and its data will be omitted from the state snapshot. - if (is_transitioned || is_writable) + std::vector aspects; + bool combined_depth_stencil; + graphics::GetFormatAspects(wrapper->format, &aspects, &combined_depth_stencil); + + for (auto aspect : aspects) { - // Group images with memory bindings by device for memory snapshot. - ResourceSnapshotQueueFamilyTable& snapshot_table = (*resources)[device_wrapper]; - ResourceSnapshotInfo& snapshot_entry = snapshot_table[wrapper->queue_family_index]; - graphics::VulkanResourcesUtil resource_util(device_wrapper->handle, - device_wrapper->physical_device->handle, - device_wrapper->layer_table, - *device_wrapper->physical_device->layer_table_ref, - device_wrapper->physical_device->memory_properties); - - bool need_staging_copy = !IsImageReadable(memory_properties, memory_wrapper, wrapper); - - std::vector aspects; - bool combined_depth_stencil; - graphics::GetFormatAspects(wrapper->format, &aspects, &combined_depth_stencil); - - for (auto aspect : aspects) + ImageSnapshotInfo snapshot_info; + + snapshot_info.image_wrapper = wrapper; + snapshot_info.memory_wrapper = memory_wrapper; + snapshot_info.memory_properties = memory_properties; + snapshot_info.need_staging_copy = need_staging_copy; + snapshot_info.aspect = aspect; + + snapshot_info.resource_size = resource_util.GetImageResourceSizesOptimal(wrapper->handle, + wrapper->format, + wrapper->image_type, + wrapper->extent, + wrapper->mip_levels, + wrapper->array_layers, + wrapper->tiling, + aspect, + nullptr, + &snapshot_info.level_sizes, + true); + + if ((*max_resource_size) < snapshot_info.resource_size) { - ImageSnapshotInfo snapshot_info; - - snapshot_info.image_wrapper = wrapper; - snapshot_info.memory_wrapper = memory_wrapper; - snapshot_info.memory_properties = memory_properties; - snapshot_info.need_staging_copy = need_staging_copy; - snapshot_info.aspect = aspect; - - snapshot_info.resource_size = - resource_util.GetImageResourceSizesOptimal(wrapper->handle, - wrapper->format, - wrapper->image_type, - wrapper->extent, - wrapper->mip_levels, - wrapper->array_layers, - wrapper->tiling, - aspect, - nullptr, - &snapshot_info.level_sizes, - true); - - if ((*max_resource_size) < snapshot_info.resource_size) - { - (*max_resource_size) = snapshot_info.resource_size; - } + (*max_resource_size) = snapshot_info.resource_size; + } - if (snapshot_info.need_staging_copy && ((*max_staging_copy_size) < snapshot_info.resource_size)) - { - (*max_staging_copy_size) = snapshot_info.resource_size; - } + if (snapshot_info.need_staging_copy && ((*max_staging_copy_size) < snapshot_info.resource_size)) + { + (*max_staging_copy_size) = snapshot_info.resource_size; + } - snapshot_entry.images.emplace_back(snapshot_info); + snapshot_entry.images.emplace_back(snapshot_info); - dumped_bytes += snapshot_info.resource_size; + // Write image subresource layout queries for linear/host-visible images. + if (is_writable) + { + VkImageAspectFlags aspect_flags = aspect; - // Write image subresource layout queries for linear/host-visible images. - if (is_writable) + if (!combined_depth_stencil) { - VkImageAspectFlags aspect_flags = aspect; - - if (!combined_depth_stencil) + WriteImageSubresourceLayouts(wrapper, aspect_flags); + } + else + { + // Specify combined depth-stencil aspect flags for combined depth-stencil formats when + // processing the depth aspect, while skipping image subresource layout query for + // stencil aspect. + if (aspect == VK_IMAGE_ASPECT_DEPTH_BIT) { + aspect_flags = graphics::GetFormatAspectMask(wrapper->format); WriteImageSubresourceLayouts(wrapper, aspect_flags); } - else - { - // Specify combined depth-stencil aspect flags for combined depth-stencil formats when - // processing the depth aspect, while skipping image subresource layout query for - // stencil aspect. - if (aspect == VK_IMAGE_ASPECT_DEPTH_BIT) - { - aspect_flags = graphics::GetFormatAspectMask(wrapper->format); - WriteImageSubresourceLayouts(wrapper, aspect_flags); - } - } } } } } } - else - { - if ((wrapper->is_swapchain_image && memory_wrapper == nullptr && wrapper->bind_device != nullptr) || - (!wrapper->is_swapchain_image && memory_wrapper != nullptr)) - { - - const vulkan_wrappers::DeviceWrapper* device_wrapper = wrapper->bind_device; - graphics::VulkanResourcesUtil resource_util(device_wrapper->handle, - device_wrapper->physical_device->handle, - device_wrapper->layer_table, - *device_wrapper->physical_device->layer_table_ref, - device_wrapper->physical_device->memory_properties); - - std::vector aspects; - bool combined_depth_stencil; - graphics::GetFormatAspects(wrapper->format, &aspects, &combined_depth_stencil); - - for (auto aspect : aspects) - { - std::vector level_sizes; - skipped_bytes += resource_util.GetImageResourceSizesOptimal(wrapper->handle, - wrapper->format, - wrapper->image_type, - wrapper->extent, - wrapper->mip_levels, - wrapper->array_layers, - wrapper->tiling, - aspect, - nullptr, - &level_sizes, - true); - } - } - } }); } @@ -2004,15 +2008,13 @@ void VulkanStateWriter::WriteResourceMemoryState(const VulkanStateTable& state_t auto started = std::chrono::high_resolution_clock::now(); - size_t buffer_bytes_dumped; - size_t buffer_bytes_skipped; - WriteBufferMemoryState( - state_table, &resources, &max_resource_size, &max_staging_copy_size, buffer_bytes_dumped, buffer_bytes_skipped); + size_t buffer_bytes_dumped = 0; + size_t buffer_bytes_skipped = 0; + size_t image_bytes_dumped = 0; + size_t image_bytes_skipped = 0; - size_t image_bytes_dumped; - size_t image_bytes_skipped; - WriteImageMemoryState( - state_table, &resources, &max_resource_size, &max_staging_copy_size, image_bytes_dumped, image_bytes_skipped); + WriteBufferMemoryState(state_table, &resources, &max_resource_size, &max_staging_copy_size); + WriteImageMemoryState(state_table, &resources, &max_resource_size, &max_staging_copy_size); // Write resource memory content. for (const auto& resource_entry : resources) @@ -2050,8 +2052,16 @@ void VulkanStateWriter::WriteResourceMemoryState(const VulkanStateTable& state_t for (const auto& queue_family_entry : resource_entry.second) { - ProcessBufferMemory(device_wrapper, queue_family_entry.second.buffers, resource_util); - ProcessImageMemory(device_wrapper, queue_family_entry.second.images, resource_util); + ProcessBufferMemory(device_wrapper, + queue_family_entry.second.buffers, + resource_util, + buffer_bytes_dumped, + buffer_bytes_skipped); + ProcessImageMemory(device_wrapper, + queue_family_entry.second.images, + resource_util, + image_bytes_dumped, + image_bytes_skipped); } format::EndResourceInitCommand end_cmd; diff --git a/framework/encode/vulkan_state_writer.h b/framework/encode/vulkan_state_writer.h index 0120ed7b22..d71e8abe44 100644 --- a/framework/encode/vulkan_state_writer.h +++ b/framework/encode/vulkan_state_writer.h @@ -38,7 +38,9 @@ #include "vulkan/vulkan.h" +#include #include +#include #include GFXRECON_BEGIN_NAMESPACE(gfxrecon) @@ -47,7 +49,11 @@ GFXRECON_BEGIN_NAMESPACE(encode) class VulkanStateWriter { public: - VulkanStateWriter(util::FileOutputStream* output_stream, util::Compressor* compressor, format::ThreadId thread_id); + VulkanStateWriter(util::FileOutputStream* output_stream, + util::Compressor* compressor, + format::ThreadId thread_id, + std::unordered_map& asset_file_offsets, + util::FileOutputStream* asset_file_stream = nullptr); ~VulkanStateWriter(); @@ -58,7 +64,7 @@ class VulkanStateWriter // Data structures for processing resource memory snapshots. struct BufferSnapshotInfo { - const vulkan_wrappers::BufferWrapper* buffer_wrapper{ nullptr }; + vulkan_wrappers::BufferWrapper* buffer_wrapper{ nullptr }; const vulkan_wrappers::DeviceMemoryWrapper* memory_wrapper{ nullptr }; VkMemoryPropertyFlags memory_properties{}; bool need_staging_copy{ false }; @@ -66,7 +72,7 @@ class VulkanStateWriter struct ImageSnapshotInfo { - const vulkan_wrappers::ImageWrapper* image_wrapper{ nullptr }; + vulkan_wrappers::ImageWrapper* image_wrapper{ nullptr }; const vulkan_wrappers::DeviceMemoryWrapper* memory_wrapper{ nullptr }; VkMemoryPropertyFlags memory_properties{}; bool need_staging_copy{ false }; @@ -147,25 +153,25 @@ class VulkanStateWriter void ProcessBufferMemory(const vulkan_wrappers::DeviceWrapper* device_wrapper, const std::vector& buffer_snapshot_info, - graphics::VulkanResourcesUtil& resource_util); + graphics::VulkanResourcesUtil& resource_util, + size_t& dumped_bytes, + size_t& skipped_bytes); void ProcessImageMemory(const vulkan_wrappers::DeviceWrapper* device_wrapper, const std::vector& image_snapshot_info, - graphics::VulkanResourcesUtil& resource_util); + graphics::VulkanResourcesUtil& resource_util, + size_t& dumped_bytes, + size_t& skipped_bytes); void WriteBufferMemoryState(const VulkanStateTable& state_table, DeviceResourceTables* resources, VkDeviceSize* max_resource_size, - VkDeviceSize* max_staging_copy_size, - size_t& dumped_bytes, - size_t& skipped_bytes); + VkDeviceSize* max_staging_copy_size); void WriteImageMemoryState(const VulkanStateTable& state_table, DeviceResourceTables* resources, VkDeviceSize* max_resource_size, - VkDeviceSize* max_staging_copy_size, - size_t& dumped_bytes, - size_t& skipped_bytes); + VkDeviceSize* max_staging_copy_size); void WriteImageSubresourceLayouts(const vulkan_wrappers::ImageWrapper* image_wrapper, VkImageAspectFlags aspect_flags); @@ -350,6 +356,8 @@ class VulkanStateWriter void WriteTlasToBlasDependenciesMetadata(const VulkanStateTable& state_table); + void WriteAssetFilename(); + private: util::FileOutputStream* output_stream_; util::Compressor* compressor_; @@ -358,6 +366,9 @@ class VulkanStateWriter util::MemoryOutputStream parameter_stream_; ParameterEncoder encoder_; uint64_t blocks_written_; + + util::FileOutputStream* asset_file_stream_; + std::unordered_map& asset_file_offsets_; }; GFXRECON_END_NAMESPACE(encode) diff --git a/framework/format/format.h b/framework/format/format.h index c5abe9f274..0d11928c43 100644 --- a/framework/format/format.h +++ b/framework/format/format.h @@ -154,6 +154,8 @@ enum class MetaDataType : uint16_t kReserved30 = 30, kReserved31 = 31, kSetEnvironmentVariablesCommand = 32, + kAssetFilename = 33, + kLoadAssetFromFile = 34 }; // MetaDataId is stored in the capture file and its type must be uint32_t to avoid breaking capture file compatibility. @@ -661,12 +663,26 @@ struct SetEnvironmentVariablesCommand // containing a list of environment variables and their values }; +struct AssetFilame +{ + MetaDataHeader meta_header; + format::ThreadId thread_id; + uint32_t length; +}; + +struct LoadAssetFromAssetFile +{ + MetaDataHeader meta_header; + format::ThreadId thread_id; + format::HandleId asset_id; + int64_t offset; +}; + // Restore size_t to normal behavior. #undef size_t #pragma pack(pop) -GFXRECON_END_NAMESPACE(format) -GFXRECON_END_NAMESPACE(gfxrecon) +GFXRECON_END_NAMESPACE(format) GFXRECON_END_NAMESPACE(gfxrecon) #endif // GFXRECON_FORMAT_FORMAT_H diff --git a/framework/util/file_output_stream.cpp b/framework/util/file_output_stream.cpp index 608301dbe4..bc26988b31 100644 --- a/framework/util/file_output_stream.cpp +++ b/framework/util/file_output_stream.cpp @@ -25,12 +25,13 @@ #include "util/logging.h" #include "util/platform.h" +#include GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(util) FileOutputStream::FileOutputStream(const std::string& filename, size_t buffer_size, bool append) : - file_(nullptr), own_file_(true) + file_(nullptr), own_file_(true), filename(filename) { const char* mode = append ? "ab" : "wb"; int32_t result = platform::FileOpen(&file_, filename.c_str(), mode); @@ -45,7 +46,7 @@ FileOutputStream::FileOutputStream(const std::string& filename, size_t buffer_si } else { - GFXRECON_LOG_ERROR("fopen(%s, %s) failed (errno = %d)", filename.c_str(), mode, result); + GFXRECON_LOG_ERROR("fopen(%s, %s) failed (errno = %d: %s)", filename.c_str(), mode, result, strerror(result)); } } diff --git a/framework/util/file_output_stream.h b/framework/util/file_output_stream.h index e8c65f1792..d209440298 100644 --- a/framework/util/file_output_stream.h +++ b/framework/util/file_output_stream.h @@ -29,6 +29,7 @@ #include "util/output_stream.h" #include "util/platform.h" +#include #include #include @@ -58,11 +59,16 @@ class FileOutputStream : public OutputStream virtual void Flush() override { platform::FileFlush(file_); } + virtual int64_t GetOffset() const { return platform::FileTell(file_); } + + virtual const std::string& GetFilename() const { return filename; } + protected: FileOutputStream(const FileOutputStream&) = delete; FileOutputStream& operator=(const FileOutputStream&) = delete; FILE* file_; bool own_file_; + const std::string filename; }; class FileNoLockOutputStream : public FileOutputStream diff --git a/framework/util/file_path.cpp b/framework/util/file_path.cpp index b4f77220d3..494d7dfa9c 100644 --- a/framework/util/file_path.cpp +++ b/framework/util/file_path.cpp @@ -254,7 +254,10 @@ std::string GenerateTimestampedFilename(const std::string& filename, bool use_gm { std::string timestamp = "_"; timestamp += util::datetime::GetDateTimeString(use_gmt); - return InsertFilenamePostfix(filename, timestamp); + + std::string result_filename = InsertFilenamePostfix(filename, timestamp); + + return result_filename; } bool GetWindowsSystemLibrariesPath(std::string& base_path) From a3caba2c320c43e079daad4f98803effc5e9078b Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sun, 21 Jul 2024 16:46:01 +0300 Subject: [PATCH 10/99] Add a file stack in file processor --- framework/decode/file_processor.cpp | 198 ++++++++++++------ framework/decode/file_processor.h | 128 ++++++++--- framework/decode/preload_file_processor.cpp | 8 +- .../block_skipping_file_processor.cpp | 2 +- 4 files changed, 235 insertions(+), 101 deletions(-) diff --git a/framework/decode/file_processor.cpp b/framework/decode/file_processor.cpp index d994c618dd..e438c1ec3b 100644 --- a/framework/decode/file_processor.cpp +++ b/framework/decode/file_processor.cpp @@ -33,7 +33,9 @@ #include #include +#include #include +#include GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(decode) @@ -42,10 +44,9 @@ GFXRECON_BEGIN_NAMESPACE(decode) const uint32_t kFirstFrame = 0; FileProcessor::FileProcessor() : - file_header_{}, file_descriptor_(nullptr), current_frame_number_(kFirstFrame), bytes_read_(0), - error_state_(kErrorInvalidFileDescriptor), annotation_handler_(nullptr), compressor_(nullptr), block_index_(0), - api_call_index_(0), block_limit_(0), capture_uses_frame_markers_(false), first_frame_(kFirstFrame + 1), - asset_file_descriptor_(nullptr), current_file_descriptor_(nullptr) + current_frame_number_(kFirstFrame), error_state_(kErrorInvalidFileDescriptor), annotation_handler_(nullptr), + compressor_(nullptr), block_index_(0), api_call_index_(0), block_limit_(0), capture_uses_frame_markers_(false), + first_frame_(kFirstFrame + 1) {} FileProcessor::FileProcessor(uint64_t block_limit) : FileProcessor() @@ -61,14 +62,9 @@ FileProcessor::~FileProcessor() compressor_ = nullptr; } - if (file_descriptor_) + for (auto& file : active_files_) { - util::platform::FileClose(file_descriptor_); - } - - if (asset_file_descriptor_) - { - util::platform::FileClose(asset_file_descriptor_); + util::platform::FileClose(file.second.fd); } DecodeAllocator::DestroyInstance(); @@ -84,24 +80,13 @@ void FileProcessor::WaitDecodersIdle() bool FileProcessor::Initialize(const std::string& filename) { - bool success = false; - - int32_t result = util::platform::FileOpen(&file_descriptor_, filename.c_str(), "rb"); + bool success = OpenFile(filename); - if ((result == 0) && (file_descriptor_ != nullptr)) + if (success) { - success = ProcessFileHeader(); - - if (success) - { - filename_ = filename; - error_state_ = kErrorNone; - } - else - { - util::platform::FileClose(file_descriptor_); - file_descriptor_ = nullptr; - } + main_filename = filename; + success = SetActiveFile(filename); + success = success && ProcessFileHeader(); } else { @@ -112,14 +97,23 @@ bool FileProcessor::Initialize(const std::string& filename) return success; } -bool FileProcessor::OpenAssetFile() +bool FileProcessor::OpenFile(const std::string& filename) { - int result = util::platform::FileOpen(&asset_file_descriptor_, asset_filename_.c_str(), "rb"); - if (result || asset_file_descriptor_ == nullptr) + if (active_files_.find(filename) == active_files_.end()) { - GFXRECON_LOG_ERROR("Failed to open file %s", asset_filename_.c_str()); - error_state_ = kErrorOpeningFile; - return false; + FILE* fd; + int result = util::platform::FileOpen(&fd, filename.c_str(), "rb"); + if (result || fd == nullptr) + { + GFXRECON_LOG_ERROR("Failed to open file %s", filename.c_str()); + error_state_ = kErrorOpeningFile; + return false; + } + else + { + active_files_.emplace(std::piecewise_construct, std::forward_as_tuple(filename), std::forward_as_tuple(fd)); + error_state_ = kErrorNone; + } } return true; @@ -136,11 +130,11 @@ bool FileProcessor::ProcessNextFrame() else { // If not EOF, determine reason for invalid state. - if (file_descriptor_ == nullptr) + if (GetFileDescriptor() == nullptr) { error_state_ = kErrorInvalidFileDescriptor; } - else if (ferror(file_descriptor_)) + else if (ferror(GetFileDescriptor())) { error_state_ = kErrorReadingFile; } @@ -203,21 +197,24 @@ bool FileProcessor::ProcessFileHeader() { bool success = false; - if (ReadBytes(&file_header_, sizeof(file_header_))) + assert(active_files_.find(main_filename) != active_files_.end()); + ActiveFiles& active_file = active_files_[main_filename]; + + if (ReadBytes(&active_file.file_header, sizeof(active_file.file_header))) { - success = format::ValidateFileHeader(file_header_); + success = format::ValidateFileHeader(active_file.file_header); if (success) { - file_options_.resize(file_header_.num_options); + active_file.file_options.resize(active_file.file_header.num_options); - size_t option_data_size = file_header_.num_options * sizeof(format::FileOptionPair); + size_t option_data_size = active_file.file_header.num_options * sizeof(format::FileOptionPair); - success = ReadBytes(file_options_.data(), option_data_size); + success = ReadBytes(active_file.file_options.data(), option_data_size); if (success) { - for (const auto& option : file_options_) + for (const auto& option : active_file.file_options) { switch (option.key) { @@ -257,6 +254,23 @@ bool FileProcessor::ProcessFileHeader() return success; } +void FileProcessor::DecrementRemainingCommands() +{ + assert((!file_stack.top().remaining_commands && file_stack.size() == 1) || + (file_stack.top().remaining_commands && file_stack.size() > 1)); + + if (file_stack.size() > 1) + { + assert(file_stack.top().remaining_commands); + + --file_stack.top().remaining_commands; + if (file_stack.top().remaining_commands == 0) + { + file_stack.pop(); + } + } +} + bool FileProcessor::ProcessBlocks() { format::BlockHeader block_header; @@ -412,7 +426,7 @@ bool FileProcessor::ProcessBlocks() } else { - if (!feof(file_descriptor_)) + if (!feof(GetFileDescriptor())) { // No data has been read for the current block, so we don't use 'HandleBlockReadError' here, as it // assumes that the block header has been successfully read and will print an incomplete block at @@ -427,8 +441,10 @@ bool FileProcessor::ProcessBlocks() } } ++block_index_; + DecrementRemainingCommands(); } + DecrementRemainingCommands(); return success; } @@ -488,11 +504,12 @@ bool FileProcessor::ReadCompressedParameterBuffer(size_t compressed_buffer_size bool FileProcessor::ReadBytes(void* buffer, size_t buffer_size) { - FILE* fd = current_file_descriptor_ != nullptr ? current_file_descriptor_ : file_descriptor_; + auto file_entry = active_files_.find(file_stack.top().filename); + assert(file_entry != active_files_.end()); - if (util::platform::FileRead(buffer, buffer_size, fd)) + if (util::platform::FileRead(buffer, buffer_size, file_entry->second.fd)) { - bytes_read_ += buffer_size; + file_entry->second.bytes_read += buffer_size; return true; } return false; @@ -500,21 +517,74 @@ bool FileProcessor::ReadBytes(void* buffer, size_t buffer_size) bool FileProcessor::SkipBytes(size_t skip_size) { - bool success = util::platform::FileSeek(file_descriptor_, skip_size, util::platform::FileSeekCurrent); + auto file_entry = active_files_.find(file_stack.top().filename); + assert(file_entry != active_files_.end()); + + bool success = util::platform::FileSeek(file_entry->second.fd, skip_size, util::platform::FileSeekCurrent); if (success) { // These technically count as bytes read/processed. - bytes_read_ += skip_size; + file_entry->second.bytes_read += skip_size; } return success; } +bool FileProcessor::SeekActiveFile(const std::string& filename, int64_t offset, util::platform::FileSeekOrigin origin) +{ + auto file_entry = active_files_.find(file_stack.top().filename); + assert(file_entry != active_files_.end()); + + bool success = util::platform::FileSeek(file_entry->second.fd, offset, origin); + + if (success && origin == util::platform::FileSeekCurrent) + { + // These technically count as bytes read/processed. + file_entry->second.bytes_read += offset; + } + + return success; +} + +bool FileProcessor::SeekActiveFile(int64_t offset, util::platform::FileSeekOrigin origin) +{ + return SeekActiveFile(file_stack.top().filename, offset, origin); +} + +bool FileProcessor::SetActiveFile(const std::string& filename) +{ + if (active_files_.find(filename) != active_files_.end()) + { + file_stack.emplace(filename); + return true; + } + else + { + return false; + } +} + +bool FileProcessor::SetActiveFile(const std::string& filename, int64_t offset, util::platform::FileSeekOrigin origin) +{ + if (active_files_.find(filename) != active_files_.end()) + { + file_stack.emplace(filename); + return SeekActiveFile(filename, offset, origin); + } + else + { + return false; + } +} + void FileProcessor::HandleBlockReadError(Error error_code, const char* error_message) { + auto file_entry = active_files_.find(file_stack.top().filename); + assert(file_entry != active_files_.end()); + // Report incomplete block at end of file as a warning, other I/O errors as an error. - if (feof(file_descriptor_) && !ferror(file_descriptor_)) + if (feof(file_entry->second.fd) && !ferror(file_entry->second.fd)) { GFXRECON_LOG_WARNING("Incomplete block at end of file"); } @@ -1879,9 +1949,8 @@ bool FileProcessor::ProcessMetaData(const format::BlockHeader& block_header, for success = ReadBytes(name.data(), length); name[length] = '\0'; - asset_filename_ = std::string(name.data()); - - OpenAssetFile(); + std::string assets_file_filename = std::string(name.data()); + OpenFile(assets_file_filename); } else if (meta_data_type == format::MetaDataType::kLoadAssetFromFile) { @@ -1889,26 +1958,19 @@ bool FileProcessor::ProcessMetaData(const format::BlockHeader& block_header, for success = ReadBytes(&load_asset.thread_id, sizeof(load_asset.thread_id)); success = success && ReadBytes(&load_asset.asset_id, sizeof(load_asset.asset_id)); success = success && ReadBytes(&load_asset.offset, sizeof(load_asset.offset)); + success = success && ReadBytes(&load_asset.filename_length, sizeof(load_asset.filename_length)); - util::platform::FileSeek(asset_file_descriptor_, load_asset.offset, util::platform::FileSeekSet); - current_file_descriptor_ = asset_file_descriptor_; - - format::BlockHeader block_header; - success = ReadBlockHeader(&block_header); - assert(format::RemoveCompressedBlockBit(block_header.type) == format::BlockType::kMetaDataBlock); - - format::MetaDataId meta_data_id = - format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_None, format::MetaDataType::kUnknownMetaDataType); + std::vector asset_filename_c_str(load_asset.filename_length + 1); + success = success && ReadBytes(asset_filename_c_str.data(), load_asset.filename_length); + asset_filename_c_str[load_asset.filename_length] = '\0'; - success = ReadBytes(&meta_data_id, sizeof(meta_data_id)); + std::string asset_filename = std::string(asset_filename_c_str.data()); - format::MetaDataType meta_data_type = format::GetMetaDataType(meta_data_id); - - assert(meta_data_type == format::MetaDataType::kInitBufferCommand || - meta_data_type == format::MetaDataType::kInitImageCommand); - - ProcessMetaData(block_header, meta_data_id); - current_file_descriptor_ = file_descriptor_; + if (OpenFile(asset_filename)) + { + SetActiveFile(asset_filename, load_asset.offset, util::platform::FileSeekSet); + file_stack.top().remaining_commands = 2; + } } else { diff --git a/framework/decode/file_processor.h b/framework/decode/file_processor.h index bd5febbc5f..00176bae50 100644 --- a/framework/decode/file_processor.h +++ b/framework/decode/file_processor.h @@ -32,9 +32,11 @@ #include "util/defines.h" #include +#include #include #include -#include +#include +#include #include GFXRECON_BEGIN_NAMESPACE(gfxrecon) @@ -92,17 +94,41 @@ class FileProcessor // Returns false if processing failed. Use GetErrorState() to determine error condition for failure case. bool ProcessAllFrames(); - const format::FileHeader& GetFileHeader() const { return file_header_; } + const format::FileHeader& GetFileHeader() const + { + auto file_entry = active_files_.find(file_stack.top().filename); + assert(file_entry != active_files_.end()); + + return file_entry->second.file_header; + } + + const std::vector& GetFileOptions() const + { + auto file_entry = active_files_.find(file_stack.top().filename); + assert(file_entry != active_files_.end()); - const std::vector& GetFileOptions() const { return file_options_; } + return file_entry->second.file_options; + } uint32_t GetCurrentFrameNumber() const { return current_frame_number_; } - uint64_t GetNumBytesRead() const { return bytes_read_; } + uint64_t GetNumBytesRead() const + { + auto file_entry = active_files_.find(file_stack.top().filename); + assert(file_entry != active_files_.end()); + + return file_entry->second.bytes_read; + } Error GetErrorState() const { return error_state_; } - bool EntireFileWasProcessed() const { return (feof(file_descriptor_) != 0); } + bool EntireFileWasProcessed() const + { + auto file_entry = active_files_.find(file_stack.top().filename); + assert(file_entry != active_files_.end()); + + return (feof(file_entry->second.fd) != 0); + } bool UsesFrameMarkers() const { return capture_uses_frame_markers_; } @@ -144,16 +170,23 @@ class FileProcessor void PrintBlockInfo() const; protected: - FILE* file_descriptor_; uint64_t current_frame_number_; std::vector decoders_; AnnotationHandler* annotation_handler_; Error error_state_; - uint64_t bytes_read_; /// @brief Incremented at the end of every block successfully processed. uint64_t block_index_; + protected: + FILE* GetFileDescriptor() + { + auto file_entry = active_files_.find(file_stack.top().filename); + assert(file_entry != active_files_.end()); + + return file_entry->second.fd; + } + private: bool ProcessFileHeader(); @@ -165,31 +198,70 @@ class FileProcessor size_t expected_uncompressed_size, size_t* uncompressed_buffer_size); - bool IsFileHeaderValid() const { return (file_header_.fourcc == GFXRECON_FOURCC); } + bool IsFileHeaderValid() const + { + auto file_entry = active_files_.find(file_stack.top().filename); + assert(file_entry != active_files_.end()); - bool IsFileValid() const { return (file_descriptor_ && !feof(file_descriptor_) && !ferror(file_descriptor_)); } + return (file_entry->second.file_header.fourcc == GFXRECON_FOURCC); + } - bool OpenAssetFile(); + bool IsFileValid() const + { + auto file_entry = active_files_.find(file_stack.top().filename); + assert(file_entry != active_files_.end()); + + return (file_entry->second.fd && !feof(file_entry->second.fd) && !ferror(file_entry->second.fd)); + } + + bool OpenFile(const std::string& filename); + + bool SeekActiveFile(const std::string& filename, int64_t offset, util::platform::FileSeekOrigin origin); + + bool SeekActiveFile(int64_t offset, util::platform::FileSeekOrigin origin); + + bool SetActiveFile(const std::string& filename); + + bool SetActiveFile(const std::string& filename, int64_t offset, util::platform::FileSeekOrigin origin); + + void DecrementRemainingCommands(); private: - std::string filename_; - format::FileHeader file_header_; - std::vector file_options_; - format::EnabledOptions enabled_options_; - std::vector parameter_buffer_; - std::vector compressed_parameter_buffer_; - util::Compressor* compressor_; - uint64_t api_call_index_; - uint64_t block_limit_; - bool capture_uses_frame_markers_; - uint64_t first_frame_; - bool enable_print_block_info_{ false }; - int64_t block_index_from_{ 0 }; - int64_t block_index_to_{ 0 }; - - std::string asset_filename_; - FILE* asset_file_descriptor_; - FILE* current_file_descriptor_; + format::EnabledOptions enabled_options_; + std::vector parameter_buffer_; + std::vector compressed_parameter_buffer_; + util::Compressor* compressor_; + uint64_t api_call_index_; + uint64_t block_limit_; + bool capture_uses_frame_markers_; + uint64_t first_frame_; + bool enable_print_block_info_{ false }; + int64_t block_index_from_{ 0 }; + int64_t block_index_to_{ 0 }; + + struct ActiveFiles + { + ActiveFiles() {} + + ActiveFiles(FILE* fd) : fd(fd) {} + + FILE* fd{ nullptr }; + uint64_t bytes_read{ 0 }; + format::FileHeader file_header{ 0 }; + std::vector file_options; + }; + + std::unordered_map active_files_; + std::string main_filename; + + struct ActiveFileContext + { + ActiveFileContext(const std::string& filename) : filename(filename){}; + + std::string filename; + uint32_t remaining_commands{ 0 }; + }; + std::stack file_stack; }; GFXRECON_END_NAMESPACE(decode) diff --git a/framework/decode/preload_file_processor.cpp b/framework/decode/preload_file_processor.cpp index 7c9d86f6ae..957a4cf2b1 100644 --- a/framework/decode/preload_file_processor.cpp +++ b/framework/decode/preload_file_processor.cpp @@ -300,7 +300,7 @@ bool PreloadFileProcessor::ProcessBlocks() } else { - if (feof(file_descriptor_) == 0) + if (feof(GetFileDescriptor()) == 0) { // No data has been read for the current block, so we don't use 'HandleBlockReadError' here, as // it assumes that the block header has been successfully read and will print an incomplete @@ -327,7 +327,7 @@ bool PreloadFileProcessor::ReadBytes(void* buffer, size_t buffer_size) if (status_ == PreloadStatus::kReplay) { bytes_read = preload_buffer_.Read(buffer, buffer_size); - bytes_read_ += bytes_read; + // bytes_read_ += bytes_read; if (preload_buffer_.ReplayFinished()) { status_ = PreloadStatus::kInactive; @@ -335,8 +335,8 @@ bool PreloadFileProcessor::ReadBytes(void* buffer, size_t buffer_size) } else { - bytes_read = util::platform::FileRead(buffer, buffer_size, file_descriptor_); - bytes_read_ += bytes_read; + bytes_read = util::platform::FileRead(buffer, buffer_size, GetFileDescriptor()); + // bytes_read_ += bytes_read; } return bytes_read == buffer_size; } diff --git a/tools/optimize/block_skipping_file_processor.cpp b/tools/optimize/block_skipping_file_processor.cpp index 88e786009b..8f76c50ee4 100644 --- a/tools/optimize/block_skipping_file_processor.cpp +++ b/tools/optimize/block_skipping_file_processor.cpp @@ -203,7 +203,7 @@ bool BlockSkippingFileProcessor::ProcessBlocks() } else { - if (!feof(file_descriptor_)) + if (!feof(GetFileDescriptor())) { // No data has been read for the current block, so we don't use 'HandleBlockReadError' here, as it // assumes that the block header has been successfully read and will print an incomplete block at From f989f67638ca8c97b8fb372f23fc0e5488d1266e Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 22 Jul 2024 10:20:36 +0300 Subject: [PATCH 11/99] ExecuteBlocksFromFile meta command --- framework/decode/file_processor.cpp | 37 ++---- framework/encode/vulkan_state_writer.cpp | 156 ++++++++--------------- framework/encode/vulkan_state_writer.h | 10 +- framework/format/format.h | 11 +- 4 files changed, 75 insertions(+), 139 deletions(-) diff --git a/framework/decode/file_processor.cpp b/framework/decode/file_processor.cpp index e438c1ec3b..eb70317d9c 100644 --- a/framework/decode/file_processor.cpp +++ b/framework/decode/file_processor.cpp @@ -1935,40 +1935,23 @@ bool FileProcessor::ProcessMetaData(const format::BlockHeader& block_header, for decoder->DispatchSetEnvironmentVariablesCommand(header, env_string); } } - else if (meta_data_type == format::MetaDataType::kAssetFilename) + else if (meta_data_type == format::MetaDataType::kExecuteBlocksFromFile) { - // This command does not support compression. - assert(block_header.type != format::BlockType::kCompressedMetaDataBlock); - - format::AssetFilame asset_filename_cmd; - uint32_t length; - success = ReadBytes(&asset_filename_cmd.thread_id, sizeof(asset_filename_cmd.thread_id)); - success = success && ReadBytes(&length, sizeof(length)); - - std::vector name(length + 1); - success = ReadBytes(name.data(), length); - name[length] = '\0'; - - std::string assets_file_filename = std::string(name.data()); - OpenFile(assets_file_filename); - } - else if (meta_data_type == format::MetaDataType::kLoadAssetFromFile) - { - format::LoadAssetFromAssetFile load_asset; - success = ReadBytes(&load_asset.thread_id, sizeof(load_asset.thread_id)); - success = success && ReadBytes(&load_asset.asset_id, sizeof(load_asset.asset_id)); - success = success && ReadBytes(&load_asset.offset, sizeof(load_asset.offset)); - success = success && ReadBytes(&load_asset.filename_length, sizeof(load_asset.filename_length)); + format::ExecuteBlocksFromFile exec_from_file; + success = ReadBytes(&exec_from_file.thread_id, sizeof(exec_from_file.thread_id)); + success = success && ReadBytes(&exec_from_file.n_blocks, sizeof(exec_from_file.n_blocks)); + success = success && ReadBytes(&exec_from_file.offset, sizeof(exec_from_file.offset)); + success = success && ReadBytes(&exec_from_file.filename_length, sizeof(exec_from_file.filename_length)); - std::vector asset_filename_c_str(load_asset.filename_length + 1); - success = success && ReadBytes(asset_filename_c_str.data(), load_asset.filename_length); - asset_filename_c_str[load_asset.filename_length] = '\0'; + std::vector asset_filename_c_str(exec_from_file.filename_length + 1); + success = success && ReadBytes(asset_filename_c_str.data(), exec_from_file.filename_length); + asset_filename_c_str[exec_from_file.filename_length] = '\0'; std::string asset_filename = std::string(asset_filename_c_str.data()); if (OpenFile(asset_filename)) { - SetActiveFile(asset_filename, load_asset.offset, util::platform::FileSeekSet); + SetActiveFile(asset_filename, exec_from_file.offset, util::platform::FileSeekSet); file_stack.top().remaining_commands = 2; } } diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index ccd9a80449..d934d09f86 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -143,7 +143,6 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint // Bind memory after buffer/image creation and memory allocation. The buffer/image needs to be created before memory // allocation for extensions like dedicated allocation that require a valid buffer/image handle at memory allocation. - WriteAssetFilename(); WriteResourceMemoryState(state_table); // Map memory after uploading resource data to buffers and images, which may require mapping resource memory ranges. @@ -210,28 +209,6 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint // clang-format on } -void VulkanStateWriter::WriteAssetFilename() -{ - if (asset_file_stream_ == nullptr) - { - assert(0); - return; - } - - const std::string filename = asset_file_stream_->GetFilename(); - - format::AssetFilame asset_filename_cmd; - asset_filename_cmd.meta_header.block_header.type = format::BlockType::kMetaDataBlock; - asset_filename_cmd.meta_header.block_header.size = - format::GetMetaDataBlockBaseSize(asset_filename_cmd) + filename.length(); - asset_filename_cmd.meta_header.meta_data_id = - format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kAssetFilename); - asset_filename_cmd.length = filename.length(); - - output_stream_->Write(&asset_filename_cmd, sizeof(asset_filename_cmd)); - output_stream_->Write(filename.c_str(), filename.length()); -} - void VulkanStateWriter::WritePhysicalDeviceState(const VulkanStateTable& state_table) { std::set processed; @@ -1350,9 +1327,7 @@ void VulkanStateWriter::ProcessHardwareBuffer(format::HandleId memory_id, void VulkanStateWriter::ProcessBufferMemory(const vulkan_wrappers::DeviceWrapper* device_wrapper, const std::vector& buffer_snapshot_info, - graphics::VulkanResourcesUtil& resource_util, - size_t& dumped_bytes, - size_t& skipped_bytes) + graphics::VulkanResourcesUtil& resource_util) { assert(device_wrapper != nullptr); @@ -1457,24 +1432,25 @@ void VulkanStateWriter::ProcessBufferMemory(const vulkan_wrappers::DeviceWrapper asset_file_stream_->Write(&upload_cmd, sizeof(upload_cmd)); asset_file_stream_->Write(bytes, data_size); - dumped_bytes += data_size; - asset_file_offsets_[buffer_wrapper->handle_id] = offset; - format::LoadAssetFromAssetFile load_asset_cmd; - load_asset_cmd.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(load_asset_cmd); - load_asset_cmd.meta_header.block_header.type = format::kMetaDataBlock; - load_asset_cmd.meta_header.meta_data_id = format::MakeMetaDataId( - format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kLoadAssetFromFile); - load_asset_cmd.thread_id = thread_id_; - load_asset_cmd.asset_id = buffer_wrapper->handle_id; - load_asset_cmd.offset = offset; - - output_stream_->Write(&load_asset_cmd, sizeof(load_asset_cmd)); + format::ExecuteBlocksFromFile execute_from_file; + execute_from_file.meta_header.block_header.size = + format::GetMetaDataBlockBaseSize(execute_from_file); + execute_from_file.meta_header.block_header.type = format::kMetaDataBlock; + execute_from_file.meta_header.meta_data_id = format::MakeMetaDataId( + format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kExecuteBlocksFromFile); + execute_from_file.thread_id = thread_id_; + execute_from_file.n_blocks = 1; + execute_from_file.offset = offset; + execute_from_file.filename_length = asset_file_stream_->GetFilename().length(); + + output_stream_->Write(&execute_from_file, sizeof(execute_from_file)); + output_stream_->Write(asset_file_stream_->GetFilename().c_str(), + asset_file_stream_->GetFilename().length()); } else { - assert(0); output_stream_->Write(&upload_cmd, sizeof(upload_cmd)); output_stream_->Write(bytes, data_size); } @@ -1497,29 +1473,26 @@ void VulkanStateWriter::ProcessBufferMemory(const vulkan_wrappers::DeviceWrapper const int64_t offset = asset_file_offsets_[buffer_wrapper->handle_id]; - skipped_bytes += buffer_wrapper->created_size; - - format::LoadAssetFromAssetFile load_asset_cmd; - load_asset_cmd.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(load_asset_cmd); - load_asset_cmd.meta_header.block_header.type = format::kMetaDataBlock; - load_asset_cmd.meta_header.meta_data_id = - format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kLoadAssetFromFile); - load_asset_cmd.thread_id = thread_id_; - load_asset_cmd.asset_id = buffer_wrapper->handle_id; - load_asset_cmd.offset = offset; + format::ExecuteBlocksFromFile execute_from_file; + execute_from_file.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(execute_from_file); + execute_from_file.meta_header.block_header.type = format::kMetaDataBlock; + execute_from_file.meta_header.meta_data_id = format::MakeMetaDataId( + format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kExecuteBlocksFromFile); + execute_from_file.thread_id = thread_id_; + execute_from_file.n_blocks = 1; + execute_from_file.offset = offset; + execute_from_file.filename_length = asset_file_stream_->GetFilename().length(); - asset_file_offsets_[buffer_wrapper->handle_id] = offset; - - output_stream_->Write(&load_asset_cmd, sizeof(load_asset_cmd)); + output_stream_->Write(&execute_from_file, sizeof(execute_from_file)); + output_stream_->Write(asset_file_stream_->GetFilename().c_str(), + asset_file_stream_->GetFilename().length()); } } } void VulkanStateWriter::ProcessImageMemory(const vulkan_wrappers::DeviceWrapper* device_wrapper, const std::vector& image_snapshot_info, - graphics::VulkanResourcesUtil& resource_util, - size_t& dumped_bytes, - size_t& skipped_bytes) + graphics::VulkanResourcesUtil& resource_util) { assert(device_wrapper != nullptr); @@ -1661,22 +1634,23 @@ void VulkanStateWriter::ProcessImageMemory(const vulkan_wrappers::DeviceWrapper* asset_file_stream_->Write(snapshot_entry.level_sizes.data(), levels_size); asset_file_stream_->Write(bytes, data_size); - dumped_bytes += levels_size + data_size; - - format::LoadAssetFromAssetFile load_asset_cmd; - load_asset_cmd.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(load_asset_cmd); - load_asset_cmd.meta_header.block_header.type = format::kMetaDataBlock; - load_asset_cmd.meta_header.meta_data_id = format::MakeMetaDataId( - format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kLoadAssetFromFile); - load_asset_cmd.thread_id = thread_id_; - load_asset_cmd.asset_id = image_wrapper->handle_id; - load_asset_cmd.offset = offset; - - output_stream_->Write(&load_asset_cmd, sizeof(load_asset_cmd)); + format::ExecuteBlocksFromFile execute_from_file; + execute_from_file.meta_header.block_header.size = + format::GetMetaDataBlockBaseSize(execute_from_file); + execute_from_file.meta_header.block_header.type = format::kMetaDataBlock; + execute_from_file.meta_header.meta_data_id = format::MakeMetaDataId( + format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kExecuteBlocksFromFile); + execute_from_file.thread_id = thread_id_; + execute_from_file.n_blocks = 1; + execute_from_file.offset = offset; + execute_from_file.filename_length = asset_file_stream_->GetFilename().length(); + + output_stream_->Write(&execute_from_file, sizeof(execute_from_file)); + output_stream_->Write(asset_file_stream_->GetFilename().c_str(), + asset_file_stream_->GetFilename().length()); } else { - assert(0); output_stream_->Write(&upload_cmd, sizeof(upload_cmd)); output_stream_->Write(snapshot_entry.level_sizes.data(), levels_size); output_stream_->Write(bytes, data_size); @@ -1706,20 +1680,19 @@ void VulkanStateWriter::ProcessImageMemory(const vulkan_wrappers::DeviceWrapper* const int64_t offset = asset_file_offsets_[image_wrapper->handle_id]; - format::LoadAssetFromAssetFile load_asset_cmd; - load_asset_cmd.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(load_asset_cmd); - load_asset_cmd.meta_header.block_header.type = format::kMetaDataBlock; - load_asset_cmd.meta_header.meta_data_id = - format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kLoadAssetFromFile); - load_asset_cmd.thread_id = thread_id_; - load_asset_cmd.asset_id = image_wrapper->handle_id; - load_asset_cmd.offset = offset; - - skipped_bytes += image_wrapper->size; + format::ExecuteBlocksFromFile execute_from_file; + execute_from_file.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(execute_from_file); + execute_from_file.meta_header.block_header.type = format::kMetaDataBlock; + execute_from_file.meta_header.meta_data_id = format::MakeMetaDataId( + format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kExecuteBlocksFromFile); + execute_from_file.thread_id = thread_id_; + execute_from_file.n_blocks = 1; + execute_from_file.offset = offset; + execute_from_file.filename_length = asset_file_stream_->GetFilename().length(); - asset_file_offsets_[image_wrapper->handle_id] = offset; - - output_stream_->Write(&load_asset_cmd, sizeof(load_asset_cmd)); + output_stream_->Write(&execute_from_file, sizeof(execute_from_file)); + output_stream_->Write(asset_file_stream_->GetFilename().c_str(), + asset_file_stream_->GetFilename().length()); } } } @@ -2008,11 +1981,6 @@ void VulkanStateWriter::WriteResourceMemoryState(const VulkanStateTable& state_t auto started = std::chrono::high_resolution_clock::now(); - size_t buffer_bytes_dumped = 0; - size_t buffer_bytes_skipped = 0; - size_t image_bytes_dumped = 0; - size_t image_bytes_skipped = 0; - WriteBufferMemoryState(state_table, &resources, &max_resource_size, &max_staging_copy_size); WriteImageMemoryState(state_table, &resources, &max_resource_size, &max_staging_copy_size); @@ -2052,16 +2020,8 @@ void VulkanStateWriter::WriteResourceMemoryState(const VulkanStateTable& state_t for (const auto& queue_family_entry : resource_entry.second) { - ProcessBufferMemory(device_wrapper, - queue_family_entry.second.buffers, - resource_util, - buffer_bytes_dumped, - buffer_bytes_skipped); - ProcessImageMemory(device_wrapper, - queue_family_entry.second.images, - resource_util, - image_bytes_dumped, - image_bytes_skipped); + ProcessBufferMemory(device_wrapper, queue_family_entry.second.buffers, resource_util); + ProcessImageMemory(device_wrapper, queue_family_entry.second.images, resource_util); } format::EndResourceInitCommand end_cmd; @@ -2086,10 +2046,6 @@ void VulkanStateWriter::WriteResourceMemoryState(const VulkanStateTable& state_t GFXRECON_WRITE_CONSOLE("--------------------------------------") GFXRECON_WRITE_CONSOLE("%s()", __func__) - GFXRECON_WRITE_CONSOLE(" buffer_bytes_dumped: %zu", buffer_bytes_dumped); - GFXRECON_WRITE_CONSOLE(" buffer_bytes_skipped: %zu", buffer_bytes_skipped); - GFXRECON_WRITE_CONSOLE(" image_bytes_dumped: %zu", image_bytes_dumped); - GFXRECON_WRITE_CONSOLE(" image_bytes_skipped: %zu", image_bytes_skipped); GFXRECON_WRITE_CONSOLE(" saved in %u ms", time); GFXRECON_WRITE_CONSOLE("--------------------------------------") } diff --git a/framework/encode/vulkan_state_writer.h b/framework/encode/vulkan_state_writer.h index d71e8abe44..0dfb38bcae 100644 --- a/framework/encode/vulkan_state_writer.h +++ b/framework/encode/vulkan_state_writer.h @@ -153,15 +153,11 @@ class VulkanStateWriter void ProcessBufferMemory(const vulkan_wrappers::DeviceWrapper* device_wrapper, const std::vector& buffer_snapshot_info, - graphics::VulkanResourcesUtil& resource_util, - size_t& dumped_bytes, - size_t& skipped_bytes); + graphics::VulkanResourcesUtil& resource_util); void ProcessImageMemory(const vulkan_wrappers::DeviceWrapper* device_wrapper, const std::vector& image_snapshot_info, - graphics::VulkanResourcesUtil& resource_util, - size_t& dumped_bytes, - size_t& skipped_bytes); + graphics::VulkanResourcesUtil& resource_util); void WriteBufferMemoryState(const VulkanStateTable& state_table, DeviceResourceTables* resources, @@ -356,8 +352,6 @@ class VulkanStateWriter void WriteTlasToBlasDependenciesMetadata(const VulkanStateTable& state_table); - void WriteAssetFilename(); - private: util::FileOutputStream* output_stream_; util::Compressor* compressor_; diff --git a/framework/format/format.h b/framework/format/format.h index 0d11928c43..e5a71d285e 100644 --- a/framework/format/format.h +++ b/framework/format/format.h @@ -155,7 +155,8 @@ enum class MetaDataType : uint16_t kReserved31 = 31, kSetEnvironmentVariablesCommand = 32, kAssetFilename = 33, - kLoadAssetFromFile = 34 + kLoadAssetFromFile = 34, + kExecuteBlocksFromFile = 35 }; // MetaDataId is stored in the capture file and its type must be uint32_t to avoid breaking capture file compatibility. @@ -670,12 +671,13 @@ struct AssetFilame uint32_t length; }; -struct LoadAssetFromAssetFile +struct ExecuteBlocksFromFile { MetaDataHeader meta_header; format::ThreadId thread_id; - format::HandleId asset_id; + uint32_t n_blocks; int64_t offset; + uint32_t filename_length; }; // Restore size_t to normal behavior. @@ -683,6 +685,7 @@ struct LoadAssetFromAssetFile #pragma pack(pop) -GFXRECON_END_NAMESPACE(format) GFXRECON_END_NAMESPACE(gfxrecon) +GFXRECON_END_NAMESPACE(format) +GFXRECON_END_NAMESPACE(gfxrecon) #endif // GFXRECON_FORMAT_FORMAT_H From 825e7db8c7aefa92da8687ff988fb5565ded8c09 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 22 Jul 2024 11:50:28 +0300 Subject: [PATCH 12/99] Abstract out composition of kExecuteBlocksFromFile in state writer --- framework/encode/vulkan_state_writer.cpp | 97 +++++++++--------------- framework/encode/vulkan_state_writer.h | 6 +- 2 files changed, 42 insertions(+), 61 deletions(-) diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index d934d09f86..3545d8693e 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -1434,20 +1434,7 @@ void VulkanStateWriter::ProcessBufferMemory(const vulkan_wrappers::DeviceWrapper asset_file_offsets_[buffer_wrapper->handle_id] = offset; - format::ExecuteBlocksFromFile execute_from_file; - execute_from_file.meta_header.block_header.size = - format::GetMetaDataBlockBaseSize(execute_from_file); - execute_from_file.meta_header.block_header.type = format::kMetaDataBlock; - execute_from_file.meta_header.meta_data_id = format::MakeMetaDataId( - format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kExecuteBlocksFromFile); - execute_from_file.thread_id = thread_id_; - execute_from_file.n_blocks = 1; - execute_from_file.offset = offset; - execute_from_file.filename_length = asset_file_stream_->GetFilename().length(); - - output_stream_->Write(&execute_from_file, sizeof(execute_from_file)); - output_stream_->Write(asset_file_stream_->GetFilename().c_str(), - asset_file_stream_->GetFilename().length()); + WriteExecuteFromFile(1, offset); } else { @@ -1473,19 +1460,7 @@ void VulkanStateWriter::ProcessBufferMemory(const vulkan_wrappers::DeviceWrapper const int64_t offset = asset_file_offsets_[buffer_wrapper->handle_id]; - format::ExecuteBlocksFromFile execute_from_file; - execute_from_file.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(execute_from_file); - execute_from_file.meta_header.block_header.type = format::kMetaDataBlock; - execute_from_file.meta_header.meta_data_id = format::MakeMetaDataId( - format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kExecuteBlocksFromFile); - execute_from_file.thread_id = thread_id_; - execute_from_file.n_blocks = 1; - execute_from_file.offset = offset; - execute_from_file.filename_length = asset_file_stream_->GetFilename().length(); - - output_stream_->Write(&execute_from_file, sizeof(execute_from_file)); - output_stream_->Write(asset_file_stream_->GetFilename().c_str(), - asset_file_stream_->GetFilename().length()); + WriteExecuteFromFile(1, offset); } } } @@ -1634,20 +1609,7 @@ void VulkanStateWriter::ProcessImageMemory(const vulkan_wrappers::DeviceWrapper* asset_file_stream_->Write(snapshot_entry.level_sizes.data(), levels_size); asset_file_stream_->Write(bytes, data_size); - format::ExecuteBlocksFromFile execute_from_file; - execute_from_file.meta_header.block_header.size = - format::GetMetaDataBlockBaseSize(execute_from_file); - execute_from_file.meta_header.block_header.type = format::kMetaDataBlock; - execute_from_file.meta_header.meta_data_id = format::MakeMetaDataId( - format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kExecuteBlocksFromFile); - execute_from_file.thread_id = thread_id_; - execute_from_file.n_blocks = 1; - execute_from_file.offset = offset; - execute_from_file.filename_length = asset_file_stream_->GetFilename().length(); - - output_stream_->Write(&execute_from_file, sizeof(execute_from_file)); - output_stream_->Write(asset_file_stream_->GetFilename().c_str(), - asset_file_stream_->GetFilename().length()); + WriteExecuteFromFile(1, offset); } else { @@ -1680,19 +1642,7 @@ void VulkanStateWriter::ProcessImageMemory(const vulkan_wrappers::DeviceWrapper* const int64_t offset = asset_file_offsets_[image_wrapper->handle_id]; - format::ExecuteBlocksFromFile execute_from_file; - execute_from_file.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(execute_from_file); - execute_from_file.meta_header.block_header.type = format::kMetaDataBlock; - execute_from_file.meta_header.meta_data_id = format::MakeMetaDataId( - format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kExecuteBlocksFromFile); - execute_from_file.thread_id = thread_id_; - execute_from_file.n_blocks = 1; - execute_from_file.offset = offset; - execute_from_file.filename_length = asset_file_stream_->GetFilename().length(); - - output_stream_->Write(&execute_from_file, sizeof(execute_from_file)); - output_stream_->Write(asset_file_stream_->GetFilename().c_str(), - asset_file_stream_->GetFilename().length()); + WriteExecuteFromFile(1, offset); } } } @@ -2830,7 +2780,9 @@ void VulkanStateWriter::DestroyTemporaryDeviceObject(format::ApiCallId // TODO: This is the same code used by CaptureManager to write function call data. It could be moved to a format // utility. -void VulkanStateWriter::WriteFunctionCall(format::ApiCallId call_id, util::MemoryOutputStream* parameter_buffer) +void VulkanStateWriter::WriteFunctionCall(format::ApiCallId call_id, + util::MemoryOutputStream* parameter_buffer, + util::FileOutputStream* output_stream) { assert(parameter_buffer != nullptr); @@ -2886,11 +2838,17 @@ void VulkanStateWriter::WriteFunctionCall(format::ApiCallId call_id, util::Memor uncompressed_header.block_header.size = packet_size; } - // Write appropriate function call block header. - output_stream_->Write(header_pointer, header_size); - - // Write parameter data. - output_stream_->Write(data_pointer, data_size); + // Write appropriate function call block header and parameter data + if (output_stream != nullptr) + { + output_stream->Write(header_pointer, header_size); + output_stream->Write(data_pointer, data_size); + } + else + { + output_stream_->Write(header_pointer, header_size); + output_stream_->Write(data_pointer, data_size); + } ++blocks_written_; } @@ -3475,5 +3433,24 @@ bool VulkanStateWriter::IsFramebufferValid(const vulkan_wrappers::FramebufferWra return valid; } +void VulkanStateWriter::WriteExecuteFromFile(uint32_t n_blocks, int64_t offset) +{ + const size_t asset_filename_length = asset_file_stream_->GetFilename().length(); + + format::ExecuteBlocksFromFile execute_from_file; + execute_from_file.meta_header.block_header.size = + format::GetMetaDataBlockBaseSize(execute_from_file) + asset_filename_length; + execute_from_file.meta_header.block_header.type = format::kMetaDataBlock; + execute_from_file.meta_header.meta_data_id = + format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kExecuteBlocksFromFile); + execute_from_file.thread_id = thread_id_; + execute_from_file.n_blocks = n_blocks; + execute_from_file.offset = offset; + execute_from_file.filename_length = asset_filename_length; + + output_stream_->Write(&execute_from_file, sizeof(execute_from_file)); + output_stream_->Write(asset_file_stream_->GetFilename().c_str(), asset_filename_length); +} + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/vulkan_state_writer.h b/framework/encode/vulkan_state_writer.h index 0dfb38bcae..c12970596d 100644 --- a/framework/encode/vulkan_state_writer.h +++ b/framework/encode/vulkan_state_writer.h @@ -273,7 +273,9 @@ class VulkanStateWriter format::HandleId object_id, const util::MemoryOutputStream* create_parameters); - void WriteFunctionCall(format::ApiCallId call_id, util::MemoryOutputStream* parameter_buffer); + void WriteFunctionCall(format::ApiCallId call_id, + util::MemoryOutputStream* parameter_buffer, + util::FileOutputStream* output_stream = nullptr); void WriteFillMemoryCmd(format::HandleId memory_id, VkDeviceSize offset, VkDeviceSize size, const void* data); @@ -352,6 +354,8 @@ class VulkanStateWriter void WriteTlasToBlasDependenciesMetadata(const VulkanStateTable& state_table); + void WriteExecuteFromFile(uint32_t n_blocks, int64_t offset); + private: util::FileOutputStream* output_stream_; util::Compressor* compressor_; From bec0074def1f84bf7100625d754ee115480d973a Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 22 Jul 2024 13:43:15 +0300 Subject: [PATCH 13/99] FileProcessor: Use correct number of blocks --- framework/decode/file_processor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/decode/file_processor.cpp b/framework/decode/file_processor.cpp index eb70317d9c..66b946c3bb 100644 --- a/framework/decode/file_processor.cpp +++ b/framework/decode/file_processor.cpp @@ -1952,7 +1952,7 @@ bool FileProcessor::ProcessMetaData(const format::BlockHeader& block_header, for if (OpenFile(asset_filename)) { SetActiveFile(asset_filename, exec_from_file.offset, util::platform::FileSeekSet); - file_stack.top().remaining_commands = 2; + file_stack.top().remaining_commands = exec_from_file.n_blocks + 1; } } else From f675d2261376f98b1486a0878bcb8a27985debaa Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 22 Jul 2024 14:44:09 +0300 Subject: [PATCH 14/99] Store descriptor state in asset file --- framework/encode/vulkan_state_writer.cpp | 144 +++++++++++++++-------- framework/encode/vulkan_state_writer.h | 3 +- 2 files changed, 97 insertions(+), 50 deletions(-) diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index 3545d8693e..8abaff1524 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -855,7 +855,21 @@ void VulkanStateWriter::WriteDescriptorSetState(const VulkanStateTable& state_ta // Create a temporary object on first encounter. if (dep_inserted.second) { - WriteFunctionCall(wrapper->set_layout_dependency.create_call_id, dep_create_parameters); + if (wrapper->dirty) + { + const int64_t offset = asset_file_stream_->GetOffset(); + asset_file_offsets_[wrapper->handle_id] = offset; + WriteFunctionCall( + wrapper->set_layout_dependency.create_call_id, dep_create_parameters, asset_file_stream_); + WriteExecuteFromFile(1, offset); + } + else + { + assert(asset_file_offsets_.find(wrapper->handle_id) != asset_file_offsets_.end()); + + const int64_t offset = asset_file_offsets_[wrapper->handle_id]; + WriteExecuteFromFile(1, offset); + } } } }); @@ -863,75 +877,106 @@ void VulkanStateWriter::WriteDescriptorSetState(const VulkanStateTable& state_ta state_table.VisitWrappers([&](vulkan_wrappers::DescriptorSetWrapper* wrapper) { assert(wrapper != nullptr); - // if (wrapper->dirty) + uint32_t n_blocks = 0; + int64_t offset; + if (wrapper->dirty) + { + offset = asset_file_stream_->GetOffset(); + } + else { - wrapper->dirty = false; + assert(asset_file_offsets_.find(wrapper->handle_id) != asset_file_offsets_.end()); + offset = asset_file_offsets_[wrapper->handle_id]; + } - // Filter duplicate calls to vkAllocateDescriptorSets for descriptor sets that were allocated by the same - // API call and reference the same parameter buffer. - if (processed.find(wrapper->create_parameters.get()) == processed.end()) + // Filter duplicate calls to vkAllocateDescriptorSets for descriptor sets that were allocated by the same + // API call and reference the same parameter buffer. + if (processed.find(wrapper->create_parameters.get()) == processed.end()) + { + processed.insert(wrapper->create_parameters.get()); + if (wrapper->dirty) { // Write descriptor set creation call and add the parameter buffer to the processed set. - WriteFunctionCall(wrapper->create_call_id, wrapper->create_parameters.get()); - processed.insert(wrapper->create_parameters.get()); + WriteFunctionCall(wrapper->create_call_id, wrapper->create_parameters.get(), asset_file_stream_); } - VkWriteDescriptorSet write = { VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET }; - write.dstSet = wrapper->handle; + ++n_blocks; + } - for (const auto& binding_entry : wrapper->bindings) - { - const vulkan_state_info::DescriptorInfo* binding = &binding_entry.second; - bool active = false; + VkWriteDescriptorSet write = { VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET }; + write.dstSet = wrapper->handle; - write.dstBinding = binding_entry.first; + for (const auto& binding_entry : wrapper->bindings) + { + const vulkan_state_info::DescriptorInfo* binding = &binding_entry.second; + bool active = false; - for (uint32_t i = 0; i < binding->count; ++i) - { - VkDescriptorType descriptor_type; - bool write_descriptor = CheckDescriptorStatus(binding, i, state_table, &descriptor_type); + write.dstBinding = binding_entry.first; - if (active != write_descriptor) + for (uint32_t i = 0; i < binding->count; ++i) + { + VkDescriptorType descriptor_type; + bool write_descriptor = CheckDescriptorStatus(binding, i, state_table, &descriptor_type); + + if (active != write_descriptor) + { + if (!active) { - if (!active) - { - // Start of an active descriptor write range. - active = true; - write.dstArrayElement = i; - write.descriptorType = descriptor_type; - } - else + // Start of an active descriptor write range. + active = true; + write.dstArrayElement = i; + write.descriptorType = descriptor_type; + } + else + { + // End of an active descriptor write range. + active = false; + write.descriptorCount = i - write.dstArrayElement; + if (wrapper->dirty) { - // End of an active descriptor write range. - active = false; - write.descriptorCount = i - write.dstArrayElement; - WriteDescriptorUpdateCommand(wrapper->device->handle_id, binding, &write); + WriteDescriptorUpdateCommand( + wrapper->device->handle_id, binding, &write, asset_file_stream_); } + ++n_blocks; } - else if (active && (descriptor_type != write.descriptorType)) + } + else if (active && (descriptor_type != write.descriptorType)) + { + // Mutable descriptor type change within an active write range + // End current range + write.descriptorCount = i - write.dstArrayElement; + if (wrapper->dirty) { - // Mutable descriptor type change within an active write range - // End current range - write.descriptorCount = i - write.dstArrayElement; - WriteDescriptorUpdateCommand(wrapper->device->handle_id, binding, &write); - // Start new range - write.descriptorType = descriptor_type; - write.dstArrayElement = i; + WriteDescriptorUpdateCommand(wrapper->device->handle_id, binding, &write, asset_file_stream_); } + ++n_blocks; + + // Start new range + write.descriptorType = descriptor_type; + write.dstArrayElement = i; } + } - // Process final range, when last item in array contained an active write. - if (active) + // Process final range, when last item in array contained an active write. + if (active) + { + write.descriptorCount = binding->count - write.dstArrayElement; + + if (wrapper->dirty) { - write.descriptorCount = binding->count - write.dstArrayElement; - WriteDescriptorUpdateCommand(wrapper->device->handle_id, binding, &write); + WriteDescriptorUpdateCommand(wrapper->device->handle_id, binding, &write, asset_file_stream_); } + ++n_blocks; } } - // else - // { - // } + WriteExecuteFromFile(n_blocks, offset); + + if (wrapper->dirty) + { + wrapper->dirty = false; + asset_file_offsets_[wrapper->handle_id] = offset; + } }); // Temporary object destruction. @@ -2470,7 +2515,8 @@ void VulkanStateWriter::WriteCommandBufferCommands(const vulkan_wrappers::Comman void VulkanStateWriter::WriteDescriptorUpdateCommand(format::HandleId device_id, const vulkan_state_info::DescriptorInfo* binding, - VkWriteDescriptorSet* write) + VkWriteDescriptorSet* write, + util::FileOutputStream* output_stream) { assert((binding != nullptr) && (write != nullptr)); @@ -2549,7 +2595,7 @@ void VulkanStateWriter::WriteDescriptorUpdateCommand(format::HandleId encoder_.EncodeUInt32Value(0); EncodeStructArray(&encoder_, copy, 0); - WriteFunctionCall(format::ApiCallId::ApiCall_vkUpdateDescriptorSets, ¶meter_stream_); + WriteFunctionCall(format::ApiCallId::ApiCall_vkUpdateDescriptorSets, ¶meter_stream_, output_stream); parameter_stream_.Clear(); } diff --git a/framework/encode/vulkan_state_writer.h b/framework/encode/vulkan_state_writer.h index c12970596d..d5c02e9c57 100644 --- a/framework/encode/vulkan_state_writer.h +++ b/framework/encode/vulkan_state_writer.h @@ -240,7 +240,8 @@ class VulkanStateWriter void WriteDescriptorUpdateCommand(format::HandleId device_id, const vulkan_state_info::DescriptorInfo* binding, - VkWriteDescriptorSet* write); + VkWriteDescriptorSet* write, + util::FileOutputStream* output_stream = nullptr); void WriteQueryPoolReset(format::HandleId device_id, const std::vector& query_pool_wrappers); From 4afce37ac3b467bfe45457d00c4708553330abb4 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 22 Jul 2024 15:38:20 +0300 Subject: [PATCH 15/99] Convert now should understand ExecuteBlocksFromFile metacommand --- framework/decode/api_decoder.h | 5 ++++ framework/decode/file_processor.cpp | 30 +++++++++++++++++------ framework/decode/metadata_consumer_base.h | 4 +++ framework/decode/metadata_json_consumer.h | 9 +++++++ framework/decode/vulkan_decoder_base.cpp | 13 ++++++++++ framework/decode/vulkan_decoder_base.h | 5 ++++ 6 files changed, 59 insertions(+), 7 deletions(-) diff --git a/framework/decode/api_decoder.h b/framework/decode/api_decoder.h index 6fc22d846a..9a35cb3462 100644 --- a/framework/decode/api_decoder.h +++ b/framework/decode/api_decoder.h @@ -190,6 +190,11 @@ class ApiDecoder virtual void DispatchGetDx12RuntimeInfo(const format::Dx12RuntimeInfoCommandHeader& runtime_info_header){}; + virtual void DispatchExecuteBlocksFromFile(format::ThreadId thread_id, + uint32_t n_blocks, + int64_t offset, + const std::string& filename){}; + virtual void SetCurrentBlockIndex(uint64_t block_index){}; virtual void SetCurrentApiCallId(format::ApiCallId api_call_id){}; diff --git a/framework/decode/file_processor.cpp b/framework/decode/file_processor.cpp index 66b946c3bb..99e1019d93 100644 --- a/framework/decode/file_processor.cpp +++ b/framework/decode/file_processor.cpp @@ -1943,16 +1943,32 @@ bool FileProcessor::ProcessMetaData(const format::BlockHeader& block_header, for success = success && ReadBytes(&exec_from_file.offset, sizeof(exec_from_file.offset)); success = success && ReadBytes(&exec_from_file.filename_length, sizeof(exec_from_file.filename_length)); - std::vector asset_filename_c_str(exec_from_file.filename_length + 1); - success = success && ReadBytes(asset_filename_c_str.data(), exec_from_file.filename_length); - asset_filename_c_str[exec_from_file.filename_length] = '\0'; + std::vector filename_c_str(exec_from_file.filename_length + 1); + success = success && ReadBytes(filename_c_str.data(), exec_from_file.filename_length); + if (success) + { + filename_c_str[exec_from_file.filename_length] = '\0'; - std::string asset_filename = std::string(asset_filename_c_str.data()); + const std::string filename = std::string(filename_c_str.data()); - if (OpenFile(asset_filename)) + success = OpenFile(filename); + if (success) + { + for (auto decoder : decoders_) + { + decoder->DispatchExecuteBlocksFromFile( + exec_from_file.thread_id, exec_from_file.n_blocks, exec_from_file.offset, filename); + } + + SetActiveFile(filename, exec_from_file.offset, util::platform::FileSeekSet); + // We need to add 1 because it will be decremented right after this function returns + file_stack.top().remaining_commands = exec_from_file.n_blocks + 1; + } + } + + if (!success) { - SetActiveFile(asset_filename, exec_from_file.offset, util::platform::FileSeekSet); - file_stack.top().remaining_commands = exec_from_file.n_blocks + 1; + HandleBlockReadError(kErrorReadingBlockData, "Failed to read runtime info meta-data block"); } } else diff --git a/framework/decode/metadata_consumer_base.h b/framework/decode/metadata_consumer_base.h index c3d950414f..0e2eff9174 100644 --- a/framework/decode/metadata_consumer_base.h +++ b/framework/decode/metadata_consumer_base.h @@ -104,6 +104,10 @@ class MetadataConsumerBase virtual void ProcessInitSubresourceCommand(const format::InitSubresourceCommandHeader& command_header, const uint8_t* data) {} + virtual void ProcessExecuteBlocksFromFile(uint32_t n_blocks, + int64_t offset, + const std::string& filename) + {} virtual void SetCurrentBlockIndex(uint64_t block_index) {} diff --git a/framework/decode/metadata_json_consumer.h b/framework/decode/metadata_json_consumer.h index 1126f797e8..f8ad44e6ec 100644 --- a/framework/decode/metadata_json_consumer.h +++ b/framework/decode/metadata_json_consumer.h @@ -297,7 +297,16 @@ class MetadataJsonConsumer : public Base json_data[var] = val; } } + WriteBlockEnd(); + } + virtual void ProcessExecuteBlocksFromFile(uint32_t n_blocks, int64_t offset, const std::string& filename) override + { + const JsonOptions& json_options = GetJsonOptions(); + auto& jdata = WriteMetaCommandStart("ExecuteBlocksFromFile"); + FieldToJson(jdata["n_blocks"], n_blocks, json_options); + FieldToJson(jdata["offset"], offset, json_options); + FieldToJson(jdata["filename"], filename, json_options); WriteBlockEnd(); } diff --git a/framework/decode/vulkan_decoder_base.cpp b/framework/decode/vulkan_decoder_base.cpp index 93f60b68b1..269c95021d 100644 --- a/framework/decode/vulkan_decoder_base.cpp +++ b/framework/decode/vulkan_decoder_base.cpp @@ -568,5 +568,18 @@ void VulkanDecoderBase::SetCurrentBlockIndex(uint64_t block_index) } } +void VulkanDecoderBase::DispatchExecuteBlocksFromFile(format::ThreadId thread_id, + uint32_t n_blocks, + int64_t offset, + const std::string& filename) +{ + GFXRECON_UNREFERENCED_PARAMETER(thread_id); + + for (auto consumer : consumers_) + { + consumer->ProcessExecuteBlocksFromFile(n_blocks, offset, filename); + } +} + GFXRECON_END_NAMESPACE(decode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/decode/vulkan_decoder_base.h b/framework/decode/vulkan_decoder_base.h index ddaa8bd2b8..0e348d8d5d 100644 --- a/framework/decode/vulkan_decoder_base.h +++ b/framework/decode/vulkan_decoder_base.h @@ -200,6 +200,11 @@ class VulkanDecoderBase : public ApiDecoder virtual void SetCurrentBlockIndex(uint64_t block_index) override; + virtual void DispatchExecuteBlocksFromFile(format::ThreadId thread_id, + uint32_t n_blocks, + int64_t offset, + const std::string& filename) override; + protected: const std::vector& GetConsumers() const { return consumers_; } From b6493ddc1e5846b8ca74e7641b367ae5241f8cd0 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 22 Jul 2024 16:10:00 +0300 Subject: [PATCH 16/99] Writing a header in the asset file, makes it legible to convert --- framework/encode/capture_manager.cpp | 25 +++++++++++++++++++++--- framework/encode/capture_manager.h | 3 ++- framework/encode/vulkan_state_writer.cpp | 3 --- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/framework/encode/capture_manager.cpp b/framework/encode/capture_manager.cpp index 6135070b05..a0d41131a7 100644 --- a/framework/encode/capture_manager.cpp +++ b/framework/encode/capture_manager.cpp @@ -384,6 +384,7 @@ bool CommonCaptureManager::Initialize(format::ApiFamilyId api_ std::string asset_file_name = CreateAssetFilename(base_filename_); asset_file_stream_ = std::make_unique(asset_file_name, kFileStreamBufferSize); + WriteAssetFileHeader(); GFXRECON_WRITE_CONSOLE("asset_file_name: %s", asset_file_name.c_str()) @@ -1137,6 +1138,22 @@ void CommonCaptureManager::WriteFileHeader() thread_data->block_index_ = block_index_.load(); } +void CommonCaptureManager::WriteAssetFileHeader() +{ + std::vector option_list; + + BuildOptionList(file_options_, &option_list); + + format::FileHeader file_header; + file_header.fourcc = GFXRECON_FOURCC; + file_header.major_version = 0; + file_header.minor_version = 0; + file_header.num_options = static_cast(option_list.size()); + + WriteToFile(&file_header, sizeof(file_header), asset_file_stream_.get()); + WriteToFile(option_list.data(), option_list.size() * sizeof(format::FileOptionPair), asset_file_stream_.get()); +} + void CommonCaptureManager::BuildOptionList(const format::EnabledOptions& enabled_options, std::vector* option_list) { @@ -1312,7 +1329,7 @@ void CommonCaptureManager::WriteCreateHeapAllocationCmd(format::ApiFamilyId api_ } } -void CommonCaptureManager::WriteToFile(const void* data, size_t size) +void CommonCaptureManager::WriteToFile(const void* data, size_t size, util::FileOutputStream* file_stream) { if (GetMemoryTrackingMode() == CaptureSettings::MemoryTrackingMode::kUserfaultfd) { @@ -1328,10 +1345,12 @@ void CommonCaptureManager::WriteToFile(const void* data, size_t size) } } - file_stream_->Write(data, size); + util::FileOutputStream* output_stream = (file_stream != nullptr) ? file_stream : file_stream_.get(); + + output_stream->Write(data, size); if (force_file_flush_) { - file_stream_->Flush(); + output_stream->Flush(); } if (GetMemoryTrackingMode() == CaptureSettings::MemoryTrackingMode::kUserfaultfd) diff --git a/framework/encode/capture_manager.h b/framework/encode/capture_manager.h index 60e1c698d2..6801ab23c2 100644 --- a/framework/encode/capture_manager.h +++ b/framework/encode/capture_manager.h @@ -271,6 +271,7 @@ class CommonCaptureManager void DeactivateTrimming(); void WriteFileHeader(); + void WriteAssetFileHeader(); void BuildOptionList(const format::EnabledOptions& enabled_options, std::vector* option_list); @@ -286,7 +287,7 @@ class CommonCaptureManager void WriteCreateHeapAllocationCmd(format::ApiFamilyId api_family, uint64_t allocation_id, uint64_t allocation_size); - void WriteToFile(const void* data, size_t size); + void WriteToFile(const void* data, size_t size, util::FileOutputStream* file_stream = nullptr); template void CombineAndWriteToFile(const std::pair (&buffers)[N]) diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index 8abaff1524..7624c685af 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -168,9 +168,7 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint // Descriptor creation. StandardCreateWrite(state_table); - StandardCreateWrite(state_table); - WriteDescriptorSetState(state_table); // Query object creation. @@ -191,7 +189,6 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint // Process swapchain image acquire. WriteSwapchainImageState(state_table); - marker.marker_type = format::kEndMarker; output_stream_->Write(&marker, sizeof(marker)); From 8c633bad096fdce663aa07cb69ede46cd319c313 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Tue, 23 Jul 2024 11:33:17 +0300 Subject: [PATCH 17/99] Rename referenced_assets variable --- framework/encode/vulkan_handle_wrappers.h | 2 +- framework/encode/vulkan_state_tracker.cpp | 58 +++++++++++------------ 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/framework/encode/vulkan_handle_wrappers.h b/framework/encode/vulkan_handle_wrappers.h index e2002e1473..2bc8b9bdf6 100644 --- a/framework/encode/vulkan_handle_wrappers.h +++ b/framework/encode/vulkan_handle_wrappers.h @@ -417,7 +417,7 @@ struct CommandBufferWrapper : public HandleWrapper { std::vector images; std::vector buffers; - } referenced_assets; + } modified_assets; }; struct DeferredOperationKHRWrapper : public HandleWrapper diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index dbedb38c73..d1d4ae1e94 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -59,8 +59,8 @@ void VulkanStateTracker::TrackCommandExecution(vulkan_wrappers::CommandBufferWra wrapper->pending_layouts.clear(); wrapper->recorded_queries.clear(); wrapper->tlas_build_info_map.clear(); - wrapper->referenced_assets.buffers.clear(); - wrapper->referenced_assets.images.clear(); + wrapper->modified_assets.buffers.clear(); + wrapper->modified_assets.images.clear(); for (uint32_t point = vulkan_state_info::kBindPoint_graphics; point != vulkan_state_info::kBindPoint_count; ++point) { @@ -107,8 +107,8 @@ void VulkanStateTracker::TrackResetCommandPool(VkCommandPool command_pool) entry.second->pending_layouts.clear(); entry.second->recorded_queries.clear(); entry.second->tlas_build_info_map.clear(); - entry.second->referenced_assets.buffers.clear(); - entry.second->referenced_assets.images.clear(); + entry.second->modified_assets.buffers.clear(); + entry.second->modified_assets.images.clear(); for (uint32_t point = vulkan_state_info::kBindPoint_graphics; point != vulkan_state_info::kBindPoint_count; ++point) { @@ -489,7 +489,7 @@ void VulkanStateTracker::TrackBeginRenderPass(VkCommandBuffer command_buffer, co (has_stencil && wrapper->active_render_pass->attachment_info.stencil_store_op[i] == VK_ATTACHMENT_STORE_OP_STORE)) { - wrapper->referenced_assets.images.push_back(wrapper->render_pass_framebuffer->attachments[i]); + wrapper->modified_assets.images.push_back(wrapper->render_pass_framebuffer->attachments[i]); } } } @@ -2012,7 +2012,7 @@ void VulkanStateTracker::TrackCmdCopyBuffer(VkCommandBuffer commandBuffer, vulkan_wrappers::GetWrapper(dstBuffer); assert(dst_buffer_wrapper != nullptr); - cmd_buf_wrapper->referenced_assets.buffers.push_back(dst_buffer_wrapper); + cmd_buf_wrapper->modified_assets.buffers.push_back(dst_buffer_wrapper); } } @@ -2053,7 +2053,7 @@ void VulkanStateTracker::TrackCmdCopyBufferToImage(VkCommandBuffer comm vulkan_wrappers::GetWrapper(dstImage); assert(dst_img_wrapper != nullptr); - cmd_buf_wrapper->referenced_assets.images.push_back(dst_img_wrapper); + cmd_buf_wrapper->modified_assets.images.push_back(dst_img_wrapper); } } @@ -2074,7 +2074,7 @@ void VulkanStateTracker::TrackCmdCopyImageToBuffer(VkCommandBuffer comm vulkan_wrappers::GetWrapper(dstBuffer); assert(dst_buffer_wrapper != nullptr); - cmd_buf_wrapper->referenced_assets.buffers.push_back(dst_buffer_wrapper); + cmd_buf_wrapper->modified_assets.buffers.push_back(dst_buffer_wrapper); } } @@ -2090,7 +2090,7 @@ void VulkanStateTracker::TrackCmdCopyBuffer2(VkCommandBuffer commandBuffer, cons vulkan_wrappers::GetWrapper(pCopyBufferInfo->dstBuffer); assert(dst_buffer_wrapper != nullptr); - cmd_buf_wrapper->referenced_assets.buffers.push_back(dst_buffer_wrapper); + cmd_buf_wrapper->modified_assets.buffers.push_back(dst_buffer_wrapper); } } @@ -2106,7 +2106,7 @@ void VulkanStateTracker::TrackCmdCopyImage2(VkCommandBuffer commandBuffer, const vulkan_wrappers::GetWrapper(pCopyImageInfo->dstImage); assert(dst_img_wrapper != nullptr); - cmd_buf_wrapper->referenced_assets.images.push_back(dst_img_wrapper); + cmd_buf_wrapper->modified_assets.images.push_back(dst_img_wrapper); } } @@ -2124,7 +2124,7 @@ void VulkanStateTracker::TrackCmdCopyBufferToImage2(VkCommandBuffer vulkan_wrappers::GetWrapper(pCopyBufferToImageInfo->dstImage); assert(dst_img_wrapper != nullptr); - cmd_buf_wrapper->referenced_assets.images.push_back(dst_img_wrapper); + cmd_buf_wrapper->modified_assets.images.push_back(dst_img_wrapper); } } @@ -2142,7 +2142,7 @@ void VulkanStateTracker::TrackCmdCopyImageToBuffer2(VkCommandBuffer vulkan_wrappers::GetWrapper(pCopyImageToBufferInfo->dstBuffer); assert(dst_buffer_wrapper != nullptr); - cmd_buf_wrapper->referenced_assets.buffers.push_back(dst_buffer_wrapper); + cmd_buf_wrapper->modified_assets.buffers.push_back(dst_buffer_wrapper); } } @@ -2158,7 +2158,7 @@ void VulkanStateTracker::TrackCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, c vulkan_wrappers::GetWrapper(pCopyBufferInfo->dstBuffer); assert(dst_buffer_wrapper != nullptr); - cmd_buf_wrapper->referenced_assets.buffers.push_back(dst_buffer_wrapper); + cmd_buf_wrapper->modified_assets.buffers.push_back(dst_buffer_wrapper); } } @@ -2174,7 +2174,7 @@ void VulkanStateTracker::TrackCmdCopyImage2KHR(VkCommandBuffer commandBuffer, co vulkan_wrappers::GetWrapper(pCopyImageInfo->dstImage); assert(dst_img_wrapper != nullptr); - cmd_buf_wrapper->referenced_assets.images.push_back(dst_img_wrapper); + cmd_buf_wrapper->modified_assets.images.push_back(dst_img_wrapper); } } @@ -2192,7 +2192,7 @@ void VulkanStateTracker::TrackCmdCopyBufferToImage2KHR(VkCommandBuffer vulkan_wrappers::GetWrapper(pCopyBufferToImageInfo->dstImage); assert(dst_img_wrapper != nullptr); - cmd_buf_wrapper->referenced_assets.images.push_back(dst_img_wrapper); + cmd_buf_wrapper->modified_assets.images.push_back(dst_img_wrapper); } } @@ -2210,7 +2210,7 @@ void VulkanStateTracker::TrackCmdCopyImageToBuffer2KHR(VkCommandBuffer vulkan_wrappers::GetWrapper(pCopyImageToBufferInfo->dstBuffer); assert(dst_buffer_wrapper != nullptr); - cmd_buf_wrapper->referenced_assets.buffers.push_back(dst_buffer_wrapper); + cmd_buf_wrapper->modified_assets.buffers.push_back(dst_buffer_wrapper); } } @@ -2233,7 +2233,7 @@ void VulkanStateTracker::TrackCmdBlitImage(VkCommandBuffer commandBuffer, vulkan_wrappers::GetWrapper(dstImage); assert(dst_img_wrapper != nullptr); - cmd_buf_wrapper->referenced_assets.images.push_back(dst_img_wrapper); + cmd_buf_wrapper->modified_assets.images.push_back(dst_img_wrapper); } } @@ -2249,7 +2249,7 @@ void VulkanStateTracker::TrackCmdBlitImage2(VkCommandBuffer commandBuffer, const vulkan_wrappers::GetWrapper(pBlitImageInfo->dstImage); assert(dst_img_wrapper != nullptr); - cmd_buf_wrapper->referenced_assets.images.push_back(dst_img_wrapper); + cmd_buf_wrapper->modified_assets.images.push_back(dst_img_wrapper); } } @@ -2271,7 +2271,7 @@ void VulkanStateTracker::TrackCmdUpdateBuffer( vulkan_wrappers::GetWrapper(dstBuffer); assert(dst_buffer_wrapper != nullptr); - cmd_buf_wrapper->referenced_assets.buffers.push_back(dst_buffer_wrapper); + cmd_buf_wrapper->modified_assets.buffers.push_back(dst_buffer_wrapper); } } @@ -2288,7 +2288,7 @@ void VulkanStateTracker::TrackCmdFillBuffer( vulkan_wrappers::GetWrapper(dstBuffer); assert(dst_buffer_wrapper != nullptr); - cmd_buf_wrapper->referenced_assets.buffers.push_back(dst_buffer_wrapper); + cmd_buf_wrapper->modified_assets.buffers.push_back(dst_buffer_wrapper); } } @@ -2309,7 +2309,7 @@ void VulkanStateTracker::TrackCmdClearColorImage(VkCommandBuffer vulkan_wrappers::GetWrapper(image); assert(dst_img_wrapper != nullptr); - cmd_buf_wrapper->referenced_assets.images.push_back(dst_img_wrapper); + cmd_buf_wrapper->modified_assets.images.push_back(dst_img_wrapper); } } @@ -2330,7 +2330,7 @@ void VulkanStateTracker::TrackCmdClearDepthStencilImage(VkCommandBuffer vulkan_wrappers::GetWrapper(image); assert(dst_img_wrapper != nullptr); - cmd_buf_wrapper->referenced_assets.images.push_back(dst_img_wrapper); + cmd_buf_wrapper->modified_assets.images.push_back(dst_img_wrapper); } } @@ -2375,7 +2375,7 @@ void VulkanStateTracker::TrackMappedAssetsWrites(VkCommandBuffer commandBuffer) (img->bind_offset + img->size) <= page_offset_end) || (img->bind_offset <= page_offset_start && (img->bind_offset + img->size) >= page_offset_end)) { - cmd_buf_wrapper->referenced_assets.images.push_back(img); + cmd_buf_wrapper->modified_assets.images.push_back(img); break; } } @@ -2400,7 +2400,7 @@ void VulkanStateTracker::TrackMappedAssetsWrites(VkCommandBuffer commandBuffer) (buf->bind_offset <= page_offset_start && (buf->bind_offset + buf->created_size) >= page_offset_end)) { - cmd_buf_wrapper->referenced_assets.buffers.push_back(buf); + cmd_buf_wrapper->modified_assets.buffers.push_back(buf); break; } } @@ -2449,7 +2449,7 @@ void VulkanStateTracker::TrackPipelineDescriptors(vulkan_wrappers::CommandBuffer if (img_view_wrapper != nullptr && img_view_wrapper->image != nullptr) { - command_wrapper->referenced_assets.images.push_back(img_view_wrapper->image); + command_wrapper->modified_assets.images.push_back(img_view_wrapper->image); } } } @@ -2465,7 +2465,7 @@ void VulkanStateTracker::TrackPipelineDescriptors(vulkan_wrappers::CommandBuffer descriptor_binding->second.storage_buffers[a].buffer); if (buf_wrapper != nullptr) { - command_wrapper->referenced_assets.buffers.push_back(buf_wrapper); + command_wrapper->modified_assets.buffers.push_back(buf_wrapper); } } } @@ -2480,7 +2480,7 @@ void VulkanStateTracker::TrackPipelineDescriptors(vulkan_wrappers::CommandBuffer descriptor_binding->second.storage_texel_buffer_views[a]); if (buf_view_wrapper != nullptr && buf_view_wrapper->buffer != nullptr) { - command_wrapper->referenced_assets.buffers.push_back(buf_view_wrapper->buffer); + command_wrapper->modified_assets.buffers.push_back(buf_view_wrapper->buffer); } } } @@ -2693,13 +2693,13 @@ void VulkanStateTracker::MarkReferencedAssetsAsDirty(VkCommandBuffer commandBuff vulkan_wrappers::GetWrapper(commandBuffer); assert(cmd_buf_wrapper != nullptr); - for (auto img : cmd_buf_wrapper->referenced_assets.images) + for (auto img : cmd_buf_wrapper->modified_assets.images) { assert(img); img->dirty = true; } - for (auto buf : cmd_buf_wrapper->referenced_assets.buffers) + for (auto buf : cmd_buf_wrapper->modified_assets.buffers) { assert(buf); buf->dirty = true; From 597c06de230f34986a9fc392a655a4dc964977e0 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Tue, 23 Jul 2024 18:48:39 +0300 Subject: [PATCH 18/99] TrackMappedAssetsWrites should be working correctly now --- framework/encode/vulkan_handle_wrappers.h | 23 ++--- framework/encode/vulkan_state_tracker.cpp | 99 ++++++++++--------- framework/encode/vulkan_state_tracker.h | 4 + .../vulkan_state_tracker_initializers.h | 3 +- framework/encode/vulkan_state_writer.cpp | 18 ++-- framework/util/page_guard_manager.cpp | 5 +- framework/util/page_guard_manager.h | 2 +- framework/util/page_status_tracker.h | 2 +- 8 files changed, 80 insertions(+), 76 deletions(-) diff --git a/framework/encode/vulkan_handle_wrappers.h b/framework/encode/vulkan_handle_wrappers.h index 2bc8b9bdf6..95c3d149ab 100644 --- a/framework/encode/vulkan_handle_wrappers.h +++ b/framework/encode/vulkan_handle_wrappers.h @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -165,7 +166,13 @@ struct EventWrapper : public HandleWrapper DeviceWrapper* device{ nullptr }; }; -struct BufferWrapper : public HandleWrapper +struct AssetWrapperBase +{ + VkDeviceSize size{ 0 }; + bool dirty{ true }; +}; + +struct BufferWrapper : public HandleWrapper, AssetWrapperBase { DeviceWrapper* bind_device{ nullptr }; const void* bind_pnext{ nullptr }; @@ -174,16 +181,13 @@ struct BufferWrapper : public HandleWrapper format::HandleId bind_memory_id{ format::kNullHandleId }; VkDeviceSize bind_offset{ 0 }; uint32_t queue_family_index{ 0 }; - VkDeviceSize created_size{ 0 }; // State tracking info for buffers with device addresses. format::HandleId device_id{ format::kNullHandleId }; VkDeviceAddress address{ 0 }; - - bool dirty{ true }; }; -struct ImageWrapper : public HandleWrapper +struct ImageWrapper : public HandleWrapper, AssetWrapperBase { DeviceWrapper* bind_device{ nullptr }; const void* bind_pnext{ nullptr }; @@ -202,9 +206,6 @@ struct ImageWrapper : public HandleWrapper VkImageLayout current_layout{ VK_IMAGE_LAYOUT_UNDEFINED }; bool is_swapchain_image{ false }; std::set parent_swapchains; - - bool dirty{ true }; - size_t size; }; struct DeviceMemoryWrapper : public HandleWrapper @@ -230,11 +231,7 @@ struct DeviceMemoryWrapper : public HandleWrapper format::HandleId device_id{ format::kNullHandleId }; VkDeviceAddress address{ 0 }; - struct - { - std::vector images; - std::vector buffers; - } bound_assets; + std::map bound_assets; }; struct BufferViewWrapper : public HandleWrapper diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index d1d4ae1e94..cd1b0e2527 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -28,6 +28,7 @@ #include "encode/vulkan_handle_wrapper_util.h" #include "encode/vulkan_track_struct.h" #include "graphics/vulkan_struct_get_pnext.h" +#include "util/logging.h" #include "util/platform.h" #include "Vulkan-Utility-Libraries/vk_format_utils.h" #include "vulkan/vulkan_core.h" @@ -371,7 +372,7 @@ void VulkanStateTracker::TrackBufferMemoryBinding( vulkan_wrappers::DeviceMemoryWrapper* mem_wrapper = vulkan_wrappers::GetWrapper(memory); assert(mem_wrapper != nullptr); - mem_wrapper->bound_assets.buffers.push_back(wrapper); + mem_wrapper->bound_assets.emplace(memoryOffset, wrapper); if (bind_info_pnext != nullptr) { @@ -440,7 +441,7 @@ void VulkanStateTracker::TrackImageMemoryBinding( vulkan_wrappers::DeviceMemoryWrapper* mem_wrapper = vulkan_wrappers::GetWrapper(memory); assert(mem_wrapper != nullptr); - mem_wrapper->bound_assets.images.push_back(wrapper); + mem_wrapper->bound_assets.emplace(memoryOffset, wrapper); if (bind_info_pnext != nullptr) { @@ -892,8 +893,6 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w } } } - - } if (copies != nullptr) @@ -2336,14 +2335,17 @@ void VulkanStateTracker::TrackCmdClearDepthStencilImage(VkCommandBuffer void VulkanStateTracker::TrackMappedAssetsWrites(VkCommandBuffer commandBuffer) { + util::PageGuardManager* manager = util::PageGuardManager::Get(); + if (manager == nullptr) + { + return; + } + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = vulkan_wrappers::GetWrapper(commandBuffer); assert(cmd_buf_wrapper != nullptr); - util::PageGuardManager* manager = util::PageGuardManager::Get(); - assert(manager != nullptr); - - std::unordered_map memories_page_status; + std::unordered_map memories_page_status; manager->GetModifiedMemoryRegions(memories_page_status); const size_t page_size = util::platform::GetSystemPageSize(); @@ -2352,55 +2354,24 @@ void VulkanStateTracker::TrackMappedAssetsWrites(VkCommandBuffer commandBuffer) vulkan_wrappers::DeviceMemoryWrapper* dev_mem_wrapper = state_table_.GetDeviceMemoryWrapper(entry.first); assert(dev_mem_wrapper != nullptr); - size_t page = 0; - for (auto img : dev_mem_wrapper->bound_assets.images) + for (auto& asset : dev_mem_wrapper->bound_assets) { - if (img->is_swapchain_image) + if (asset.second->dirty || !asset.second->size) { continue; } - for (; page < entry.second.size(); ++page) - { - if (!entry.second[page]) - { - continue; - } - - const size_t page_offset_start = page * page_size; - const size_t page_offset_end = (page + 1) * page_size; + const size_t first_page = asset.first / page_size; + const size_t last_page = (asset.first + asset.second->size - 1) / page_size; - if ((img->bind_offset >= page_offset_start && img->bind_offset <= page_offset_end) || - ((img->bind_offset + img->size) >= page_offset_start && - (img->bind_offset + img->size) <= page_offset_end) || - (img->bind_offset <= page_offset_start && (img->bind_offset + img->size) >= page_offset_end)) - { - cmd_buf_wrapper->modified_assets.images.push_back(img); - break; - } - } - } + assert(first_page <= last_page); + assert(first_page <= entry.second.size()); - page = 0; - for (auto buf : dev_mem_wrapper->bound_assets.buffers) - { - for (; page < entry.second.size(); ++page) + for (size_t page = first_page; page < entry.second.size() && page <= last_page; ++page) { - if (!entry.second[page]) + if (entry.second[page]) { - continue; - } - - const size_t page_offset_start = page * page_size; - const size_t page_offset_end = (page + 1) * page_size; - - if ((buf->bind_offset >= page_offset_start && buf->bind_offset <= page_offset_end) || - ((buf->bind_offset + buf->created_size) >= page_offset_start && - (buf->bind_offset + buf->created_size) <= page_offset_end) || - (buf->bind_offset <= page_offset_start && - (buf->bind_offset + buf->created_size) >= page_offset_end)) - { - cmd_buf_wrapper->modified_assets.buffers.push_back(buf); + asset.second->dirty = true; break; } } @@ -2706,5 +2677,37 @@ void VulkanStateTracker::MarkReferencedAssetsAsDirty(VkCommandBuffer commandBuff } } +void VulkanStateTracker::DestroyState(vulkan_wrappers::ImageWrapper* wrapper) +{ + if (wrapper->bind_memory_id != format::kNullHandleId) + { + vulkan_wrappers::DeviceMemoryWrapper* mem_wrapper = + state_table_.GetDeviceMemoryWrapper(wrapper->bind_memory_id); + assert(mem_wrapper != nullptr); + + auto bind_entry = mem_wrapper->bound_assets.find(wrapper->bind_offset); + if (bind_entry != mem_wrapper->bound_assets.end()) + { + mem_wrapper->bound_assets.erase(bind_entry); + } + } +} + +void VulkanStateTracker::DestroyState(vulkan_wrappers::BufferWrapper* wrapper) +{ + if (wrapper->bind_memory_id != format::kNullHandleId) + { + vulkan_wrappers::DeviceMemoryWrapper* mem_wrapper = + state_table_.GetDeviceMemoryWrapper(wrapper->bind_memory_id); + assert(mem_wrapper != nullptr); + + auto bind_entry = mem_wrapper->bound_assets.find(wrapper->bind_offset); + if (bind_entry != mem_wrapper->bound_assets.end()) + { + mem_wrapper->bound_assets.erase(bind_entry); + } + } +} + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/vulkan_state_tracker.h b/framework/encode/vulkan_state_tracker.h index 564c1249ec..d177685b84 100644 --- a/framework/encode/vulkan_state_tracker.h +++ b/framework/encode/vulkan_state_tracker.h @@ -687,6 +687,10 @@ class VulkanStateTracker void DestroyState(vulkan_wrappers::AccelerationStructureKHRWrapper* wrapper); + void DestroyState(vulkan_wrappers::ImageWrapper* wrapper); + + void DestroyState(vulkan_wrappers::BufferWrapper* wrapper); + void TrackQuerySubmissions(vulkan_wrappers::CommandBufferWrapper* command_wrapper); void TrackPipelineDescriptors(vulkan_wrappers::CommandBufferWrapper* command_wrapper, diff --git a/framework/encode/vulkan_state_tracker_initializers.h b/framework/encode/vulkan_state_tracker_initializers.h index 3de3336ffe..4a8d1a0987 100644 --- a/framework/encode/vulkan_state_tracker_initializers.h +++ b/framework/encode/vulkan_state_tracker_initializers.h @@ -608,7 +608,8 @@ inline void InitializeStatecreate_call_id = create_call_id; wrapper->create_parameters = std::move(create_parameters); - wrapper->created_size = create_info->size; + wrapper->size = create_info->size; + wrapper->size = create_info->size; // TODO: Do we need to track the queue family that the buffer is actually used with? if ((create_info->queueFamilyIndexCount > 0) && (create_info->pQueueFamilyIndices != nullptr)) diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index 7624c685af..bad8d53990 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -1392,7 +1392,7 @@ void VulkanStateWriter::ProcessBufferMemory(const vulkan_wrappers::DeviceWrapper if (snapshot_entry.need_staging_copy) { VkResult result = resource_util.ReadFromBufferResource( - buffer_wrapper->handle, buffer_wrapper->created_size, 0, buffer_wrapper->queue_family_index, data); + buffer_wrapper->handle, buffer_wrapper->size, 0, buffer_wrapper->queue_family_index, data); if (result == VK_SUCCESS) { @@ -1411,7 +1411,7 @@ void VulkanStateWriter::ProcessBufferMemory(const vulkan_wrappers::DeviceWrapper result = device_table->MapMemory(device_wrapper->handle, memory_wrapper->handle, buffer_wrapper->bind_offset, - buffer_wrapper->created_size, + buffer_wrapper->size, 0, &map_ptr); @@ -1430,7 +1430,7 @@ void VulkanStateWriter::ProcessBufferMemory(const vulkan_wrappers::DeviceWrapper InvalidateMappedMemoryRange(device_wrapper, memory_wrapper->handle, buffer_wrapper->bind_offset, - buffer_wrapper->created_size); + buffer_wrapper->size); } } @@ -1438,9 +1438,9 @@ void VulkanStateWriter::ProcessBufferMemory(const vulkan_wrappers::DeviceWrapper if (bytes != nullptr) { - GFXRECON_CHECK_CONVERSION_DATA_LOSS(size_t, buffer_wrapper->created_size); + GFXRECON_CHECK_CONVERSION_DATA_LOSS(size_t, buffer_wrapper->size); - size_t data_size = static_cast(buffer_wrapper->created_size); + size_t data_size = static_cast(buffer_wrapper->size); format::InitBufferCommandHeader upload_cmd; upload_cmd.meta_header.block_header.type = format::kMetaDataBlock; @@ -1761,14 +1761,14 @@ void VulkanStateWriter::WriteBufferMemoryState(const VulkanStateTable& state_tab snapshot_info.memory_properties = GetMemoryProperties(device_wrapper, memory_wrapper); snapshot_info.need_staging_copy = !IsBufferReadable(snapshot_info.memory_properties, memory_wrapper); - if ((*max_resource_size) < wrapper->created_size) + if ((*max_resource_size) < wrapper->size) { - (*max_resource_size) = wrapper->created_size; + (*max_resource_size) = wrapper->size; } - if (snapshot_info.need_staging_copy && ((*max_staging_copy_size) < wrapper->created_size)) + if (snapshot_info.need_staging_copy && ((*max_staging_copy_size) < wrapper->size)) { - (*max_staging_copy_size) = wrapper->created_size; + (*max_staging_copy_size) = wrapper->size; } snapshot_entry.buffers.emplace_back(snapshot_info); diff --git a/framework/util/page_guard_manager.cpp b/framework/util/page_guard_manager.cpp index e8eb14fcd9..437630a0ba 100644 --- a/framework/util/page_guard_manager.cpp +++ b/framework/util/page_guard_manager.cpp @@ -1371,14 +1371,13 @@ const void* PageGuardManager::GetMappedMemory(uint64_t memory_id) const } void PageGuardManager::GetModifiedMemoryRegions( - std::unordered_map& memories_page_status) + std::unordered_map& memories_page_status) { memories_page_status.clear(); for (auto& entry : memory_info_) { - auto new_entry = memories_page_status.emplace(entry.first, PageStatusTracker::PageStatus()); - entry.second.status_tracker.GetActiveWrites(new_entry.first->second); + auto new_entry = memories_page_status.emplace(entry.first, entry.second.status_tracker.GetActiveWrites()); } } diff --git a/framework/util/page_guard_manager.h b/framework/util/page_guard_manager.h index 8075e0dcec..19f42b2636 100644 --- a/framework/util/page_guard_manager.h +++ b/framework/util/page_guard_manager.h @@ -145,7 +145,7 @@ class PageGuardManager void UffdUnblockRtSignal(); - void GetModifiedMemoryRegions(std::unordered_map &memories_page_status); + void GetModifiedMemoryRegions(std::unordered_map &memories_page_status); protected: PageGuardManager(); diff --git a/framework/util/page_status_tracker.h b/framework/util/page_status_tracker.h index 45500d4830..edb920e93f 100644 --- a/framework/util/page_status_tracker.h +++ b/framework/util/page_status_tracker.h @@ -53,7 +53,7 @@ class PageStatusTracker void SetAllBlocksActiveWrite() { std::fill(active_writes_.begin(), active_writes_.end(), 1); } - void GetActiveWrites(PageStatus& writes) { writes = active_writes_; } + PageStatus& GetActiveWrites() { return active_writes_; } private: PageStatus active_writes_; //< Track blocks that have been written. From 5b1366f6c9d65406fc6558a1d7b419cb88ae6fd8 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Wed, 24 Jul 2024 09:27:51 +0300 Subject: [PATCH 19/99] Create asset file at the right moment --- framework/encode/capture_manager.cpp | 32 +++++++++++++++++----------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/framework/encode/capture_manager.cpp b/framework/encode/capture_manager.cpp index a0d41131a7..e6f7d93fcc 100644 --- a/framework/encode/capture_manager.cpp +++ b/framework/encode/capture_manager.cpp @@ -382,17 +382,6 @@ bool CommonCaptureManager::Initialize(format::ApiFamilyId api_ { GFXRECON_ASSERT(trace_settings.trim_boundary != CaptureSettings::TrimBoundary::kUnknown); - std::string asset_file_name = CreateAssetFilename(base_filename_); - asset_file_stream_ = std::make_unique(asset_file_name, kFileStreamBufferSize); - WriteAssetFileHeader(); - - GFXRECON_WRITE_CONSOLE("asset_file_name: %s", asset_file_name.c_str()) - - if (!asset_file_stream_->IsValid()) - { - asset_file_stream_ = nullptr; - } - // Override default kModeWrite capture mode. trim_enabled_ = true; trim_boundary_ = trace_settings.trim_boundary; @@ -957,8 +946,6 @@ std::string CommonCaptureManager::CreateAssetFilename(const std::string& base_fi asset_filename += std::string("_asset_file"); } - GFXRECON_WRITE_CONSOLE(" asset_filename: %s", asset_filename.c_str()) - return asset_filename; } @@ -967,6 +954,25 @@ bool CommonCaptureManager::CreateCaptureFile(format::ApiFamilyId api_family, con bool success = true; std::string capture_filename = base_filename; + if (trim_enabled_ && asset_file_stream_.get() == nullptr) + { + std::string asset_file_name = CreateAssetFilename(base_filename_); + if (timestamp_filename_) + { + asset_file_name = util::filepath::GenerateTimestampedFilename(asset_file_name); + } + + asset_file_stream_ = std::make_unique(asset_file_name, kFileStreamBufferSize); + if (asset_file_stream_->IsValid()) + { + WriteAssetFileHeader(); + } + else + { + asset_file_stream_ = nullptr; + } + } + if (timestamp_filename_) { capture_filename = util::filepath::GenerateTimestampedFilename(capture_filename); From bff7f4a220ae22c4f406f88eea38abbf4c135b73 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Wed, 24 Jul 2024 10:13:10 +0300 Subject: [PATCH 20/99] Group similar functions together --- framework/encode/vulkan_state_tracker.cpp | 64 +++++++++++------------ 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index cd1b0e2527..11c76fc715 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -1803,6 +1803,38 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::AccelerationStructureKHRW } } +void VulkanStateTracker::DestroyState(vulkan_wrappers::ImageWrapper* wrapper) +{ + if (wrapper->bind_memory_id != format::kNullHandleId) + { + vulkan_wrappers::DeviceMemoryWrapper* mem_wrapper = + state_table_.GetDeviceMemoryWrapper(wrapper->bind_memory_id); + assert(mem_wrapper != nullptr); + + auto bind_entry = mem_wrapper->bound_assets.find(wrapper->bind_offset); + if (bind_entry != mem_wrapper->bound_assets.end()) + { + mem_wrapper->bound_assets.erase(bind_entry); + } + } +} + +void VulkanStateTracker::DestroyState(vulkan_wrappers::BufferWrapper* wrapper) +{ + if (wrapper->bind_memory_id != format::kNullHandleId) + { + vulkan_wrappers::DeviceMemoryWrapper* mem_wrapper = + state_table_.GetDeviceMemoryWrapper(wrapper->bind_memory_id); + assert(mem_wrapper != nullptr); + + auto bind_entry = mem_wrapper->bound_assets.find(wrapper->bind_offset); + if (bind_entry != mem_wrapper->bound_assets.end()) + { + mem_wrapper->bound_assets.erase(bind_entry); + } + } +} + void VulkanStateTracker::TrackTlasToBlasDependencies(uint32_t command_buffer_count, const VkCommandBuffer* command_buffers) { @@ -2677,37 +2709,5 @@ void VulkanStateTracker::MarkReferencedAssetsAsDirty(VkCommandBuffer commandBuff } } -void VulkanStateTracker::DestroyState(vulkan_wrappers::ImageWrapper* wrapper) -{ - if (wrapper->bind_memory_id != format::kNullHandleId) - { - vulkan_wrappers::DeviceMemoryWrapper* mem_wrapper = - state_table_.GetDeviceMemoryWrapper(wrapper->bind_memory_id); - assert(mem_wrapper != nullptr); - - auto bind_entry = mem_wrapper->bound_assets.find(wrapper->bind_offset); - if (bind_entry != mem_wrapper->bound_assets.end()) - { - mem_wrapper->bound_assets.erase(bind_entry); - } - } -} - -void VulkanStateTracker::DestroyState(vulkan_wrappers::BufferWrapper* wrapper) -{ - if (wrapper->bind_memory_id != format::kNullHandleId) - { - vulkan_wrappers::DeviceMemoryWrapper* mem_wrapper = - state_table_.GetDeviceMemoryWrapper(wrapper->bind_memory_id); - assert(mem_wrapper != nullptr); - - auto bind_entry = mem_wrapper->bound_assets.find(wrapper->bind_offset); - if (bind_entry != mem_wrapper->bound_assets.end()) - { - mem_wrapper->bound_assets.erase(bind_entry); - } - } -} - GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) From 12bdb82ed4008df1bf25889ab9be04002b2084f6 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Wed, 24 Jul 2024 10:26:58 +0300 Subject: [PATCH 21/99] Unify tracked images and buffers --- framework/encode/vulkan_handle_wrappers.h | 30 ++++------- framework/encode/vulkan_state_tracker.cpp | 62 ++++++++++------------- 2 files changed, 38 insertions(+), 54 deletions(-) diff --git a/framework/encode/vulkan_handle_wrappers.h b/framework/encode/vulkan_handle_wrappers.h index 95c3d149ab..7397399a74 100644 --- a/framework/encode/vulkan_handle_wrappers.h +++ b/framework/encode/vulkan_handle_wrappers.h @@ -43,6 +43,7 @@ #include #include #include +#include #include GFXRECON_BEGIN_NAMESPACE(gfxrecon) @@ -168,20 +169,20 @@ struct EventWrapper : public HandleWrapper struct AssetWrapperBase { - VkDeviceSize size{ 0 }; - bool dirty{ true }; -}; - -struct BufferWrapper : public HandleWrapper, AssetWrapperBase -{ - DeviceWrapper* bind_device{ nullptr }; - const void* bind_pnext{ nullptr }; + DeviceWrapper* bind_device{ nullptr }; + const void* bind_pnext{ nullptr }; std::unique_ptr bind_pnext_memory; format::HandleId bind_memory_id{ format::kNullHandleId }; VkDeviceSize bind_offset{ 0 }; uint32_t queue_family_index{ 0 }; + VkDeviceSize size{ 0 }; + bool dirty{ true }; +}; + +struct BufferWrapper : public HandleWrapper, AssetWrapperBase +{ // State tracking info for buffers with device addresses. format::HandleId device_id{ format::kNullHandleId }; VkDeviceAddress address{ 0 }; @@ -189,13 +190,6 @@ struct BufferWrapper : public HandleWrapper, AssetWrapperBase struct ImageWrapper : public HandleWrapper, AssetWrapperBase { - DeviceWrapper* bind_device{ nullptr }; - const void* bind_pnext{ nullptr }; - std::unique_ptr bind_pnext_memory; - - format::HandleId bind_memory_id{ format::kNullHandleId }; - VkDeviceSize bind_offset{ 0 }; - uint32_t queue_family_index{ 0 }; VkImageType image_type{ VK_IMAGE_TYPE_2D }; VkFormat format{ VK_FORMAT_UNDEFINED }; VkExtent3D extent{ 0, 0, 0 }; @@ -410,11 +404,7 @@ struct CommandBufferWrapper : public HandleWrapper std::unordered_map bound_descriptors[vulkan_state_info::PipelineBindPoints::kBindPoint_count]; - struct - { - std::vector images; - std::vector buffers; - } modified_assets; + std::unordered_set modified_assets; }; struct DeferredOperationKHRWrapper : public HandleWrapper diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index 11c76fc715..7924ce046d 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -60,8 +60,8 @@ void VulkanStateTracker::TrackCommandExecution(vulkan_wrappers::CommandBufferWra wrapper->pending_layouts.clear(); wrapper->recorded_queries.clear(); wrapper->tlas_build_info_map.clear(); - wrapper->modified_assets.buffers.clear(); - wrapper->modified_assets.images.clear(); + wrapper->modified_assets.clear(); + wrapper->modified_assets.clear(); for (uint32_t point = vulkan_state_info::kBindPoint_graphics; point != vulkan_state_info::kBindPoint_count; ++point) { @@ -108,8 +108,8 @@ void VulkanStateTracker::TrackResetCommandPool(VkCommandPool command_pool) entry.second->pending_layouts.clear(); entry.second->recorded_queries.clear(); entry.second->tlas_build_info_map.clear(); - entry.second->modified_assets.buffers.clear(); - entry.second->modified_assets.images.clear(); + entry.second->modified_assets.clear(); + entry.second->modified_assets.clear(); for (uint32_t point = vulkan_state_info::kBindPoint_graphics; point != vulkan_state_info::kBindPoint_count; ++point) { @@ -490,7 +490,7 @@ void VulkanStateTracker::TrackBeginRenderPass(VkCommandBuffer command_buffer, co (has_stencil && wrapper->active_render_pass->attachment_info.stencil_store_op[i] == VK_ATTACHMENT_STORE_OP_STORE)) { - wrapper->modified_assets.images.push_back(wrapper->render_pass_framebuffer->attachments[i]); + wrapper->modified_assets.insert(wrapper->render_pass_framebuffer->attachments[i]); } } } @@ -2043,7 +2043,7 @@ void VulkanStateTracker::TrackCmdCopyBuffer(VkCommandBuffer commandBuffer, vulkan_wrappers::GetWrapper(dstBuffer); assert(dst_buffer_wrapper != nullptr); - cmd_buf_wrapper->modified_assets.buffers.push_back(dst_buffer_wrapper); + cmd_buf_wrapper->modified_assets.insert(dst_buffer_wrapper); } } @@ -2084,7 +2084,7 @@ void VulkanStateTracker::TrackCmdCopyBufferToImage(VkCommandBuffer comm vulkan_wrappers::GetWrapper(dstImage); assert(dst_img_wrapper != nullptr); - cmd_buf_wrapper->modified_assets.images.push_back(dst_img_wrapper); + cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); } } @@ -2105,7 +2105,7 @@ void VulkanStateTracker::TrackCmdCopyImageToBuffer(VkCommandBuffer comm vulkan_wrappers::GetWrapper(dstBuffer); assert(dst_buffer_wrapper != nullptr); - cmd_buf_wrapper->modified_assets.buffers.push_back(dst_buffer_wrapper); + cmd_buf_wrapper->modified_assets.insert(dst_buffer_wrapper); } } @@ -2121,7 +2121,7 @@ void VulkanStateTracker::TrackCmdCopyBuffer2(VkCommandBuffer commandBuffer, cons vulkan_wrappers::GetWrapper(pCopyBufferInfo->dstBuffer); assert(dst_buffer_wrapper != nullptr); - cmd_buf_wrapper->modified_assets.buffers.push_back(dst_buffer_wrapper); + cmd_buf_wrapper->modified_assets.insert(dst_buffer_wrapper); } } @@ -2137,7 +2137,7 @@ void VulkanStateTracker::TrackCmdCopyImage2(VkCommandBuffer commandBuffer, const vulkan_wrappers::GetWrapper(pCopyImageInfo->dstImage); assert(dst_img_wrapper != nullptr); - cmd_buf_wrapper->modified_assets.images.push_back(dst_img_wrapper); + cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); } } @@ -2155,7 +2155,7 @@ void VulkanStateTracker::TrackCmdCopyBufferToImage2(VkCommandBuffer vulkan_wrappers::GetWrapper(pCopyBufferToImageInfo->dstImage); assert(dst_img_wrapper != nullptr); - cmd_buf_wrapper->modified_assets.images.push_back(dst_img_wrapper); + cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); } } @@ -2173,7 +2173,7 @@ void VulkanStateTracker::TrackCmdCopyImageToBuffer2(VkCommandBuffer vulkan_wrappers::GetWrapper(pCopyImageToBufferInfo->dstBuffer); assert(dst_buffer_wrapper != nullptr); - cmd_buf_wrapper->modified_assets.buffers.push_back(dst_buffer_wrapper); + cmd_buf_wrapper->modified_assets.insert(dst_buffer_wrapper); } } @@ -2189,7 +2189,7 @@ void VulkanStateTracker::TrackCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, c vulkan_wrappers::GetWrapper(pCopyBufferInfo->dstBuffer); assert(dst_buffer_wrapper != nullptr); - cmd_buf_wrapper->modified_assets.buffers.push_back(dst_buffer_wrapper); + cmd_buf_wrapper->modified_assets.insert(dst_buffer_wrapper); } } @@ -2205,7 +2205,7 @@ void VulkanStateTracker::TrackCmdCopyImage2KHR(VkCommandBuffer commandBuffer, co vulkan_wrappers::GetWrapper(pCopyImageInfo->dstImage); assert(dst_img_wrapper != nullptr); - cmd_buf_wrapper->modified_assets.images.push_back(dst_img_wrapper); + cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); } } @@ -2223,7 +2223,7 @@ void VulkanStateTracker::TrackCmdCopyBufferToImage2KHR(VkCommandBuffer vulkan_wrappers::GetWrapper(pCopyBufferToImageInfo->dstImage); assert(dst_img_wrapper != nullptr); - cmd_buf_wrapper->modified_assets.images.push_back(dst_img_wrapper); + cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); } } @@ -2241,7 +2241,7 @@ void VulkanStateTracker::TrackCmdCopyImageToBuffer2KHR(VkCommandBuffer vulkan_wrappers::GetWrapper(pCopyImageToBufferInfo->dstBuffer); assert(dst_buffer_wrapper != nullptr); - cmd_buf_wrapper->modified_assets.buffers.push_back(dst_buffer_wrapper); + cmd_buf_wrapper->modified_assets.insert(dst_buffer_wrapper); } } @@ -2264,7 +2264,7 @@ void VulkanStateTracker::TrackCmdBlitImage(VkCommandBuffer commandBuffer, vulkan_wrappers::GetWrapper(dstImage); assert(dst_img_wrapper != nullptr); - cmd_buf_wrapper->modified_assets.images.push_back(dst_img_wrapper); + cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); } } @@ -2280,7 +2280,7 @@ void VulkanStateTracker::TrackCmdBlitImage2(VkCommandBuffer commandBuffer, const vulkan_wrappers::GetWrapper(pBlitImageInfo->dstImage); assert(dst_img_wrapper != nullptr); - cmd_buf_wrapper->modified_assets.images.push_back(dst_img_wrapper); + cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); } } @@ -2302,7 +2302,7 @@ void VulkanStateTracker::TrackCmdUpdateBuffer( vulkan_wrappers::GetWrapper(dstBuffer); assert(dst_buffer_wrapper != nullptr); - cmd_buf_wrapper->modified_assets.buffers.push_back(dst_buffer_wrapper); + cmd_buf_wrapper->modified_assets.insert(dst_buffer_wrapper); } } @@ -2319,7 +2319,7 @@ void VulkanStateTracker::TrackCmdFillBuffer( vulkan_wrappers::GetWrapper(dstBuffer); assert(dst_buffer_wrapper != nullptr); - cmd_buf_wrapper->modified_assets.buffers.push_back(dst_buffer_wrapper); + cmd_buf_wrapper->modified_assets.insert(dst_buffer_wrapper); } } @@ -2340,7 +2340,7 @@ void VulkanStateTracker::TrackCmdClearColorImage(VkCommandBuffer vulkan_wrappers::GetWrapper(image); assert(dst_img_wrapper != nullptr); - cmd_buf_wrapper->modified_assets.images.push_back(dst_img_wrapper); + cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); } } @@ -2361,7 +2361,7 @@ void VulkanStateTracker::TrackCmdClearDepthStencilImage(VkCommandBuffer vulkan_wrappers::GetWrapper(image); assert(dst_img_wrapper != nullptr); - cmd_buf_wrapper->modified_assets.images.push_back(dst_img_wrapper); + cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); } } @@ -2452,7 +2452,7 @@ void VulkanStateTracker::TrackPipelineDescriptors(vulkan_wrappers::CommandBuffer if (img_view_wrapper != nullptr && img_view_wrapper->image != nullptr) { - command_wrapper->modified_assets.images.push_back(img_view_wrapper->image); + command_wrapper->modified_assets.insert(img_view_wrapper->image); } } } @@ -2468,7 +2468,7 @@ void VulkanStateTracker::TrackPipelineDescriptors(vulkan_wrappers::CommandBuffer descriptor_binding->second.storage_buffers[a].buffer); if (buf_wrapper != nullptr) { - command_wrapper->modified_assets.buffers.push_back(buf_wrapper); + command_wrapper->modified_assets.insert(buf_wrapper); } } } @@ -2483,7 +2483,7 @@ void VulkanStateTracker::TrackPipelineDescriptors(vulkan_wrappers::CommandBuffer descriptor_binding->second.storage_texel_buffer_views[a]); if (buf_view_wrapper != nullptr && buf_view_wrapper->buffer != nullptr) { - command_wrapper->modified_assets.buffers.push_back(buf_view_wrapper->buffer); + command_wrapper->modified_assets.insert(buf_view_wrapper->buffer); } } } @@ -2696,16 +2696,10 @@ void VulkanStateTracker::MarkReferencedAssetsAsDirty(VkCommandBuffer commandBuff vulkan_wrappers::GetWrapper(commandBuffer); assert(cmd_buf_wrapper != nullptr); - for (auto img : cmd_buf_wrapper->modified_assets.images) + for (auto asset : cmd_buf_wrapper->modified_assets) { - assert(img); - img->dirty = true; - } - - for (auto buf : cmd_buf_wrapper->modified_assets.buffers) - { - assert(buf); - buf->dirty = true; + assert(asset); + asset->dirty = true; } } From 9b3a06ad3092797631f69c7e6fa66a1ccf2707c9 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Wed, 24 Jul 2024 13:10:45 +0300 Subject: [PATCH 22/99] Ability to override path to asset path during replay --- android/scripts/gfxrecon.py | 5 +++++ framework/decode/file_processor.cpp | 10 +++++++++- framework/decode/file_processor.h | 7 +++++++ framework/decode/replay_options.h | 1 + framework/encode/vulkan_state_tracker.cpp | 20 ++++++++++++-------- framework/encode/vulkan_state_writer.cpp | 5 +++++ tools/replay/android_main.cpp | 6 ++++++ tools/replay/desktop_main.cpp | 5 +++++ tools/replay/replay_settings.h | 3 ++- tools/tool_settings.h | 6 ++++++ 10 files changed, 58 insertions(+), 10 deletions(-) diff --git a/android/scripts/gfxrecon.py b/android/scripts/gfxrecon.py index 6b2084f3dc..ce17433ac9 100644 --- a/android/scripts/gfxrecon.py +++ b/android/scripts/gfxrecon.py @@ -114,6 +114,7 @@ def CreateReplayParser(): parser.add_argument('--pbi-all', action='store_true', default=False, help='Print all block information.') parser.add_argument('--pbis', metavar='RANGES', default=False, help='Print block information between block index1 and block index2') parser.add_argument('--pcj', '--pipeline-creation-jobs', action='store_true', default=False, help='Specify the number of pipeline-creation-jobs or background-threads.') + parser.add_argument('--asset-file-path', metavar='RANGES', default=False, help='Provide an alternative path for the asset file') return parser def MakeExtrasString(args): @@ -282,6 +283,10 @@ def MakeExtrasString(args): arg_list.append('--pcj') arg_list.append('{}'.format(args.pcj)) + if args.asset_file_path: + arg_list.append('--asset-file-path') + arg_list.append('{}'.format(args.asset_file_path)) + if args.file: arg_list.append(args.file) elif not args.version: diff --git a/framework/decode/file_processor.cpp b/framework/decode/file_processor.cpp index 99e1019d93..22d46f15bd 100644 --- a/framework/decode/file_processor.cpp +++ b/framework/decode/file_processor.cpp @@ -1949,7 +1949,15 @@ bool FileProcessor::ProcessMetaData(const format::BlockHeader& block_header, for { filename_c_str[exec_from_file.filename_length] = '\0'; - const std::string filename = std::string(filename_c_str.data()); + std::string filename; + if (override_asset_filename_.empty()) + { + filename = std::string(filename_c_str.data()); + } + else + { + filename = override_asset_filename_; + } success = OpenFile(filename); if (success) diff --git a/framework/decode/file_processor.h b/framework/decode/file_processor.h index 00176bae50..8f2bf9b5f0 100644 --- a/framework/decode/file_processor.h +++ b/framework/decode/file_processor.h @@ -139,6 +139,11 @@ class FileProcessor block_index_to_ = block_index_to; } + void OverrideAssetFilename(const std::string &new_filename) + { + override_asset_filename_ = new_filename; + } + protected: bool ContinueDecoding(); @@ -262,6 +267,8 @@ class FileProcessor uint32_t remaining_commands{ 0 }; }; std::stack file_stack; + + std::string override_asset_filename_; }; GFXRECON_END_NAMESPACE(decode) diff --git a/framework/decode/replay_options.h b/framework/decode/replay_options.h index fa741af611..1316f7360e 100644 --- a/framework/decode/replay_options.h +++ b/framework/decode/replay_options.h @@ -61,6 +61,7 @@ struct ReplayOptions int64_t block_index_from{ -1 }; int64_t block_index_to{ -1 }; int32_t num_pipeline_creation_jobs{ 0 }; + std::string asset_file_path; }; GFXRECON_END_NAMESPACE(decode) diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index 7924ce046d..a0fa45a39a 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -1809,12 +1809,14 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::ImageWrapper* wrapper) { vulkan_wrappers::DeviceMemoryWrapper* mem_wrapper = state_table_.GetDeviceMemoryWrapper(wrapper->bind_memory_id); - assert(mem_wrapper != nullptr); - auto bind_entry = mem_wrapper->bound_assets.find(wrapper->bind_offset); - if (bind_entry != mem_wrapper->bound_assets.end()) + if (mem_wrapper != nullptr) { - mem_wrapper->bound_assets.erase(bind_entry); + auto bind_entry = mem_wrapper->bound_assets.find(wrapper->bind_offset); + if (bind_entry != mem_wrapper->bound_assets.end()) + { + mem_wrapper->bound_assets.erase(bind_entry); + } } } } @@ -1825,12 +1827,14 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::BufferWrapper* wrapper) { vulkan_wrappers::DeviceMemoryWrapper* mem_wrapper = state_table_.GetDeviceMemoryWrapper(wrapper->bind_memory_id); - assert(mem_wrapper != nullptr); - auto bind_entry = mem_wrapper->bound_assets.find(wrapper->bind_offset); - if (bind_entry != mem_wrapper->bound_assets.end()) + if (mem_wrapper != nullptr) { - mem_wrapper->bound_assets.erase(bind_entry); + auto bind_entry = mem_wrapper->bound_assets.find(wrapper->bind_offset); + if (bind_entry != mem_wrapper->bound_assets.end()) + { + mem_wrapper->bound_assets.erase(bind_entry); + } } } } diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index bad8d53990..c712c23c1b 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -192,6 +192,11 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint marker.marker_type = format::kEndMarker; output_stream_->Write(&marker, sizeof(marker)); + if (asset_file_stream_) + { + asset_file_stream_->Flush(); + } + // For the EndMarker meta command ++blocks_written_; diff --git a/tools/replay/android_main.cpp b/tools/replay/android_main.cpp index e692515d53..4a0ce6c427 100644 --- a/tools/replay/android_main.cpp +++ b/tools/replay/android_main.cpp @@ -153,7 +153,13 @@ void android_main(struct android_app* app) replay_consumer.SetFpsInfo(&fps_info); decoder.AddConsumer(&replay_consumer); + file_processor->AddDecoder(&decoder); + if (!replay_options.asset_file_path.empty()) + { + file_processor->OverrideAssetFilename(replay_options.asset_file_path); + } + application->SetPauseFrame(GetPauseFrame(arg_parser)); // Warn if the capture layer is active. diff --git a/tools/replay/desktop_main.cpp b/tools/replay/desktop_main.cpp index 958382026c..f705abc2cd 100644 --- a/tools/replay/desktop_main.cpp +++ b/tools/replay/desktop_main.cpp @@ -232,6 +232,11 @@ int main(int argc, const char** argv) vulkan_replay_options.block_index_from, vulkan_replay_options.block_index_to); + if (!vulkan_replay_options.asset_file_path.empty()) + { + file_processor->OverrideAssetFilename(vulkan_replay_options.asset_file_path); + } + #if defined(D3D12_SUPPORT) gfxrecon::decode::DxReplayOptions dx_replay_options = GetDxReplayOptions(arg_parser, filename); gfxrecon::decode::Dx12ReplayConsumer dx12_replay_consumer(application, dx_replay_options); diff --git a/tools/replay/replay_settings.h b/tools/replay/replay_settings.h index aa40615c48..9ee09f2dd5 100644 --- a/tools/replay/replay_settings.h +++ b/tools/replay/replay_settings.h @@ -43,7 +43,7 @@ const char kArguments[] = "force-windowed,--fwo|--force-windowed-origin,--batching-memory-usage,--measurement-file,--swapchain,--sgfs|--skip-" "get-fence-status,--sgfr|--" "skip-get-fence-ranges,--dump-resources,--dump-resources-scale,--dump-resources-image-format,--dump-resources-dir," - "--dump-resources-dump-color-attachment-index,--pbis,--pcj|--pipeline-creation-jobs"; + "--dump-resources-dump-color-attachment-index,--pbis,--pcj|--pipeline-creation-jobs,--asset-file-path"; static void PrintUsage(const char* exe_name) { @@ -81,6 +81,7 @@ static void PrintUsage(const char* exe_name) GFXRECON_WRITE_CONSOLE("\t\t\t[--sgfs | --skip-get-fence-status ]"); GFXRECON_WRITE_CONSOLE("\t\t\t[--sgfr | --skip-get-fence-ranges ]"); GFXRECON_WRITE_CONSOLE("\t\t\t[--pbi-all] [--pbis ]"); + GFXRECON_WRITE_CONSOLE("\t\t\t[--asset-file-path] [--pbis ]"); #if defined(WIN32) GFXRECON_WRITE_CONSOLE("\t\t\t[--dump-resources ]"); #endif diff --git a/tools/tool_settings.h b/tools/tool_settings.h index 4a4a51612e..066eb74e2a 100644 --- a/tools/tool_settings.h +++ b/tools/tool_settings.h @@ -129,6 +129,7 @@ const char kDxTwoPassReplay[] = "--dx12-two-pass-replay"; const char kDxOverrideObjectNames[] = "--dx12-override-object-names"; const char kBatchingMemoryUsageArgument[] = "--batching-memory-usage"; #endif +const char kAssetFilePathArgument[] = "--asset-file-path"; const char kDumpResourcesArgument[] = "--dump-resources"; const char kDumpResourcesBeforeDrawOption[] = "--dump-resources-before-draw"; @@ -923,6 +924,11 @@ static void GetReplayOptions(gfxrecon::decode::ReplayOptions& options, options.num_pipeline_creation_jobs = std::stoi(arg_parser.GetArgumentValue(kNumPipelineCreationJobs)); } + if (arg_parser.IsArgumentSet(kAssetFilePathArgument)) + { + options.asset_file_path = arg_parser.GetArgumentValue(kAssetFilePathArgument); + } + const auto& override_gpu = arg_parser.GetArgumentValue(kOverrideGpuArgument); if (!override_gpu.empty()) { From dc5612dacece99eb378fae2aa7255a9c6d026bfa Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Wed, 24 Jul 2024 13:30:39 +0300 Subject: [PATCH 23/99] Rename file processor variables --- framework/decode/file_processor.cpp | 38 ++++++++++++++--------------- framework/decode/file_processor.h | 22 +++++++---------- 2 files changed, 27 insertions(+), 33 deletions(-) diff --git a/framework/decode/file_processor.cpp b/framework/decode/file_processor.cpp index 22d46f15bd..698200608f 100644 --- a/framework/decode/file_processor.cpp +++ b/framework/decode/file_processor.cpp @@ -84,9 +84,8 @@ bool FileProcessor::Initialize(const std::string& filename) if (success) { - main_filename = filename; - success = SetActiveFile(filename); - success = success && ProcessFileHeader(); + success = SetActiveFile(filename); + success = success && ProcessFileHeader(); } else { @@ -197,8 +196,7 @@ bool FileProcessor::ProcessFileHeader() { bool success = false; - assert(active_files_.find(main_filename) != active_files_.end()); - ActiveFiles& active_file = active_files_[main_filename]; + ActiveFiles& active_file = active_files_[file_stack_.top().filename]; if (ReadBytes(&active_file.file_header, sizeof(active_file.file_header))) { @@ -256,17 +254,17 @@ bool FileProcessor::ProcessFileHeader() void FileProcessor::DecrementRemainingCommands() { - assert((!file_stack.top().remaining_commands && file_stack.size() == 1) || - (file_stack.top().remaining_commands && file_stack.size() > 1)); + assert((!file_stack_.top().remaining_commands && file_stack_.size() == 1) || + (file_stack_.top().remaining_commands && file_stack_.size() > 1)); - if (file_stack.size() > 1) + if (file_stack_.size() > 1) { - assert(file_stack.top().remaining_commands); + assert(file_stack_.top().remaining_commands); - --file_stack.top().remaining_commands; - if (file_stack.top().remaining_commands == 0) + --file_stack_.top().remaining_commands; + if (file_stack_.top().remaining_commands == 0) { - file_stack.pop(); + file_stack_.pop(); } } } @@ -504,7 +502,7 @@ bool FileProcessor::ReadCompressedParameterBuffer(size_t compressed_buffer_size bool FileProcessor::ReadBytes(void* buffer, size_t buffer_size) { - auto file_entry = active_files_.find(file_stack.top().filename); + auto file_entry = active_files_.find(file_stack_.top().filename); assert(file_entry != active_files_.end()); if (util::platform::FileRead(buffer, buffer_size, file_entry->second.fd)) @@ -517,7 +515,7 @@ bool FileProcessor::ReadBytes(void* buffer, size_t buffer_size) bool FileProcessor::SkipBytes(size_t skip_size) { - auto file_entry = active_files_.find(file_stack.top().filename); + auto file_entry = active_files_.find(file_stack_.top().filename); assert(file_entry != active_files_.end()); bool success = util::platform::FileSeek(file_entry->second.fd, skip_size, util::platform::FileSeekCurrent); @@ -533,7 +531,7 @@ bool FileProcessor::SkipBytes(size_t skip_size) bool FileProcessor::SeekActiveFile(const std::string& filename, int64_t offset, util::platform::FileSeekOrigin origin) { - auto file_entry = active_files_.find(file_stack.top().filename); + auto file_entry = active_files_.find(file_stack_.top().filename); assert(file_entry != active_files_.end()); bool success = util::platform::FileSeek(file_entry->second.fd, offset, origin); @@ -549,14 +547,14 @@ bool FileProcessor::SeekActiveFile(const std::string& filename, int64_t offset, bool FileProcessor::SeekActiveFile(int64_t offset, util::platform::FileSeekOrigin origin) { - return SeekActiveFile(file_stack.top().filename, offset, origin); + return SeekActiveFile(file_stack_.top().filename, offset, origin); } bool FileProcessor::SetActiveFile(const std::string& filename) { if (active_files_.find(filename) != active_files_.end()) { - file_stack.emplace(filename); + file_stack_.emplace(filename); return true; } else @@ -569,7 +567,7 @@ bool FileProcessor::SetActiveFile(const std::string& filename, int64_t offset, u { if (active_files_.find(filename) != active_files_.end()) { - file_stack.emplace(filename); + file_stack_.emplace(filename); return SeekActiveFile(filename, offset, origin); } else @@ -580,7 +578,7 @@ bool FileProcessor::SetActiveFile(const std::string& filename, int64_t offset, u void FileProcessor::HandleBlockReadError(Error error_code, const char* error_message) { - auto file_entry = active_files_.find(file_stack.top().filename); + auto file_entry = active_files_.find(file_stack_.top().filename); assert(file_entry != active_files_.end()); // Report incomplete block at end of file as a warning, other I/O errors as an error. @@ -1970,7 +1968,7 @@ bool FileProcessor::ProcessMetaData(const format::BlockHeader& block_header, for SetActiveFile(filename, exec_from_file.offset, util::platform::FileSeekSet); // We need to add 1 because it will be decremented right after this function returns - file_stack.top().remaining_commands = exec_from_file.n_blocks + 1; + file_stack_.top().remaining_commands = exec_from_file.n_blocks + 1; } } diff --git a/framework/decode/file_processor.h b/framework/decode/file_processor.h index 8f2bf9b5f0..a33c3fb856 100644 --- a/framework/decode/file_processor.h +++ b/framework/decode/file_processor.h @@ -96,7 +96,7 @@ class FileProcessor const format::FileHeader& GetFileHeader() const { - auto file_entry = active_files_.find(file_stack.top().filename); + auto file_entry = active_files_.find(file_stack_.top().filename); assert(file_entry != active_files_.end()); return file_entry->second.file_header; @@ -104,7 +104,7 @@ class FileProcessor const std::vector& GetFileOptions() const { - auto file_entry = active_files_.find(file_stack.top().filename); + auto file_entry = active_files_.find(file_stack_.top().filename); assert(file_entry != active_files_.end()); return file_entry->second.file_options; @@ -114,7 +114,7 @@ class FileProcessor uint64_t GetNumBytesRead() const { - auto file_entry = active_files_.find(file_stack.top().filename); + auto file_entry = active_files_.find(file_stack_.top().filename); assert(file_entry != active_files_.end()); return file_entry->second.bytes_read; @@ -124,7 +124,7 @@ class FileProcessor bool EntireFileWasProcessed() const { - auto file_entry = active_files_.find(file_stack.top().filename); + auto file_entry = active_files_.find(file_stack_.top().filename); assert(file_entry != active_files_.end()); return (feof(file_entry->second.fd) != 0); @@ -139,10 +139,7 @@ class FileProcessor block_index_to_ = block_index_to; } - void OverrideAssetFilename(const std::string &new_filename) - { - override_asset_filename_ = new_filename; - } + void OverrideAssetFilename(const std::string& new_filename) { override_asset_filename_ = new_filename; } protected: bool ContinueDecoding(); @@ -186,7 +183,7 @@ class FileProcessor protected: FILE* GetFileDescriptor() { - auto file_entry = active_files_.find(file_stack.top().filename); + auto file_entry = active_files_.find(file_stack_.top().filename); assert(file_entry != active_files_.end()); return file_entry->second.fd; @@ -205,7 +202,7 @@ class FileProcessor bool IsFileHeaderValid() const { - auto file_entry = active_files_.find(file_stack.top().filename); + auto file_entry = active_files_.find(file_stack_.top().filename); assert(file_entry != active_files_.end()); return (file_entry->second.file_header.fourcc == GFXRECON_FOURCC); @@ -213,7 +210,7 @@ class FileProcessor bool IsFileValid() const { - auto file_entry = active_files_.find(file_stack.top().filename); + auto file_entry = active_files_.find(file_stack_.top().filename); assert(file_entry != active_files_.end()); return (file_entry->second.fd && !feof(file_entry->second.fd) && !ferror(file_entry->second.fd)); @@ -257,7 +254,6 @@ class FileProcessor }; std::unordered_map active_files_; - std::string main_filename; struct ActiveFileContext { @@ -266,7 +262,7 @@ class FileProcessor std::string filename; uint32_t remaining_commands{ 0 }; }; - std::stack file_stack; + std::stack file_stack_; std::string override_asset_filename_; }; From 69acf807234586cf3c55c84e06bf4c15492e99e9 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Wed, 24 Jul 2024 13:39:14 +0300 Subject: [PATCH 24/99] Guard assets map with a mutex --- framework/encode/vulkan_handle_wrappers.h | 1 + framework/encode/vulkan_state_tracker.cpp | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/framework/encode/vulkan_handle_wrappers.h b/framework/encode/vulkan_handle_wrappers.h index 7397399a74..6dd3571fe4 100644 --- a/framework/encode/vulkan_handle_wrappers.h +++ b/framework/encode/vulkan_handle_wrappers.h @@ -226,6 +226,7 @@ struct DeviceMemoryWrapper : public HandleWrapper VkDeviceAddress address{ 0 }; std::map bound_assets; + std::mutex asset_map_lock; }; struct BufferViewWrapper : public HandleWrapper diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index a0fa45a39a..0ca3b771bf 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -372,7 +372,9 @@ void VulkanStateTracker::TrackBufferMemoryBinding( vulkan_wrappers::DeviceMemoryWrapper* mem_wrapper = vulkan_wrappers::GetWrapper(memory); assert(mem_wrapper != nullptr); + mem_wrapper->asset_map_lock.lock(); mem_wrapper->bound_assets.emplace(memoryOffset, wrapper); + mem_wrapper->asset_map_lock.unlock(); if (bind_info_pnext != nullptr) { @@ -441,7 +443,9 @@ void VulkanStateTracker::TrackImageMemoryBinding( vulkan_wrappers::DeviceMemoryWrapper* mem_wrapper = vulkan_wrappers::GetWrapper(memory); assert(mem_wrapper != nullptr); + mem_wrapper->asset_map_lock.lock(); mem_wrapper->bound_assets.emplace(memoryOffset, wrapper); + mem_wrapper->asset_map_lock.unlock(); if (bind_info_pnext != nullptr) { @@ -1812,11 +1816,13 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::ImageWrapper* wrapper) if (mem_wrapper != nullptr) { + mem_wrapper->asset_map_lock.lock(); auto bind_entry = mem_wrapper->bound_assets.find(wrapper->bind_offset); if (bind_entry != mem_wrapper->bound_assets.end()) { mem_wrapper->bound_assets.erase(bind_entry); } + mem_wrapper->asset_map_lock.unlock(); } } } @@ -1830,11 +1836,13 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::BufferWrapper* wrapper) if (mem_wrapper != nullptr) { + mem_wrapper->asset_map_lock.lock(); auto bind_entry = mem_wrapper->bound_assets.find(wrapper->bind_offset); if (bind_entry != mem_wrapper->bound_assets.end()) { mem_wrapper->bound_assets.erase(bind_entry); } + mem_wrapper->asset_map_lock.unlock(); } } } @@ -2390,6 +2398,7 @@ void VulkanStateTracker::TrackMappedAssetsWrites(VkCommandBuffer commandBuffer) vulkan_wrappers::DeviceMemoryWrapper* dev_mem_wrapper = state_table_.GetDeviceMemoryWrapper(entry.first); assert(dev_mem_wrapper != nullptr); + dev_mem_wrapper->asset_map_lock.lock(); for (auto& asset : dev_mem_wrapper->bound_assets) { if (asset.second->dirty || !asset.second->size) @@ -2412,6 +2421,7 @@ void VulkanStateTracker::TrackMappedAssetsWrites(VkCommandBuffer commandBuffer) } } } + dev_mem_wrapper->asset_map_lock.unlock(); } } From 120321031d5b1ecf2323b2ff0a3577647be4817e Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Wed, 24 Jul 2024 13:57:52 +0300 Subject: [PATCH 25/99] Fix for asset-file-path replay argument --- tools/replay/replay_settings.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/replay/replay_settings.h b/tools/replay/replay_settings.h index 9ee09f2dd5..5073d24a70 100644 --- a/tools/replay/replay_settings.h +++ b/tools/replay/replay_settings.h @@ -81,7 +81,7 @@ static void PrintUsage(const char* exe_name) GFXRECON_WRITE_CONSOLE("\t\t\t[--sgfs | --skip-get-fence-status ]"); GFXRECON_WRITE_CONSOLE("\t\t\t[--sgfr | --skip-get-fence-ranges ]"); GFXRECON_WRITE_CONSOLE("\t\t\t[--pbi-all] [--pbis ]"); - GFXRECON_WRITE_CONSOLE("\t\t\t[--asset-file-path] [--pbis ]"); + GFXRECON_WRITE_CONSOLE("\t\t\t[--asset-file-path]"); #if defined(WIN32) GFXRECON_WRITE_CONSOLE("\t\t\t[--dump-resources ]"); #endif @@ -164,6 +164,7 @@ static void PrintUsage(const char* exe_name) GFXRECON_WRITE_CONSOLE(" \t\tReplay may fail if the specified device is not compatible with the"); GFXRECON_WRITE_CONSOLE(" \t\toriginal capture devices."); GFXRECON_WRITE_CONSOLE(" --pbi-all\t\tPrint all block information."); + GFXRECON_WRITE_CONSOLE(" --asset-file-path\t\tProvide an alternative path for the asset file."); GFXRECON_WRITE_CONSOLE( " --pbis \t\tPrint block information between block index1 and block index2."); #if defined(WIN32) From 064c8739709748cb9a585b805f027ff327a505bf Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 29 Jul 2024 18:12:32 +0300 Subject: [PATCH 26/99] Asset file generation is optional and off by default Asset file generetaion is controlled by an environment variable --- USAGE_android.md | 1 + USAGE_desktop_Vulkan.md | 3 +- framework/encode/api_capture_manager.h | 1 + framework/encode/capture_manager.cpp | 48 +-- framework/encode/capture_manager.h | 1 + framework/encode/capture_settings.cpp | 10 + framework/encode/capture_settings.h | 1 + framework/encode/vulkan_capture_manager.h | 20 + framework/encode/vulkan_state_tracker.h | 6 +- framework/encode/vulkan_state_writer.cpp | 422 ++++++++++++++++++++-- framework/encode/vulkan_state_writer.h | 16 +- 11 files changed, 475 insertions(+), 54 deletions(-) diff --git a/USAGE_android.md b/USAGE_android.md index cbd49cfb72..9d5a20c2fb 100644 --- a/USAGE_android.md +++ b/USAGE_android.md @@ -306,6 +306,7 @@ option values. | Capture Specific Frames | debug.gfxrecon.capture_frames | STRING | Specify one or more comma-separated frame ranges to capture. Each range will be written to its own file. A frame range can be specified as a single value, to specify a single frame to capture, or as two hyphenated values, to specify the first and last frame to capture. Frame ranges should be specified in ascending order and cannot overlap. Note that frame numbering is 1-based (i.e. the first frame is frame 1). Example: `200,301-305` will create two capture files, one containing a single frame and one containing five frames. Default is: Empty string (all frames are captured). | | Quit after capturing frame ranges | debug.gfxrecon.quit_after_capture_frames | BOOL | Setting it to `true` will force the application to terminate once all frame ranges specified by `debug.gfxrecon.capture_frames` have been captured. Default is: `false` | | Capture trigger for Android | debug.gfxrecon.capture_android_trigger | BOOL | Set during runtime to `true` to start capturing and to `false` to stop. If not set at all then it is disabled (non-trimmed capture). Default is not set. | +| Use asset file | debug.gfxrecon.capture_use_asset_file | BOOL | When set to `true` assets (images, buffers and descriptors) will be stored separately into an asset file instead of the capture file. | | Capture File Compression Type | debug.gfxrecon.capture_compression_type | STRING | Compression format to use with the capture file. Valid values are: `LZ4`, `ZLIB`, `ZSTD`, and `NONE`. Default is: `LZ4` | | Capture File Timestamp | debug.gfxrecon.capture_file_timestamp | BOOL | Add a timestamp to the capture file as described by [Timestamps](#timestamps). Default is: `true` | | Capture File Flush After Write | debug.gfxrecon.capture_file_flush | BOOL | Flush output stream after each packet is written to the capture file. Default is: `false` | diff --git a/USAGE_desktop_Vulkan.md b/USAGE_desktop_Vulkan.md index 5dc86208c9..62a5d54441 100644 --- a/USAGE_desktop_Vulkan.md +++ b/USAGE_desktop_Vulkan.md @@ -261,7 +261,8 @@ option values. | Capture Specific Frames | GFXRECON_CAPTURE_FRAMES | STRING | Specify one or more comma-separated frame ranges to capture. Each range will be written to its own file. A frame range can be specified as a single value, to specify a single frame to capture, or as two hyphenated values, to specify the first and last frame to capture. Frame ranges should be specified in ascending order and cannot overlap. Note that frame numbering is 1-based (i.e. the first frame is frame 1). Example: `200,301-305` will create two capture files, one containing a single frame and one containing five frames. Default is: Empty string (all frames are captured). | | Quit after capturing frame ranges | GFXRECON_QUIT_AFTER_CAPTURE_FRAMES | BOOL | Setting it to `true` will force the application to terminate once all frame ranges specified by `GFXRECON_CAPTURE_FRAMES` have been captured. Default is: `false` | | Hotkey Capture Trigger | GFXRECON_CAPTURE_TRIGGER | STRING | Specify a hotkey (any one of F1-F12, TAB, CONTROL) that will be used to start/stop capture. Example: `F3` will set the capture trigger to F3 hotkey. One capture file will be generated for each pair of start/stop hotkey presses. Default is: Empty string (hotkey capture trigger is disabled). | -| Hotkey Capture Trigger Frames | GFXRECON_CAPTURE_TRIGGER_FRAMES | STRING | Specify a limit on the number of frames to be captured via hotkey. Example: `1` will capture exactly one frame when the trigger key is pressed. Default is: Empty string (no limit) | +| Hotkey Capture Trigger Frames | GFXRECON_CAPTURE_TRIGGER_FRAMES | STRING | Specify a limit on the number of frames to be captured via hotkey. Example: `1` will capture exactly one frame when the trigger key is pressed. Default is: Empty string (no limit) | +| Use asset file | debug.gfxrecon.capture_use_asset_file | BOOL | When set to `true` assets (images, buffers and descriptors) will be stored separately into an asset file instead of the capture file. | | Capture Specific GPU Queue Submits | GFXRECON_CAPTURE_QUEUE_SUBMITS | STRING | Specify one or more comma-separated GPU queue submit call ranges to capture. Queue submit calls are `vkQueueSubmit` for Vulkan and `ID3D12CommandQueue::ExecuteCommandLists` for DX12. Queue submit ranges work as described above in `GFXRECON_CAPTURE_FRAMES` but on GPU queue submit calls instead of frames. Default is: Empty string (all queue submits are captured). | | Capture File Compression Type | GFXRECON_CAPTURE_COMPRESSION_TYPE | STRING | Compression format to use with the capture file. Valid values are: `LZ4`, `ZLIB`, `ZSTD`, and `NONE`. Default is: `LZ4` | | Capture File Timestamp | GFXRECON_CAPTURE_FILE_TIMESTAMP | BOOL | Add a timestamp to the capture file as described by [Timestamps](#timestamps). Default is: `true` | diff --git a/framework/encode/api_capture_manager.h b/framework/encode/api_capture_manager.h index 09551bcf67..2ed8903995 100644 --- a/framework/encode/api_capture_manager.h +++ b/framework/encode/api_capture_manager.h @@ -48,6 +48,7 @@ class ApiCaptureManager virtual void WriteTrackedState(util::FileOutputStream* file_stream, format::ThreadId thread_id, util::FileOutputStream* asseet_file_stream = nullptr) = 0; + virtual CaptureSettings::TraceSettings GetDefaultTraceSettings(); format::ApiFamilyId GetApiFamily() const { return api_family_; } diff --git a/framework/encode/capture_manager.cpp b/framework/encode/capture_manager.cpp index e6f7d93fcc..dc83a4d402 100644 --- a/framework/encode/capture_manager.cpp +++ b/framework/encode/capture_manager.cpp @@ -104,7 +104,7 @@ CommonCaptureManager::CommonCaptureManager() : previous_runtime_trigger_state_(CaptureSettings::RuntimeTriggerState::kNotUsed), debug_layer_(false), debug_device_lost_(false), screenshot_prefix_(""), screenshots_enabled_(false), disable_dxr_(false), accel_struct_padding_(0), iunknown_wrapping_(false), force_command_serialization_(false), queue_zero_only_(false), - allow_pipeline_compile_required_(false), quit_after_frame_ranges_(false), block_index_(0) + allow_pipeline_compile_required_(false), quit_after_frame_ranges_(false), use_asset_file_(false), block_index_(0) {} CommonCaptureManager::~CommonCaptureManager() @@ -386,6 +386,7 @@ bool CommonCaptureManager::Initialize(format::ApiFamilyId api_ trim_enabled_ = true; trim_boundary_ = trace_settings.trim_boundary; quit_after_frame_ranges_ = trace_settings.quit_after_frame_ranges; + use_asset_file_ = trace_settings.use_asset_file; // Check if trim ranges were specified. if (!trace_settings.trim_ranges.empty()) @@ -703,7 +704,7 @@ void CommonCaptureManager::CheckContinueCaptureForWriteMode(format::ApiFamilyId trim_boundary_ = CaptureSettings::TrimBoundary::kUnknown; capture_mode_ = kModeDisabled; - if (asset_file_stream_) + if (use_asset_file_ && asset_file_stream_) { asset_file_stream_->Flush(); asset_file_stream_ = nullptr; @@ -954,25 +955,6 @@ bool CommonCaptureManager::CreateCaptureFile(format::ApiFamilyId api_family, con bool success = true; std::string capture_filename = base_filename; - if (trim_enabled_ && asset_file_stream_.get() == nullptr) - { - std::string asset_file_name = CreateAssetFilename(base_filename_); - if (timestamp_filename_) - { - asset_file_name = util::filepath::GenerateTimestampedFilename(asset_file_name); - } - - asset_file_stream_ = std::make_unique(asset_file_name, kFileStreamBufferSize); - if (asset_file_stream_->IsValid()) - { - WriteAssetFileHeader(); - } - else - { - asset_file_stream_ = nullptr; - } - } - if (timestamp_filename_) { capture_filename = util::filepath::GenerateTimestampedFilename(capture_filename); @@ -1096,6 +1078,27 @@ bool CommonCaptureManager::CreateCaptureFile(format::ApiFamilyId api_family, con success = false; } + // Create asset file + if (trim_enabled_ && use_asset_file_ && asset_file_stream_.get() == nullptr) + { + std::string asset_file_name = CreateAssetFilename(base_filename_); + + if (timestamp_filename_) + { + asset_file_name = util::filepath::GenerateTimestampedFilename(asset_file_name); + } + + asset_file_stream_ = std::make_unique(asset_file_name, kFileStreamBufferSize); + if (asset_file_stream_->IsValid()) + { + WriteAssetFileHeader(); + } + else + { + asset_file_stream_ = nullptr; + } + } + return success; } @@ -1108,7 +1111,8 @@ void CommonCaptureManager::ActivateTrimming() for (auto& manager : api_capture_managers_) { - manager.first->WriteTrackedState(file_stream_.get(), thread_data->thread_id_, asset_file_stream_.get()); + manager.first->WriteTrackedState( + file_stream_.get(), thread_data->thread_id_, use_asset_file_ ? asset_file_stream_.get() : nullptr); } } diff --git a/framework/encode/capture_manager.h b/framework/encode/capture_manager.h index 6801ab23c2..dc4a76577f 100644 --- a/framework/encode/capture_manager.h +++ b/framework/encode/capture_manager.h @@ -383,6 +383,7 @@ class CommonCaptureManager bool queue_zero_only_; bool allow_pipeline_compile_required_; bool quit_after_frame_ranges_; + bool use_asset_file_; struct { diff --git a/framework/encode/capture_settings.cpp b/framework/encode/capture_settings.cpp index 90f18e13d2..af6c95da11 100644 --- a/framework/encode/capture_settings.cpp +++ b/framework/encode/capture_settings.cpp @@ -36,6 +36,7 @@ #include #include #include +#include GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(encode) @@ -94,6 +95,8 @@ GFXRECON_BEGIN_NAMESPACE(encode) #define CAPTURE_IUNKNOWN_WRAPPING_UPPER "CAPTURE_IUNKNOWN_WRAPPING" #define CAPTURE_QUEUE_SUBMITS_LOWER "capture_queue_submits" #define CAPTURE_QUEUE_SUBMITS_UPPER "CAPTURE_QUEUE_SUBMITS" +#define CAPTURE_USE_ASSET_FILE_LOWER "capture_use_asset_file" +#define CAPTURE_USE_ASSET_FILE_UPPER "CAPTURE_USE_ASSET_FILE" #define PAGE_GUARD_COPY_ON_MAP_LOWER "page_guard_copy_on_map" #define PAGE_GUARD_COPY_ON_MAP_UPPER "PAGE_GUARD_COPY_ON_MAP" #define PAGE_GUARD_SEPARATE_READ_LOWER "page_guard_separate_read" @@ -166,6 +169,7 @@ const char kCaptureTriggerEnvVar[] = GFXRECON_ENV_VAR_ const char kCaptureTriggerFramesEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_TRIGGER_FRAMES_LOWER; const char kCaptureIUnknownWrappingEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_IUNKNOWN_WRAPPING_LOWER; const char kCaptureQueueSubmitsEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_QUEUE_SUBMITS_LOWER; +const char kCaptureUseAssetFileEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_USE_ASSET_FILE_LOWER; const char kPageGuardCopyOnMapEnvVar[] = GFXRECON_ENV_VAR_PREFIX PAGE_GUARD_COPY_ON_MAP_LOWER; const char kPageGuardSeparateReadEnvVar[] = GFXRECON_ENV_VAR_PREFIX PAGE_GUARD_SEPARATE_READ_LOWER; const char kPageGuardPersistentMemoryEnvVar[] = GFXRECON_ENV_VAR_PREFIX PAGE_GUARD_PERSISTENT_MEMORY_LOWER; @@ -198,6 +202,7 @@ const char kCaptureCompressionTypeEnvVar[] = GFXRECON_ENV_VAR_ const char kCaptureFileFlushEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_FILE_FLUSH_UPPER; const char kCaptureFileNameEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_FILE_NAME_UPPER; const char kCaptureFileUseTimestampEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_FILE_USE_TIMESTAMP_UPPER; +const char kCaptureUseAssetFileEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_USE_ASSET_FILE_UPPER; const char kLogAllowIndentsEnvVar[] = GFXRECON_ENV_VAR_PREFIX LOG_ALLOW_INDENTS_UPPER; const char kLogBreakOnErrorEnvVar[] = GFXRECON_ENV_VAR_PREFIX LOG_BREAK_ON_ERROR_UPPER; const char kLogDetailedEnvVar[] = GFXRECON_ENV_VAR_PREFIX LOG_DETAILED_UPPER; @@ -270,6 +275,7 @@ const std::string kOptionKeyCaptureTrigger = std::stri const std::string kOptionKeyCaptureTriggerFrames = std::string(kSettingsFilter) + std::string(CAPTURE_TRIGGER_FRAMES_LOWER); const std::string kOptionKeyCaptureIUnknownWrapping = std::string(kSettingsFilter) + std::string(CAPTURE_IUNKNOWN_WRAPPING_LOWER); const std::string kOptionKeyCaptureQueueSubmits = std::string(kSettingsFilter) + std::string(CAPTURE_QUEUE_SUBMITS_LOWER); +const std::string kOptionKeyCaptureUseAssetFile = std::string(kSettingsFilter) + std::string(CAPTURE_USE_ASSET_FILE_LOWER); const std::string kOptionKeyPageGuardCopyOnMap = std::string(kSettingsFilter) + std::string(PAGE_GUARD_COPY_ON_MAP_LOWER); const std::string kOptionKeyPageGuardSeparateRead = std::string(kSettingsFilter) + std::string(PAGE_GUARD_SEPARATE_READ_LOWER); const std::string kOptionKeyPageGuardPersistentMemory = std::string(kSettingsFilter) + std::string(PAGE_GUARD_PERSISTENT_MEMORY_LOWER); @@ -407,6 +413,7 @@ void CaptureSettings::LoadOptionsEnvVar(OptionsMap* options) LoadSingleOptionEnvVar(options, kCaptureTriggerEnvVar, kOptionKeyCaptureTrigger); LoadSingleOptionEnvVar(options, kCaptureTriggerFramesEnvVar, kOptionKeyCaptureTriggerFrames); LoadSingleOptionEnvVar(options, kCaptureQueueSubmitsEnvVar, kOptionKeyCaptureQueueSubmits); + LoadSingleOptionEnvVar(options, kCaptureUseAssetFileEnvVar, kOptionKeyCaptureUseAssetFile); // Page guard environment variables LoadSingleOptionEnvVar(options, kPageGuardCopyOnMapEnvVar, kOptionKeyPageGuardCopyOnMap); @@ -544,6 +551,9 @@ void CaptureSettings::ProcessOptions(OptionsMap* options, CaptureSettings* setti settings->trace_settings_.quit_after_frame_ranges = ParseBoolString( FindOption(options, kOptionKeyQuitAfterCaptureFrames), settings->trace_settings_.quit_after_frame_ranges); + settings->trace_settings_.use_asset_file = + ParseBoolString(FindOption(options, kOptionKeyCaptureUseAssetFile), settings->trace_settings_.use_asset_file); + // Page guard environment variables settings->trace_settings_.page_guard_copy_on_map = ParseBoolString( FindOption(options, kOptionKeyPageGuardCopyOnMap), settings->trace_settings_.page_guard_copy_on_map); diff --git a/framework/encode/capture_settings.h b/framework/encode/capture_settings.h index 28dc72e02b..0adf54aa90 100644 --- a/framework/encode/capture_settings.h +++ b/framework/encode/capture_settings.h @@ -118,6 +118,7 @@ class CaptureSettings bool queue_zero_only{ false }; bool allow_pipeline_compile_required{ false }; bool quit_after_frame_ranges{ false }; + bool use_asset_file{ false }; // An optimization for the page_guard memory tracking mode that eliminates the need for shadow memory by // overriding vkAllocateMemory so that all host visible allocations use the external memory extension with a diff --git a/framework/encode/vulkan_capture_manager.h b/framework/encode/vulkan_capture_manager.h index d8628ad71c..53dc4d949a 100644 --- a/framework/encode/vulkan_capture_manager.h +++ b/framework/encode/vulkan_capture_manager.h @@ -1276,13 +1276,16 @@ class VulkanCaptureManager : public ApiCaptureManager const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets); + void PostProcess_vkCmdBindDescriptorSets2KHR(VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo); + void PostProcess_vkCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions); + void PostProcess_vkCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, @@ -1290,30 +1293,41 @@ class VulkanCaptureManager : public ApiCaptureManager VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions); + void PostProcess_vkCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions); + void PostProcess_vkCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions); + void PostProcess_vkCmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo); + void PostProcess_vkCmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo); + void PostProcess_vkCmdCopyBufferToImage2(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo); + void PostProcess_vkCmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo); + void PostProcess_vkCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo); + void PostProcess_vkCmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo); + void PostProcess_vkCmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo); + void PostProcess_vkCmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo); + void PostProcess_vkCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, @@ -1322,21 +1336,27 @@ class VulkanCaptureManager : public ApiCaptureManager uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter); + void PostProcess_vkCmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo); + void PostProcess_vkCmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo); + void PostProcess_vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData); + void PostProcess_vkCmdFillBuffer( VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data); + void PostProcess_vkCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges); + void PostProcess_vkCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, diff --git a/framework/encode/vulkan_state_tracker.h b/framework/encode/vulkan_state_tracker.h index d177685b84..5db692e170 100644 --- a/framework/encode/vulkan_state_tracker.h +++ b/framework/encode/vulkan_state_tracker.h @@ -59,7 +59,11 @@ class VulkanStateTracker util::Compressor* compressor, uint64_t frame_number) { - VulkanStateWriter state_writer(file_stream, compressor, thread_id, asset_file_offsets_, asset_file_stream); + VulkanStateWriter state_writer(file_stream, + compressor, + thread_id, + asset_file_stream, + asset_file_stream != nullptr ? &asset_file_offsets_ : nullptr); std::unique_lock lock(state_table_mutex_); return state_writer.WriteState(state_table_, frame_number); diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index c712c23c1b..c12e5fe03f 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -84,8 +84,8 @@ static bool IsImageReadable(VkMemoryPropertyFlags property VulkanStateWriter::VulkanStateWriter(util::FileOutputStream* output_stream, util::Compressor* compressor, format::ThreadId thread_id, - std::unordered_map& asset_file_offsets, - util::FileOutputStream* asset_file_stream) : + util::FileOutputStream* asset_file_stream, + std::unordered_map* asset_file_offsets) : output_stream_(output_stream), compressor_(compressor), thread_id_(thread_id), encoder_(¶meter_stream_), asset_file_stream_(asset_file_stream), asset_file_offsets_(asset_file_offsets) @@ -169,7 +169,14 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint // Descriptor creation. StandardCreateWrite(state_table); StandardCreateWrite(state_table); - WriteDescriptorSetState(state_table); + if (asset_file_stream_ != nullptr) + { + WriteDescriptorSetStateWithAssetFile(state_table); + } + else + { + WriteDescriptorSetState(state_table); + } // Query object creation. WriteQueryPoolState(state_table); @@ -842,6 +849,104 @@ void VulkanStateWriter::WriteDescriptorSetState(const VulkanStateTable& state_ta std::unordered_map temp_ds_layouts; + // First pass over descriptor set table to determine which dependencies need to be created temporarily. + state_table.VisitWrappers([&](const vulkan_wrappers::DescriptorSetWrapper* wrapper) { + assert(wrapper != nullptr); + + auto ds_layout_wrapper = state_table.GetDescriptorSetLayoutWrapper(wrapper->set_layout_dependency.handle_id); + if (ds_layout_wrapper == nullptr) + { + // The object no longer exists, so a temporary object must be created. + auto dep_create_parameters = wrapper->set_layout_dependency.create_parameters.get(); + const auto& dep_inserted = + temp_ds_layouts.insert(std::make_pair(wrapper->set_layout_dependency.handle_id, dep_create_parameters)); + + // Create a temporary object on first encounter. + if (dep_inserted.second) + { + WriteFunctionCall(wrapper->set_layout_dependency.create_call_id, dep_create_parameters); + } + } + }); + + state_table.VisitWrappers([&](const vulkan_wrappers::DescriptorSetWrapper* wrapper) { + assert(wrapper != nullptr); + + // Filter duplicate calls to vkAllocateDescriptorSets for descriptor sets that were allocated by the same API + // call and reference the same parameter buffer. + if (processed.find(wrapper->create_parameters.get()) == processed.end()) + { + // Write descriptor set creation call and add the parameter buffer to the processed set. + WriteFunctionCall(wrapper->create_call_id, wrapper->create_parameters.get()); + processed.insert(wrapper->create_parameters.get()); + } + + VkWriteDescriptorSet write = { VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET }; + write.dstSet = wrapper->handle; + + for (const auto& binding_entry : wrapper->bindings) + { + const vulkan_state_info::DescriptorInfo* binding = &binding_entry.second; + bool active = false; + + write.dstBinding = binding_entry.first; + + for (uint32_t i = 0; i < binding->count; ++i) + { + VkDescriptorType descriptor_type; + bool write_descriptor = CheckDescriptorStatus(binding, i, state_table, &descriptor_type); + + if (active != write_descriptor) + { + if (!active) + { + // Start of an active descriptor write range. + active = true; + write.dstArrayElement = i; + write.descriptorType = descriptor_type; + } + else + { + // End of an active descriptor write range. + active = false; + write.descriptorCount = i - write.dstArrayElement; + WriteDescriptorUpdateCommand(wrapper->device->handle_id, binding, &write); + } + } + else if (active && (descriptor_type != write.descriptorType)) + { + // Mutable descriptor type change within an active write range + // End current range + write.descriptorCount = i - write.dstArrayElement; + WriteDescriptorUpdateCommand(wrapper->device->handle_id, binding, &write); + // Start new range + write.descriptorType = descriptor_type; + write.dstArrayElement = i; + } + } + + // Process final range, when last item in array contained an active write. + if (active) + { + write.descriptorCount = binding->count - write.dstArrayElement; + WriteDescriptorUpdateCommand(wrapper->device->handle_id, binding, &write); + } + } + }); + + // Temporary object destruction. + for (const auto& entry : temp_ds_layouts) + { + DestroyTemporaryDeviceObject(format::ApiCall_vkDestroyDescriptorSetLayout, entry.first, entry.second); + } +} + +void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTable& state_table) +{ + std::set processed; + + std::unordered_map temp_ds_layouts; + // First pass over descriptor set table to determine which dependencies need to be created temporarily. state_table.VisitWrappers([&](const vulkan_wrappers::DescriptorSetWrapper* wrapper) { assert(wrapper != nullptr); @@ -859,17 +964,17 @@ void VulkanStateWriter::WriteDescriptorSetState(const VulkanStateTable& state_ta { if (wrapper->dirty) { - const int64_t offset = asset_file_stream_->GetOffset(); - asset_file_offsets_[wrapper->handle_id] = offset; + const int64_t offset = asset_file_stream_->GetOffset(); + (*asset_file_offsets_)[wrapper->handle_id] = offset; WriteFunctionCall( wrapper->set_layout_dependency.create_call_id, dep_create_parameters, asset_file_stream_); WriteExecuteFromFile(1, offset); } else { - assert(asset_file_offsets_.find(wrapper->handle_id) != asset_file_offsets_.end()); + assert((*asset_file_offsets_).find(wrapper->handle_id) != (*asset_file_offsets_).end()); - const int64_t offset = asset_file_offsets_[wrapper->handle_id]; + const int64_t offset = (*asset_file_offsets_)[wrapper->handle_id]; WriteExecuteFromFile(1, offset); } } @@ -887,8 +992,8 @@ void VulkanStateWriter::WriteDescriptorSetState(const VulkanStateTable& state_ta } else { - assert(asset_file_offsets_.find(wrapper->handle_id) != asset_file_offsets_.end()); - offset = asset_file_offsets_[wrapper->handle_id]; + assert((*asset_file_offsets_).find(wrapper->handle_id) != (*asset_file_offsets_).end()); + offset = (*asset_file_offsets_)[wrapper->handle_id]; } // Filter duplicate calls to vkAllocateDescriptorSets for descriptor sets that were allocated by the same @@ -976,8 +1081,8 @@ void VulkanStateWriter::WriteDescriptorSetState(const VulkanStateTable& state_ta if (wrapper->dirty) { - wrapper->dirty = false; - asset_file_offsets_[wrapper->handle_id] = offset; + wrapper->dirty = false; + (*asset_file_offsets_)[wrapper->handle_id] = offset; } }); @@ -1380,6 +1485,114 @@ void VulkanStateWriter::ProcessBufferMemory(const vulkan_wrappers::DeviceWrapper const VulkanDeviceTable* device_table = &device_wrapper->layer_table; + for (const auto& snapshot_entry : buffer_snapshot_info) + { + const vulkan_wrappers::BufferWrapper* buffer_wrapper = snapshot_entry.buffer_wrapper; + const vulkan_wrappers::DeviceMemoryWrapper* memory_wrapper = snapshot_entry.memory_wrapper; + const uint8_t* bytes = nullptr; + std::vector data; + + assert((buffer_wrapper != nullptr) && (memory_wrapper != nullptr)); + + if (snapshot_entry.need_staging_copy) + { + VkResult result = resource_util.ReadFromBufferResource( + buffer_wrapper->handle, buffer_wrapper->size, 0, buffer_wrapper->queue_family_index, data); + + if (result == VK_SUCCESS) + { + bytes = data.data(); + } + } + else + { + assert((memory_wrapper->mapped_data == nullptr) || (memory_wrapper->mapped_offset == 0)); + + VkResult result = VK_SUCCESS; + + if (memory_wrapper->mapped_data == nullptr) + { + void* map_ptr = nullptr; + result = device_table->MapMemory(device_wrapper->handle, + memory_wrapper->handle, + buffer_wrapper->bind_offset, + buffer_wrapper->size, + 0, + &map_ptr); + + if (result == VK_SUCCESS) + { + bytes = reinterpret_cast(map_ptr); + } + } + else + { + bytes = reinterpret_cast(memory_wrapper->mapped_data) + buffer_wrapper->bind_offset; + } + + if ((result == VK_SUCCESS) && !IsMemoryCoherent(snapshot_entry.memory_properties)) + { + InvalidateMappedMemoryRange( + device_wrapper, memory_wrapper->handle, buffer_wrapper->bind_offset, buffer_wrapper->size); + } + } + + if (bytes != nullptr) + { + GFXRECON_CHECK_CONVERSION_DATA_LOSS(size_t, buffer_wrapper->size); + + size_t data_size = static_cast(buffer_wrapper->size); + format::InitBufferCommandHeader upload_cmd; + + upload_cmd.meta_header.block_header.type = format::kMetaDataBlock; + upload_cmd.meta_header.meta_data_id = + format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kInitBufferCommand); + upload_cmd.thread_id = thread_id_; + upload_cmd.device_id = device_wrapper->handle_id; + upload_cmd.buffer_id = buffer_wrapper->handle_id; + upload_cmd.data_size = data_size; + + if (compressor_ != nullptr) + { + size_t compressed_size = compressor_->Compress(data_size, bytes, &compressed_parameter_buffer_, 0); + + if ((compressed_size > 0) && (compressed_size < data_size)) + { + upload_cmd.meta_header.block_header.type = format::BlockType::kCompressedMetaDataBlock; + + bytes = compressed_parameter_buffer_.data(); + data_size = compressed_size; + } + } + + // Calculate size of packet with compressed or uncompressed data size. + upload_cmd.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(upload_cmd) + data_size; + + output_stream_->Write(&upload_cmd, sizeof(upload_cmd)); + output_stream_->Write(bytes, data_size); + ++blocks_written_; + + if (!snapshot_entry.need_staging_copy && memory_wrapper->mapped_data == nullptr) + { + device_table->UnmapMemory(device_wrapper->handle, memory_wrapper->handle); + } + } + else + { + GFXRECON_LOG_ERROR("Trimming state snapshot failed to retrieve memory content for buffer %" PRIu64, + buffer_wrapper->handle_id); + } + } +} + +void VulkanStateWriter::ProcessBufferMemoryWithAssetFile(const vulkan_wrappers::DeviceWrapper* device_wrapper, + const std::vector& buffer_snapshot_info, + graphics::VulkanResourcesUtil& resource_util) +{ + assert(device_wrapper != nullptr); + + const VulkanDeviceTable* device_table = &device_wrapper->layer_table; + for (const auto& snapshot_entry : buffer_snapshot_info) { vulkan_wrappers::BufferWrapper* buffer_wrapper = snapshot_entry.buffer_wrapper; @@ -1432,10 +1645,8 @@ void VulkanStateWriter::ProcessBufferMemory(const vulkan_wrappers::DeviceWrapper if ((result == VK_SUCCESS) && !IsMemoryCoherent(snapshot_entry.memory_properties)) { - InvalidateMappedMemoryRange(device_wrapper, - memory_wrapper->handle, - buffer_wrapper->bind_offset, - buffer_wrapper->size); + InvalidateMappedMemoryRange( + device_wrapper, memory_wrapper->handle, buffer_wrapper->bind_offset, buffer_wrapper->size); } } @@ -1479,7 +1690,7 @@ void VulkanStateWriter::ProcessBufferMemory(const vulkan_wrappers::DeviceWrapper asset_file_stream_->Write(&upload_cmd, sizeof(upload_cmd)); asset_file_stream_->Write(bytes, data_size); - asset_file_offsets_[buffer_wrapper->handle_id] = offset; + (*asset_file_offsets_)[buffer_wrapper->handle_id] = offset; WriteExecuteFromFile(1, offset); } @@ -1503,9 +1714,9 @@ void VulkanStateWriter::ProcessBufferMemory(const vulkan_wrappers::DeviceWrapper } else { - assert(asset_file_offsets_.find(buffer_wrapper->handle_id) != asset_file_offsets_.end()); + assert((*asset_file_offsets_).find(buffer_wrapper->handle_id) != (*asset_file_offsets_).end()); - const int64_t offset = asset_file_offsets_[buffer_wrapper->handle_id]; + const int64_t offset = (*asset_file_offsets_)[buffer_wrapper->handle_id]; WriteExecuteFromFile(1, offset); } @@ -1520,6 +1731,155 @@ void VulkanStateWriter::ProcessImageMemory(const vulkan_wrappers::DeviceWrapper* const VulkanDeviceTable* device_table = &device_wrapper->layer_table; + for (const auto& snapshot_entry : image_snapshot_info) + { + const vulkan_wrappers::ImageWrapper* image_wrapper = snapshot_entry.image_wrapper; + const vulkan_wrappers::DeviceMemoryWrapper* memory_wrapper = snapshot_entry.memory_wrapper; + const uint8_t* bytes = nullptr; + std::vector data; + + assert((image_wrapper != nullptr) && ((image_wrapper->is_swapchain_image && memory_wrapper == nullptr) || + (!image_wrapper->is_swapchain_image && memory_wrapper != nullptr))); + + if (snapshot_entry.need_staging_copy) + { + std::vector subresource_offsets; + std::vector subresource_sizes; + bool scaling_supported; + + VkResult result = resource_util.ReadFromImageResourceStaging(image_wrapper->handle, + image_wrapper->format, + image_wrapper->image_type, + image_wrapper->extent, + image_wrapper->mip_levels, + image_wrapper->array_layers, + image_wrapper->tiling, + image_wrapper->samples, + image_wrapper->current_layout, + image_wrapper->queue_family_index, + snapshot_entry.aspect, + data, + subresource_offsets, + subresource_sizes, + scaling_supported, + true); + + if (result == VK_SUCCESS) + { + bytes = data.data(); + } + } + else if (!image_wrapper->is_swapchain_image) + { + assert((memory_wrapper != nullptr) && + ((memory_wrapper->mapped_data == nullptr) || (memory_wrapper->mapped_offset == 0))); + + VkResult result = VK_SUCCESS; + + if (memory_wrapper->mapped_data == nullptr) + { + void* map_ptr = nullptr; + result = device_table->MapMemory(device_wrapper->handle, + memory_wrapper->handle, + image_wrapper->bind_offset, + snapshot_entry.resource_size, + 0, + &map_ptr); + + if (result == VK_SUCCESS) + { + bytes = reinterpret_cast(map_ptr); + } + } + else + { + bytes = reinterpret_cast(memory_wrapper->mapped_data) + image_wrapper->bind_offset; + } + + if ((result == VK_SUCCESS) && !IsMemoryCoherent(snapshot_entry.memory_properties)) + { + InvalidateMappedMemoryRange( + device_wrapper, memory_wrapper->handle, image_wrapper->bind_offset, snapshot_entry.resource_size); + } + } + + if (!image_wrapper->is_swapchain_image) + { + format::InitImageCommandHeader upload_cmd; + + // Packet size without the resource data. + upload_cmd.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(upload_cmd); + upload_cmd.meta_header.block_header.type = format::kMetaDataBlock; + upload_cmd.meta_header.meta_data_id = + format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kInitImageCommand); + upload_cmd.thread_id = thread_id_; + upload_cmd.device_id = device_wrapper->handle_id; + upload_cmd.image_id = image_wrapper->handle_id; + upload_cmd.aspect = snapshot_entry.aspect; + upload_cmd.layout = image_wrapper->current_layout; + + if (bytes != nullptr) + { + GFXRECON_CHECK_CONVERSION_DATA_LOSS(size_t, snapshot_entry.resource_size); + + size_t data_size = static_cast(snapshot_entry.resource_size); + + // Store uncompressed data size in packet. + upload_cmd.data_size = data_size; + upload_cmd.level_count = image_wrapper->mip_levels; + + if (compressor_ != nullptr) + { + size_t compressed_size = compressor_->Compress(data_size, bytes, &compressed_parameter_buffer_, 0); + + if ((compressed_size > 0) && (compressed_size < data_size)) + { + upload_cmd.meta_header.block_header.type = format::BlockType::kCompressedMetaDataBlock; + + bytes = compressed_parameter_buffer_.data(); + data_size = compressed_size; + } + } + + // Calculate size of packet with compressed or uncompressed data size. + assert(!snapshot_entry.level_sizes.empty() && + (snapshot_entry.level_sizes.size() == upload_cmd.level_count)); + size_t levels_size = snapshot_entry.level_sizes.size() * sizeof(snapshot_entry.level_sizes[0]); + + upload_cmd.meta_header.block_header.size += levels_size + data_size; + + output_stream_->Write(&upload_cmd, sizeof(upload_cmd)); + output_stream_->Write(snapshot_entry.level_sizes.data(), levels_size); + output_stream_->Write(bytes, data_size); + + if (!snapshot_entry.need_staging_copy && memory_wrapper->mapped_data == nullptr) + { + device_table->UnmapMemory(device_wrapper->handle, memory_wrapper->handle); + } + } + else + { + // Write a packet without resource data; replay must still perform a layout transition at image + // initialization. + upload_cmd.data_size = 0; + upload_cmd.level_count = 0; + + output_stream_->Write(&upload_cmd, sizeof(upload_cmd)); + } + + ++blocks_written_; + } + } +} + +void VulkanStateWriter::ProcessImageMemoryWithAssetFile(const vulkan_wrappers::DeviceWrapper* device_wrapper, + const std::vector& image_snapshot_info, + graphics::VulkanResourcesUtil& resource_util) +{ + assert(device_wrapper != nullptr); + + const VulkanDeviceTable* device_table = &device_wrapper->layer_table; + for (const auto& snapshot_entry : image_snapshot_info) { vulkan_wrappers::ImageWrapper* image_wrapper = snapshot_entry.image_wrapper; @@ -1650,7 +2010,7 @@ void VulkanStateWriter::ProcessImageMemory(const vulkan_wrappers::DeviceWrapper* { const int64_t offset = asset_file_stream_->GetOffset(); - asset_file_offsets_[image_wrapper->handle_id] = offset; + (*asset_file_offsets_)[image_wrapper->handle_id] = offset; asset_file_stream_->Write(&upload_cmd, sizeof(upload_cmd)); asset_file_stream_->Write(snapshot_entry.level_sizes.data(), levels_size); @@ -1685,9 +2045,9 @@ void VulkanStateWriter::ProcessImageMemory(const vulkan_wrappers::DeviceWrapper* } else { - assert(asset_file_offsets_.find(image_wrapper->handle_id) != asset_file_offsets_.end()); + assert((*asset_file_offsets_).find(image_wrapper->handle_id) != (*asset_file_offsets_).end()); - const int64_t offset = asset_file_offsets_[image_wrapper->handle_id]; + const int64_t offset = (*asset_file_offsets_)[image_wrapper->handle_id]; WriteExecuteFromFile(1, offset); } @@ -1715,10 +2075,6 @@ void VulkanStateWriter::WriteBufferMemoryState(const VulkanStateTable& state_tab assert((device_wrapper != nullptr) && (device_table != nullptr)); - // Group buffers with memory bindings by device for memory snapshot. - ResourceSnapshotQueueFamilyTable& snapshot_table = (*resources)[device_wrapper]; - ResourceSnapshotInfo& snapshot_entry = snapshot_table[wrapper->queue_family_index]; - // Write memory requirements query before bind command. VkMemoryRequirements memory_requirements; @@ -1760,6 +2116,10 @@ void VulkanStateWriter::WriteBufferMemoryState(const VulkanStateTable& state_tab } parameter_stream_.Clear(); + // Group buffers with memory bindings by device for memory snapshot. + ResourceSnapshotQueueFamilyTable& snapshot_table = (*resources)[device_wrapper]; + ResourceSnapshotInfo& snapshot_entry = snapshot_table[wrapper->queue_family_index]; + BufferSnapshotInfo snapshot_info; snapshot_info.buffer_wrapper = wrapper; snapshot_info.memory_wrapper = memory_wrapper; @@ -2017,8 +2377,16 @@ void VulkanStateWriter::WriteResourceMemoryState(const VulkanStateTable& state_t for (const auto& queue_family_entry : resource_entry.second) { - ProcessBufferMemory(device_wrapper, queue_family_entry.second.buffers, resource_util); - ProcessImageMemory(device_wrapper, queue_family_entry.second.images, resource_util); + if (asset_file_stream_ != nullptr) + { + ProcessBufferMemoryWithAssetFile(device_wrapper, queue_family_entry.second.buffers, resource_util); + ProcessImageMemoryWithAssetFile(device_wrapper, queue_family_entry.second.images, resource_util); + } + else + { + ProcessBufferMemory(device_wrapper, queue_family_entry.second.buffers, resource_util); + ProcessImageMemory(device_wrapper, queue_family_entry.second.images, resource_util); + } } format::EndResourceInitCommand end_cmd; diff --git a/framework/encode/vulkan_state_writer.h b/framework/encode/vulkan_state_writer.h index d5c02e9c57..810c1f26ab 100644 --- a/framework/encode/vulkan_state_writer.h +++ b/framework/encode/vulkan_state_writer.h @@ -52,8 +52,8 @@ class VulkanStateWriter VulkanStateWriter(util::FileOutputStream* output_stream, util::Compressor* compressor, format::ThreadId thread_id, - std::unordered_map& asset_file_offsets, - util::FileOutputStream* asset_file_stream = nullptr); + util::FileOutputStream* asset_file_stream = nullptr, + std::unordered_map* asset_file_offsets = nullptr); ~VulkanStateWriter(); @@ -134,6 +134,8 @@ class VulkanStateWriter void WriteDescriptorSetState(const VulkanStateTable& state_table); + void WriteDescriptorSetStateWithAssetFile(const VulkanStateTable& state_table); + void WriteQueryPoolState(const VulkanStateTable& state_table); void WriteSurfaceKhrState(const VulkanStateTable& state_table); @@ -155,10 +157,18 @@ class VulkanStateWriter const std::vector& buffer_snapshot_info, graphics::VulkanResourcesUtil& resource_util); + void ProcessBufferMemoryWithAssetFile(const vulkan_wrappers::DeviceWrapper* device_wrapper, + const std::vector& buffer_snapshot_info, + graphics::VulkanResourcesUtil& resource_util); + void ProcessImageMemory(const vulkan_wrappers::DeviceWrapper* device_wrapper, const std::vector& image_snapshot_info, graphics::VulkanResourcesUtil& resource_util); + void ProcessImageMemoryWithAssetFile(const vulkan_wrappers::DeviceWrapper* device_wrapper, + const std::vector& image_snapshot_info, + graphics::VulkanResourcesUtil& resource_util); + void WriteBufferMemoryState(const VulkanStateTable& state_table, DeviceResourceTables* resources, VkDeviceSize* max_resource_size, @@ -367,7 +377,7 @@ class VulkanStateWriter uint64_t blocks_written_; util::FileOutputStream* asset_file_stream_; - std::unordered_map& asset_file_offsets_; + std::unordered_map* asset_file_offsets_; }; GFXRECON_END_NAMESPACE(encode) From 61f369c4592c2d6568fba31afbf168d90a94779a Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Tue, 30 Jul 2024 09:01:47 +0300 Subject: [PATCH 27/99] Added some documentation --- USAGE_android.md | 11 +++++++++++ USAGE_desktop_Vulkan.md | 13 ++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/USAGE_android.md b/USAGE_android.md index 9d5a20c2fb..27d4d21173 100644 --- a/USAGE_android.md +++ b/USAGE_android.md @@ -468,6 +468,17 @@ An existing capture file can be trimmed by replaying the capture with the captur enabled and a trimming frame range or capture trigger enabled. (However, replay for some content may be fast enough using the trigger property may be difficult.) +### Asset files + +When doing a trimmed capture, `debug.gfxrecon.capture_use_asset_file` gives the +option to dump all assets (images, buffers and descriptors) separetly in a +different capture file called the asset file. When this option is enabled +assets are tracked and only those that are changed during a tracking period +(outside of a trim range) are dumped into the asset file. This first time a +trim range is encountered (or the hotkey is pressed) all assets will be dumped, +but the next time this happens only the assets that have been changed will be +dumped. This should speed up the dumping process. + ### Capture Limitations #### Conflicts With Crash Detection Libraries diff --git a/USAGE_desktop_Vulkan.md b/USAGE_desktop_Vulkan.md index 62a5d54441..f8ccdf3f4a 100644 --- a/USAGE_desktop_Vulkan.md +++ b/USAGE_desktop_Vulkan.md @@ -262,7 +262,7 @@ option values. | Quit after capturing frame ranges | GFXRECON_QUIT_AFTER_CAPTURE_FRAMES | BOOL | Setting it to `true` will force the application to terminate once all frame ranges specified by `GFXRECON_CAPTURE_FRAMES` have been captured. Default is: `false` | | Hotkey Capture Trigger | GFXRECON_CAPTURE_TRIGGER | STRING | Specify a hotkey (any one of F1-F12, TAB, CONTROL) that will be used to start/stop capture. Example: `F3` will set the capture trigger to F3 hotkey. One capture file will be generated for each pair of start/stop hotkey presses. Default is: Empty string (hotkey capture trigger is disabled). | | Hotkey Capture Trigger Frames | GFXRECON_CAPTURE_TRIGGER_FRAMES | STRING | Specify a limit on the number of frames to be captured via hotkey. Example: `1` will capture exactly one frame when the trigger key is pressed. Default is: Empty string (no limit) | -| Use asset file | debug.gfxrecon.capture_use_asset_file | BOOL | When set to `true` assets (images, buffers and descriptors) will be stored separately into an asset file instead of the capture file. | +| Use asset file | GFXRECON_CAPTURE_USE_ASSET_FILE | BOOL | When set to `true` assets (images, buffers and descriptors) will be stored separately into an asset file instead of the capture file. | | Capture Specific GPU Queue Submits | GFXRECON_CAPTURE_QUEUE_SUBMITS | STRING | Specify one or more comma-separated GPU queue submit call ranges to capture. Queue submit calls are `vkQueueSubmit` for Vulkan and `ID3D12CommandQueue::ExecuteCommandLists` for DX12. Queue submit ranges work as described above in `GFXRECON_CAPTURE_FRAMES` but on GPU queue submit calls instead of frames. Default is: Empty string (all queue submits are captured). | | Capture File Compression Type | GFXRECON_CAPTURE_COMPRESSION_TYPE | STRING | Compression format to use with the capture file. Valid values are: `LZ4`, `ZLIB`, `ZSTD`, and `NONE`. Default is: `LZ4` | | Capture File Timestamp | GFXRECON_CAPTURE_FILE_TIMESTAMP | BOOL | Add a timestamp to the capture file as described by [Timestamps](#timestamps). Default is: `true` | @@ -432,6 +432,17 @@ configured to capture only from frame 100 through frame 200 into a new capture f `gfxrecon-capture.py -f 100-200 gfxrecon-replay gfxrecon-example-capture.gfxr`` +### Asset files + +When doing a trimmed capture, `GFXRECON_CAPTURE_USE_ASSET_FILE` gives the option to +dump all assets (images, buffers and descriptors) separetly in a different capture +file called the asset file. When this option is enabled assets are tracked and +only those that are changed during a tracking period (outside of a trim range) are +dumped into the asset file. This first time a trim range is encountered (or the +hotkey is pressed) all assets will be dumped, but the next time this happens only +the assets that have been changed will be dumped. This should speed up the dumping +process. + ### Capture Script The `gfxrecon-capture-vulkan.py` tool is a convenience script that can be used to From 41aca5aabac9e3b768135417ee71578c4970e8b4 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Tue, 30 Jul 2024 11:26:03 +0300 Subject: [PATCH 28/99] Several transfero commands were omitted by mistake --- .../encode/custom_vulkan_encoder_commands.h | 220 ++++++++++++++++++ framework/encode/vulkan_capture_manager.cpp | 33 +++ framework/encode/vulkan_capture_manager.h | 15 ++ framework/encode/vulkan_state_tracker.cpp | 40 ++++ framework/encode/vulkan_state_tracker.h | 10 + 5 files changed, 318 insertions(+) diff --git a/framework/encode/custom_vulkan_encoder_commands.h b/framework/encode/custom_vulkan_encoder_commands.h index 919ec97482..a6f4f62a36 100644 --- a/framework/encode/custom_vulkan_encoder_commands.h +++ b/framework/encode/custom_vulkan_encoder_commands.h @@ -1410,6 +1410,226 @@ struct CustomEncoderPostCall +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdCopyBuffer(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdCopyImage(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdCopyBufferToImage(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdCopyImageToBuffer(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdCopyBuffer2(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdCopyImage2(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdCopyBufferToImage2(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdCopyImageToBuffer2(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdCopyBuffer2KHR(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdCopyImage2KHR(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdCopyBufferToImage2KHR(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdCopyImageToBuffer2KHR(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdBlitImage(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdBlitImage2(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdBlitImage2KHR(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdUpdateBuffer(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdFillBuffer(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdClearColorImage(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdClearDepthStencilImage(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdResolveImage(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdResolveImage2(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdResolveImage2KHR(args...); + } +}; + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/vulkan_capture_manager.cpp b/framework/encode/vulkan_capture_manager.cpp index 4192d3dd13..6fbfc7a953 100644 --- a/framework/encode/vulkan_capture_manager.cpp +++ b/framework/encode/vulkan_capture_manager.cpp @@ -3478,5 +3478,38 @@ void VulkanCaptureManager::PostProcess_vkCmdClearDepthStencilImage(VkCommandBuff } } +void VulkanCaptureManager::PostProcess_vkCmdResolveImage(VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkImageResolve* pRegions) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdResolveImage( + commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdResolveImage2(VkCommandBuffer commandBuffer, + const VkResolveImageInfo2* pResolveImageInfo) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdResolveImage2(commandBuffer, pResolveImageInfo); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdResolveImage2KHR(VkCommandBuffer commandBuffer, + const VkResolveImageInfo2* pResolveImageInfo) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdResolveImage2(commandBuffer, pResolveImageInfo); + } +} + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/vulkan_capture_manager.h b/framework/encode/vulkan_capture_manager.h index 53dc4d949a..9b39445b87 100644 --- a/framework/encode/vulkan_capture_manager.h +++ b/framework/encode/vulkan_capture_manager.h @@ -1448,7 +1448,9 @@ class VulkanCaptureManager : public ApiCaptureManager uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); + void PostProcess_vkCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset); + void PostProcess_vkCmdDispatchBase(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, @@ -1456,6 +1458,7 @@ class VulkanCaptureManager : public ApiCaptureManager uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); + void PostProcess_vkCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, @@ -1498,6 +1501,18 @@ class VulkanCaptureManager : public ApiCaptureManager void PostProcess_vkCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress); + void PostProcess_vkCmdResolveImage(VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkImageResolve* pRegions); + + void PostProcess_vkCmdResolveImage2(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo); + + void PostProcess_vkCmdResolveImage2KHR(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo); + #if defined(__ANDROID__) void OverrideGetPhysicalDeviceSurfacePresentModesKHR(uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes); #endif diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index 0ca3b771bf..74d45326c3 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -2377,6 +2377,46 @@ void VulkanStateTracker::TrackCmdClearDepthStencilImage(VkCommandBuffer } } +void VulkanStateTracker::TrackCmdResolveImage(VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkImageResolve* pRegions) +{ + if (dstImage != VK_NULL_HANDLE && dstImage != VK_NULL_HANDLE) + { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + + vulkan_wrappers::ImageWrapper* dst_img_wrapper = + vulkan_wrappers::GetWrapper(dstImage); + assert(dst_img_wrapper != nullptr); + + cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); + } +} + +void VulkanStateTracker::TrackCmdResolveImage2(VkCommandBuffer commandBuffer, + const VkResolveImageInfo2* pResolveImageInfo) +{ + if (commandBuffer != VK_NULL_HANDLE && pResolveImageInfo != nullptr && + pResolveImageInfo->dstImage != VK_NULL_HANDLE) + { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(cmd_buf_wrapper != nullptr); + + vulkan_wrappers::ImageWrapper* dst_img_wrapper = + vulkan_wrappers::GetWrapper(pResolveImageInfo->dstImage); + assert(dst_img_wrapper != nullptr); + + cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); + } +} + void VulkanStateTracker::TrackMappedAssetsWrites(VkCommandBuffer commandBuffer) { util::PageGuardManager* manager = util::PageGuardManager::Get(); diff --git a/framework/encode/vulkan_state_tracker.h b/framework/encode/vulkan_state_tracker.h index 5db692e170..4f7b4d5a77 100644 --- a/framework/encode/vulkan_state_tracker.h +++ b/framework/encode/vulkan_state_tracker.h @@ -622,6 +622,16 @@ class VulkanStateTracker void TrackCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress); + void TrackCmdResolveImage(VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkImageResolve* pRegions); + + void TrackCmdResolveImage2(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo); + void TrackMappedAssetsWrites(VkCommandBuffer commandBuffer); void MarkReferencedAssetsAsDirty(VkCommandBuffer commandBuffer); From b6618d7a1b6a0a92b8c1d6817f6afc82130ee099 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Tue, 30 Jul 2024 11:37:51 +0300 Subject: [PATCH 29/99] Add mesh/task shader draw calls --- .../encode/custom_vulkan_encoder_commands.h | 60 +++++++++++++++ framework/encode/vulkan_capture_manager.cpp | 69 +++++++++++++++++ framework/encode/vulkan_capture_manager.h | 29 +++++++ framework/encode/vulkan_state_tracker.cpp | 77 +++++++++++++++++++ framework/encode/vulkan_state_tracker.h | 29 +++++++ 5 files changed, 264 insertions(+) diff --git a/framework/encode/custom_vulkan_encoder_commands.h b/framework/encode/custom_vulkan_encoder_commands.h index a6f4f62a36..a80e6777d6 100644 --- a/framework/encode/custom_vulkan_encoder_commands.h +++ b/framework/encode/custom_vulkan_encoder_commands.h @@ -1630,6 +1630,66 @@ struct CustomEncoderPostCall } }; +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdDrawMeshTasksNV(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdDrawMeshTasksIndirectNV(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdDrawMeshTasksIndirectCountNV(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdDrawMeshTasksEXT(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdDrawMeshTasksIndirectEXT(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdDrawMeshTasksIndirectCountEXT(args...); + } +}; + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/vulkan_capture_manager.cpp b/framework/encode/vulkan_capture_manager.cpp index 6fbfc7a953..4bf41f1c6f 100644 --- a/framework/encode/vulkan_capture_manager.cpp +++ b/framework/encode/vulkan_capture_manager.cpp @@ -3511,5 +3511,74 @@ void VulkanCaptureManager::PostProcess_vkCmdResolveImage2KHR(VkCommandBuffer } } +void VulkanCaptureManager::PostProcess_vkCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, + uint32_t taskCount, + uint32_t firstTask) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdDrawMeshTasksNV(commandBuffer, taskCount, firstTask); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdDrawMeshTasksIndirectNV( + VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdDrawMeshTasksIndirectNV(commandBuffer, buffer, offset, drawCount, stride); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdDrawMeshTasksIndirectCountNV( + commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdDrawMeshTasksEXT(VkCommandBuffer commandBuffer, + uint32_t groupCountX, + uint32_t groupCountY, + uint32_t groupCountZ) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdDrawMeshTasksEXT(commandBuffer, groupCountX, groupCountY, groupCountZ); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdDrawMeshTasksIndirectEXT( + VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdDrawMeshTasksIndirectEXT(commandBuffer, buffer, offset, drawCount, stride); + } +} + +void VulkanCaptureManager::PostProcess_vkCmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackCmdDrawMeshTasksIndirectCountEXT( + commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); + } +} + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/vulkan_capture_manager.h b/framework/encode/vulkan_capture_manager.h index 9b39445b87..271446d382 100644 --- a/framework/encode/vulkan_capture_manager.h +++ b/framework/encode/vulkan_capture_manager.h @@ -1513,6 +1513,35 @@ class VulkanCaptureManager : public ApiCaptureManager void PostProcess_vkCmdResolveImage2KHR(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo); + void PostProcess_vkCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask); + + void PostProcess_vkCmdDrawMeshTasksIndirectNV( + VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); + + void PostProcess_vkCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); + + void PostProcess_vkCmdDrawMeshTasksEXT(VkCommandBuffer commandBuffer, + uint32_t groupCountX, + uint32_t groupCountY, + uint32_t groupCountZ); + + void PostProcess_vkCmdDrawMeshTasksIndirectEXT( + VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); + + void PostProcess_vkCmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); + #if defined(__ANDROID__) void OverrideGetPhysicalDeviceSurfacePresentModesKHR(uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes); #endif diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index 74d45326c3..03c4822c26 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -2417,6 +2417,83 @@ void VulkanStateTracker::TrackCmdResolveImage2(VkCommandBuffer comman } } +void VulkanStateTracker::TrackCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask) +{ + if (taskCount) + { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_graphics); + } +} + +void VulkanStateTracker::TrackCmdDrawMeshTasksIndirectNV( + VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) +{ + if (drawCount) + { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_graphics); + } +} + +void VulkanStateTracker::TrackCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride) +{ + if (maxDrawCount) + { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_graphics); + } +} + +void VulkanStateTracker::TrackCmdDrawMeshTasksEXT(VkCommandBuffer commandBuffer, + uint32_t groupCountX, + uint32_t groupCountY, + uint32_t groupCountZ) +{ + if (groupCountX && groupCountY && groupCountZ) + { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_graphics); + } +} + +void VulkanStateTracker::TrackCmdDrawMeshTasksIndirectEXT( + VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) +{ + if (drawCount) + { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_graphics); + } +} + +void VulkanStateTracker::TrackCmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride) +{ + if (maxDrawCount) + { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_graphics); + } +} + void VulkanStateTracker::TrackMappedAssetsWrites(VkCommandBuffer commandBuffer) { util::PageGuardManager* manager = util::PageGuardManager::Get(); diff --git a/framework/encode/vulkan_state_tracker.h b/framework/encode/vulkan_state_tracker.h index 4f7b4d5a77..01daea230e 100644 --- a/framework/encode/vulkan_state_tracker.h +++ b/framework/encode/vulkan_state_tracker.h @@ -632,6 +632,35 @@ class VulkanStateTracker void TrackCmdResolveImage2(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo); + void TrackCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask); + + void TrackCmdDrawMeshTasksIndirectNV( + VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); + + void TrackCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); + + void TrackCmdDrawMeshTasksEXT(VkCommandBuffer commandBuffer, + uint32_t groupCountX, + uint32_t groupCountY, + uint32_t groupCountZ); + + void TrackCmdDrawMeshTasksIndirectEXT( + VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); + + void TrackCmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); + void TrackMappedAssetsWrites(VkCommandBuffer commandBuffer); void MarkReferencedAssetsAsDirty(VkCommandBuffer commandBuffer); From e229c2fee51c1456d370239b2bdcf9d2bd490c57 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Tue, 30 Jul 2024 14:07:32 +0300 Subject: [PATCH 30/99] Code formatting --- framework/encode/api_capture_manager.h | 10 +++++----- framework/util/page_guard_manager.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/framework/encode/api_capture_manager.h b/framework/encode/api_capture_manager.h index 2ed8903995..1397a70bc0 100644 --- a/framework/encode/api_capture_manager.h +++ b/framework/encode/api_capture_manager.h @@ -43,11 +43,11 @@ class ApiCaptureManager static auto AcquireExclusiveApiCallLock() { return std::move(CommonCaptureManager::AcquireExclusiveApiCallLock()); } // Virtual interface - virtual void CreateStateTracker() = 0; - virtual void DestroyStateTracker() = 0; - virtual void WriteTrackedState(util::FileOutputStream* file_stream, - format::ThreadId thread_id, - util::FileOutputStream* asseet_file_stream = nullptr) = 0; + virtual void CreateStateTracker() = 0; + virtual void DestroyStateTracker() = 0; + virtual void WriteTrackedState(util::FileOutputStream* file_stream, + format::ThreadId thread_id, + util::FileOutputStream* asseet_file_stream = nullptr) = 0; virtual CaptureSettings::TraceSettings GetDefaultTraceSettings(); diff --git a/framework/util/page_guard_manager.h b/framework/util/page_guard_manager.h index 19f42b2636..c1276af6e7 100644 --- a/framework/util/page_guard_manager.h +++ b/framework/util/page_guard_manager.h @@ -145,7 +145,7 @@ class PageGuardManager void UffdUnblockRtSignal(); - void GetModifiedMemoryRegions(std::unordered_map &memories_page_status); + void GetModifiedMemoryRegions(std::unordered_map& memories_page_status); protected: PageGuardManager(); From b15626ae3bc5c7576f2278d756d01ac49a42755f Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Tue, 30 Jul 2024 16:00:17 +0300 Subject: [PATCH 31/99] Fix windows and android builds --- framework/encode/d3d12_capture_manager.cpp | 6 +++--- framework/encode/d3d12_capture_manager.h | 2 +- framework/encode/dx12_state_writer.cpp | 3 ++- framework/encode/dx12_state_writer.h | 8 +++++--- framework/encode/vulkan_state_tracker.cpp | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/framework/encode/d3d12_capture_manager.cpp b/framework/encode/d3d12_capture_manager.cpp index 702d08153a..cf0e297524 100644 --- a/framework/encode/d3d12_capture_manager.cpp +++ b/framework/encode/d3d12_capture_manager.cpp @@ -171,10 +171,10 @@ void D3D12CaptureManager::EndCommandListMethodCallCapture(ID3D12CommandList_Wrap void D3D12CaptureManager::WriteTrackedState(util::FileOutputStream* file_stream, format::ThreadId thread_id, - util::FileOutputStream* assert_file_stream) + util::FileOutputStream* asset_file_stream) { - Dx12StateWriter state_writer(file_stream, GetCompressor(), thread_id); - state_tracker_->WriteState(&state_writer, GetCurrentFrame(), assert_file_stream); + Dx12StateWriter state_writer(file_stream, GetCompressor(), thread_id, asset_file_stream); + state_tracker_->WriteState(&state_writer, GetCurrentFrame()); } void D3D12CaptureManager::PreAcquireSwapChainImages(IDXGISwapChain_Wrapper* wrapper, diff --git a/framework/encode/d3d12_capture_manager.h b/framework/encode/d3d12_capture_manager.h index 7f78c6c7e6..131d653e35 100644 --- a/framework/encode/d3d12_capture_manager.h +++ b/framework/encode/d3d12_capture_manager.h @@ -771,7 +771,7 @@ class D3D12CaptureManager : public ApiCaptureManager virtual void WriteTrackedState(util::FileOutputStream* file_stream, format::ThreadId thread_id, - util::FileOutputStream* assert_file_stream = nullptr) override; + util::FileOutputStream* asset_file_stream = nullptr) override; void PreAcquireSwapChainImages(IDXGISwapChain_Wrapper* wrapper, IUnknown* command_queue, diff --git a/framework/encode/dx12_state_writer.cpp b/framework/encode/dx12_state_writer.cpp index fabf0d9b6d..b8e4756986 100644 --- a/framework/encode/dx12_state_writer.cpp +++ b/framework/encode/dx12_state_writer.cpp @@ -36,7 +36,8 @@ GFXRECON_BEGIN_NAMESPACE(encode) Dx12StateWriter::Dx12StateWriter(util::FileOutputStream* output_stream, util::Compressor* compressor, - format::ThreadId thread_id) : + format::ThreadId thread_id, + util::FileOutputStream* asset_file_stream) : output_stream_(output_stream), compressor_(compressor), thread_id_(thread_id), encoder_(¶meter_stream_) { diff --git a/framework/encode/dx12_state_writer.h b/framework/encode/dx12_state_writer.h index 96969a1256..0ea0b856a8 100644 --- a/framework/encode/dx12_state_writer.h +++ b/framework/encode/dx12_state_writer.h @@ -50,17 +50,19 @@ GFXRECON_BEGIN_NAMESPACE(encode) class Dx12StateWriter { public: - Dx12StateWriter(util::FileOutputStream* output_stream, util::Compressor* compressor, format::ThreadId thread_id); + Dx12StateWriter(util::FileOutputStream* output_stream, + util::Compressor* compressor, + format::ThreadId thread_id, + util::FileOutputStream* asset_file_stream = nullptr); ~Dx12StateWriter(); - + #ifdef GFXRECON_AGS_SUPPORT void WriteState(const Dx12StateTable& state_table, const AgsStateTable& ags_state_table, uint64_t frame_number); #else void WriteState(const Dx12StateTable& state_table, uint64_t frame_number); #endif // GFXRECON_AGS_SUPPORT - private: struct ResourceSnapshotInfo { diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index 03c4822c26..d662aa567d 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -2086,7 +2086,7 @@ void VulkanStateTracker::TrackCmdCopyBufferToImage(VkCommandBuffer comm uint32_t regionCount, const VkBufferImageCopy* pRegions) { - if (dstImage != nullptr && commandBuffer != VK_NULL_HANDLE) + if (dstImage != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) { vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = vulkan_wrappers::GetWrapper(commandBuffer); From 5a164cabd15c36850d14c6b8991e545eb4fbff07 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Thu, 1 Aug 2024 11:00:10 +0300 Subject: [PATCH 32/99] Some clean ups --- framework/encode/vulkan_handle_wrappers.h | 4 +- framework/encode/vulkan_state_tracker.cpp | 283 +++++----------------- framework/encode/vulkan_state_tracker.h | 5 + framework/encode/vulkan_state_writer.cpp | 46 ++-- 4 files changed, 83 insertions(+), 255 deletions(-) diff --git a/framework/encode/vulkan_handle_wrappers.h b/framework/encode/vulkan_handle_wrappers.h index 6dd3571fe4..f3d6298d6a 100644 --- a/framework/encode/vulkan_handle_wrappers.h +++ b/framework/encode/vulkan_handle_wrappers.h @@ -169,8 +169,8 @@ struct EventWrapper : public HandleWrapper struct AssetWrapperBase { - DeviceWrapper* bind_device{ nullptr }; - const void* bind_pnext{ nullptr }; + DeviceWrapper* bind_device{ nullptr }; + const void* bind_pnext{ nullptr }; std::unique_ptr bind_pnext_memory; format::HandleId bind_memory_id{ format::kNullHandleId }; diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index d662aa567d..d9e5baa74a 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -2039,26 +2039,47 @@ void VulkanStateTracker::TrackCmdBindPipeline(VkCommandBuffer commandBuffer, } } -void VulkanStateTracker::TrackCmdCopyBuffer(VkCommandBuffer commandBuffer, - VkBuffer srcBuffer, - VkBuffer dstBuffer, - uint32_t regionCount, - const VkBufferCopy* pRegions) +void VulkanStateTracker::InsertAssetInCommandBuffer(VkCommandBuffer command_buffer, VkImage image) { - if (dstBuffer != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) + if (command_buffer != VK_NULL_HANDLE && image != VK_NULL_HANDLE) { vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); + vulkan_wrappers::GetWrapper(command_buffer); + assert(cmd_buf_wrapper != nullptr); + + vulkan_wrappers::ImageWrapper* image_wrapper = + vulkan_wrappers::GetWrapper(image); + assert(image_wrapper != nullptr); + + cmd_buf_wrapper->modified_assets.insert(image_wrapper); + } +} + +void VulkanStateTracker::InsertAssetInCommandBuffer(VkCommandBuffer command_buffer, VkBuffer buffer) +{ + if (command_buffer != VK_NULL_HANDLE && buffer != VK_NULL_HANDLE) + { + vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = + vulkan_wrappers::GetWrapper(command_buffer); assert(cmd_buf_wrapper != nullptr); - vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = - vulkan_wrappers::GetWrapper(dstBuffer); - assert(dst_buffer_wrapper != nullptr); + vulkan_wrappers::BufferWrapper* buffer_wrapper = + vulkan_wrappers::GetWrapper(buffer); + assert(buffer_wrapper != nullptr); - cmd_buf_wrapper->modified_assets.insert(dst_buffer_wrapper); + cmd_buf_wrapper->modified_assets.insert(buffer_wrapper); } } +void VulkanStateTracker::TrackCmdCopyBuffer(VkCommandBuffer commandBuffer, + VkBuffer srcBuffer, + VkBuffer dstBuffer, + uint32_t regionCount, + const VkBufferCopy* pRegions) +{ + InsertAssetInCommandBuffer(commandBuffer, dstBuffer); +} + void VulkanStateTracker::TrackCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, @@ -2067,16 +2088,7 @@ void VulkanStateTracker::TrackCmdCopyImage(VkCommandBuffer commandBuffer, uint32_t regionCount, const VkImageCopy* pRegions) { - if (dstImage != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) - { - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); - assert(cmd_buf_wrapper != nullptr); - - vulkan_wrappers::ImageWrapper* dst_img_wrapper = - vulkan_wrappers::GetWrapper(dstImage); - assert(dst_img_wrapper != nullptr); - } + InsertAssetInCommandBuffer(commandBuffer, dstImage); } void VulkanStateTracker::TrackCmdCopyBufferToImage(VkCommandBuffer commandBuffer, @@ -2086,18 +2098,7 @@ void VulkanStateTracker::TrackCmdCopyBufferToImage(VkCommandBuffer comm uint32_t regionCount, const VkBufferImageCopy* pRegions) { - if (dstImage != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) - { - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); - assert(cmd_buf_wrapper != nullptr); - - vulkan_wrappers::ImageWrapper* dst_img_wrapper = - vulkan_wrappers::GetWrapper(dstImage); - assert(dst_img_wrapper != nullptr); - - cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); - } + InsertAssetInCommandBuffer(commandBuffer, dstImage); } void VulkanStateTracker::TrackCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, @@ -2107,153 +2108,74 @@ void VulkanStateTracker::TrackCmdCopyImageToBuffer(VkCommandBuffer comm uint32_t regionCount, const VkBufferImageCopy* pRegions) { - if (dstBuffer != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) - { - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); - assert(cmd_buf_wrapper != nullptr); - - vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = - vulkan_wrappers::GetWrapper(dstBuffer); - assert(dst_buffer_wrapper != nullptr); - - cmd_buf_wrapper->modified_assets.insert(dst_buffer_wrapper); - } + InsertAssetInCommandBuffer(commandBuffer, dstBuffer); } void VulkanStateTracker::TrackCmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) { - if (pCopyBufferInfo != nullptr && pCopyBufferInfo->dstBuffer != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) + if (pCopyBufferInfo != nullptr) { - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); - assert(cmd_buf_wrapper != nullptr); - - vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = - vulkan_wrappers::GetWrapper(pCopyBufferInfo->dstBuffer); - assert(dst_buffer_wrapper != nullptr); - - cmd_buf_wrapper->modified_assets.insert(dst_buffer_wrapper); + InsertAssetInCommandBuffer(commandBuffer, pCopyBufferInfo->dstBuffer); } } void VulkanStateTracker::TrackCmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) { - if (pCopyImageInfo != nullptr && pCopyImageInfo->dstImage != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) + if (pCopyImageInfo != nullptr) { - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); - assert(cmd_buf_wrapper != nullptr); - - vulkan_wrappers::ImageWrapper* dst_img_wrapper = - vulkan_wrappers::GetWrapper(pCopyImageInfo->dstImage); - assert(dst_img_wrapper != nullptr); - - cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); + InsertAssetInCommandBuffer(commandBuffer, pCopyImageInfo->dstImage); } } void VulkanStateTracker::TrackCmdCopyBufferToImage2(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) { - if (pCopyBufferToImageInfo != nullptr && pCopyBufferToImageInfo->dstImage != VK_NULL_HANDLE && - commandBuffer != VK_NULL_HANDLE) + if (pCopyBufferToImageInfo != nullptr) { - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); - assert(cmd_buf_wrapper != nullptr); - - vulkan_wrappers::ImageWrapper* dst_img_wrapper = - vulkan_wrappers::GetWrapper(pCopyBufferToImageInfo->dstImage); - assert(dst_img_wrapper != nullptr); - - cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); + InsertAssetInCommandBuffer(commandBuffer, pCopyBufferToImageInfo->dstImage); } } void VulkanStateTracker::TrackCmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) { - if (pCopyImageToBufferInfo != nullptr && pCopyImageToBufferInfo->dstBuffer != VK_NULL_HANDLE && - commandBuffer != VK_NULL_HANDLE) + if (pCopyImageToBufferInfo != nullptr) { - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); - assert(cmd_buf_wrapper != nullptr); - - vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = - vulkan_wrappers::GetWrapper(pCopyImageToBufferInfo->dstBuffer); - assert(dst_buffer_wrapper != nullptr); - - cmd_buf_wrapper->modified_assets.insert(dst_buffer_wrapper); + InsertAssetInCommandBuffer(commandBuffer, pCopyImageToBufferInfo->dstBuffer); } } void VulkanStateTracker::TrackCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) { - if (pCopyBufferInfo != nullptr && pCopyBufferInfo->dstBuffer != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) + if (pCopyBufferInfo != nullptr) { - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); - assert(cmd_buf_wrapper != nullptr); - - vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = - vulkan_wrappers::GetWrapper(pCopyBufferInfo->dstBuffer); - assert(dst_buffer_wrapper != nullptr); - - cmd_buf_wrapper->modified_assets.insert(dst_buffer_wrapper); + InsertAssetInCommandBuffer(commandBuffer, pCopyBufferInfo->dstBuffer); } } void VulkanStateTracker::TrackCmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) { - if (pCopyImageInfo != nullptr && pCopyImageInfo->dstImage != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) + if (pCopyImageInfo != nullptr) { - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); - assert(cmd_buf_wrapper != nullptr); - - vulkan_wrappers::ImageWrapper* dst_img_wrapper = - vulkan_wrappers::GetWrapper(pCopyImageInfo->dstImage); - assert(dst_img_wrapper != nullptr); - - cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); + InsertAssetInCommandBuffer(commandBuffer, pCopyImageInfo->dstImage); } } void VulkanStateTracker::TrackCmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) { - if (pCopyBufferToImageInfo != nullptr && pCopyBufferToImageInfo->dstImage != VK_NULL_HANDLE && - commandBuffer != VK_NULL_HANDLE) + if (pCopyBufferToImageInfo != nullptr) { - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); - assert(cmd_buf_wrapper != nullptr); - - vulkan_wrappers::ImageWrapper* dst_img_wrapper = - vulkan_wrappers::GetWrapper(pCopyBufferToImageInfo->dstImage); - assert(dst_img_wrapper != nullptr); - - cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); + InsertAssetInCommandBuffer(commandBuffer, pCopyBufferToImageInfo->dstImage); } } void VulkanStateTracker::TrackCmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) { - if (pCopyImageToBufferInfo != nullptr && pCopyImageToBufferInfo->dstBuffer != VK_NULL_HANDLE && - commandBuffer != VK_NULL_HANDLE) + if (pCopyImageToBufferInfo != nullptr) { - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); - assert(cmd_buf_wrapper != nullptr); - - vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = - vulkan_wrappers::GetWrapper(pCopyImageToBufferInfo->dstBuffer); - assert(dst_buffer_wrapper != nullptr); - - cmd_buf_wrapper->modified_assets.insert(dst_buffer_wrapper); + InsertAssetInCommandBuffer(commandBuffer, pCopyImageToBufferInfo->dstBuffer); } } @@ -2266,33 +2188,14 @@ void VulkanStateTracker::TrackCmdBlitImage(VkCommandBuffer commandBuffer, const VkImageBlit* pRegions, VkFilter filter) { - if (dstImage != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) - { - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); - assert(cmd_buf_wrapper != nullptr); - - vulkan_wrappers::ImageWrapper* dst_img_wrapper = - vulkan_wrappers::GetWrapper(dstImage); - assert(dst_img_wrapper != nullptr); - - cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); - } + InsertAssetInCommandBuffer(commandBuffer, dstImage); } void VulkanStateTracker::TrackCmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo) { - if (pBlitImageInfo != nullptr && pBlitImageInfo->dstImage != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) + if (pBlitImageInfo != nullptr) { - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); - assert(cmd_buf_wrapper != nullptr); - - vulkan_wrappers::ImageWrapper* dst_img_wrapper = - vulkan_wrappers::GetWrapper(pBlitImageInfo->dstImage); - assert(dst_img_wrapper != nullptr); - - cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); + InsertAssetInCommandBuffer(commandBuffer, pBlitImageInfo->dstImage); } } @@ -2304,35 +2207,13 @@ void VulkanStateTracker::TrackCmdBlitImage2KHR(VkCommandBuffer commandBuffer, co void VulkanStateTracker::TrackCmdUpdateBuffer( VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData) { - if (dstBuffer != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) - { - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); - assert(cmd_buf_wrapper != nullptr); - - vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = - vulkan_wrappers::GetWrapper(dstBuffer); - assert(dst_buffer_wrapper != nullptr); - - cmd_buf_wrapper->modified_assets.insert(dst_buffer_wrapper); - } + InsertAssetInCommandBuffer(commandBuffer, dstBuffer); } void VulkanStateTracker::TrackCmdFillBuffer( VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data) { - if (dstBuffer != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) - { - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); - assert(cmd_buf_wrapper != nullptr); - - vulkan_wrappers::BufferWrapper* dst_buffer_wrapper = - vulkan_wrappers::GetWrapper(dstBuffer); - assert(dst_buffer_wrapper != nullptr); - - cmd_buf_wrapper->modified_assets.insert(dst_buffer_wrapper); - } + InsertAssetInCommandBuffer(commandBuffer, dstBuffer); } void VulkanStateTracker::TrackCmdClearColorImage(VkCommandBuffer commandBuffer, @@ -2342,18 +2223,7 @@ void VulkanStateTracker::TrackCmdClearColorImage(VkCommandBuffer uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { - if (image != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) - { - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); - assert(cmd_buf_wrapper != nullptr); - - vulkan_wrappers::ImageWrapper* dst_img_wrapper = - vulkan_wrappers::GetWrapper(image); - assert(dst_img_wrapper != nullptr); - - cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); - } + InsertAssetInCommandBuffer(commandBuffer, image); } void VulkanStateTracker::TrackCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, @@ -2363,18 +2233,7 @@ void VulkanStateTracker::TrackCmdClearDepthStencilImage(VkCommandBuffer uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { - if (image != VK_NULL_HANDLE && commandBuffer != VK_NULL_HANDLE) - { - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); - assert(cmd_buf_wrapper != nullptr); - - vulkan_wrappers::ImageWrapper* dst_img_wrapper = - vulkan_wrappers::GetWrapper(image); - assert(dst_img_wrapper != nullptr); - - cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); - } + InsertAssetInCommandBuffer(commandBuffer, image); } void VulkanStateTracker::TrackCmdResolveImage(VkCommandBuffer commandBuffer, @@ -2385,35 +2244,15 @@ void VulkanStateTracker::TrackCmdResolveImage(VkCommandBuffer commandBuffe uint32_t regionCount, const VkImageResolve* pRegions) { - if (dstImage != VK_NULL_HANDLE && dstImage != VK_NULL_HANDLE) - { - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); - assert(cmd_buf_wrapper != nullptr); - - vulkan_wrappers::ImageWrapper* dst_img_wrapper = - vulkan_wrappers::GetWrapper(dstImage); - assert(dst_img_wrapper != nullptr); - - cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); - } + InsertAssetInCommandBuffer(commandBuffer, dstImage); } void VulkanStateTracker::TrackCmdResolveImage2(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo) { - if (commandBuffer != VK_NULL_HANDLE && pResolveImageInfo != nullptr && - pResolveImageInfo->dstImage != VK_NULL_HANDLE) + if (pResolveImageInfo != nullptr) { - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); - assert(cmd_buf_wrapper != nullptr); - - vulkan_wrappers::ImageWrapper* dst_img_wrapper = - vulkan_wrappers::GetWrapper(pResolveImageInfo->dstImage); - assert(dst_img_wrapper != nullptr); - - cmd_buf_wrapper->modified_assets.insert(dst_img_wrapper); + InsertAssetInCommandBuffer(commandBuffer, pResolveImageInfo->dstImage); } } diff --git a/framework/encode/vulkan_state_tracker.h b/framework/encode/vulkan_state_tracker.h index 01daea230e..6a7b6588dd 100644 --- a/framework/encode/vulkan_state_tracker.h +++ b/framework/encode/vulkan_state_tracker.h @@ -38,6 +38,7 @@ #include "util/memory_output_stream.h" #include "vulkan/vulkan.h" +#include "vulkan/vulkan_core.h" #include #include @@ -739,6 +740,10 @@ class VulkanStateTracker void TrackPipelineDescriptors(vulkan_wrappers::CommandBufferWrapper* command_wrapper, vulkan_state_info::PipelineBindPoints ppl_bind_point); + void InsertAssetInCommandBuffer(VkCommandBuffer command_buffer, VkImage image); + + void InsertAssetInCommandBuffer(VkCommandBuffer command_buffer, VkBuffer buffer); + std::mutex state_table_mutex_; VulkanStateTable state_table_; diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index c12e5fe03f..736fa51e52 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -943,6 +943,8 @@ void VulkanStateWriter::WriteDescriptorSetState(const VulkanStateTable& state_ta void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTable& state_table) { + assert(asset_file_stream_ != nullptr); + std::set processed; std::unordered_map temp_ds_layouts; @@ -1590,6 +1592,7 @@ void VulkanStateWriter::ProcessBufferMemoryWithAssetFile(const vulkan_wrappers:: graphics::VulkanResourcesUtil& resource_util) { assert(device_wrapper != nullptr); + assert(asset_file_stream_ != nullptr); const VulkanDeviceTable* device_table = &device_wrapper->layer_table; @@ -1683,22 +1686,13 @@ void VulkanStateWriter::ProcessBufferMemoryWithAssetFile(const vulkan_wrappers:: // Calculate size of packet with compressed or uncompressed data size. upload_cmd.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(upload_cmd) + data_size; - if (asset_file_stream_ != nullptr) - { - const int64_t offset = asset_file_stream_->GetOffset(); - - asset_file_stream_->Write(&upload_cmd, sizeof(upload_cmd)); - asset_file_stream_->Write(bytes, data_size); + const int64_t offset = asset_file_stream_->GetOffset(); + asset_file_stream_->Write(&upload_cmd, sizeof(upload_cmd)); + asset_file_stream_->Write(bytes, data_size); + (*asset_file_offsets_)[buffer_wrapper->handle_id] = offset; - (*asset_file_offsets_)[buffer_wrapper->handle_id] = offset; + WriteExecuteFromFile(1, offset); - WriteExecuteFromFile(1, offset); - } - else - { - output_stream_->Write(&upload_cmd, sizeof(upload_cmd)); - output_stream_->Write(bytes, data_size); - } ++blocks_written_; if (!snapshot_entry.need_staging_copy && memory_wrapper->mapped_data == nullptr) @@ -1877,6 +1871,7 @@ void VulkanStateWriter::ProcessImageMemoryWithAssetFile(const vulkan_wrappers::D graphics::VulkanResourcesUtil& resource_util) { assert(device_wrapper != nullptr); + assert(asset_file_stream_ != nullptr); const VulkanDeviceTable* device_table = &device_wrapper->layer_table; @@ -2006,24 +2001,13 @@ void VulkanStateWriter::ProcessImageMemoryWithAssetFile(const vulkan_wrappers::D upload_cmd.meta_header.block_header.size += levels_size + data_size; - if (asset_file_stream_ != nullptr) - { - const int64_t offset = asset_file_stream_->GetOffset(); - - (*asset_file_offsets_)[image_wrapper->handle_id] = offset; - - asset_file_stream_->Write(&upload_cmd, sizeof(upload_cmd)); - asset_file_stream_->Write(snapshot_entry.level_sizes.data(), levels_size); - asset_file_stream_->Write(bytes, data_size); + const int64_t offset = asset_file_stream_->GetOffset(); + (*asset_file_offsets_)[image_wrapper->handle_id] = offset; + asset_file_stream_->Write(&upload_cmd, sizeof(upload_cmd)); + asset_file_stream_->Write(snapshot_entry.level_sizes.data(), levels_size); + asset_file_stream_->Write(bytes, data_size); - WriteExecuteFromFile(1, offset); - } - else - { - output_stream_->Write(&upload_cmd, sizeof(upload_cmd)); - output_stream_->Write(snapshot_entry.level_sizes.data(), levels_size); - output_stream_->Write(bytes, data_size); - } + WriteExecuteFromFile(1, offset); if (!snapshot_entry.need_staging_copy && memory_wrapper->mapped_data == nullptr) { From 6b727dc51dce57eb6f36913c02ce97ae4a6a8c5a Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Thu, 1 Aug 2024 12:16:01 +0300 Subject: [PATCH 33/99] Fix 32bit build --- framework/encode/vulkan_state_tracker.cpp | 44 +++++++++++------------ framework/encode/vulkan_state_tracker.h | 4 +-- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index d9e5baa74a..c3ddc8a422 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -2039,7 +2039,7 @@ void VulkanStateTracker::TrackCmdBindPipeline(VkCommandBuffer commandBuffer, } } -void VulkanStateTracker::InsertAssetInCommandBuffer(VkCommandBuffer command_buffer, VkImage image) +void VulkanStateTracker::InsertImageAssetInCommandBuffer(VkCommandBuffer command_buffer, VkImage image) { if (command_buffer != VK_NULL_HANDLE && image != VK_NULL_HANDLE) { @@ -2055,7 +2055,7 @@ void VulkanStateTracker::InsertAssetInCommandBuffer(VkCommandBuffer command_buff } } -void VulkanStateTracker::InsertAssetInCommandBuffer(VkCommandBuffer command_buffer, VkBuffer buffer) +void VulkanStateTracker::InsertBufferAssetInCommandBuffer(VkCommandBuffer command_buffer, VkBuffer buffer) { if (command_buffer != VK_NULL_HANDLE && buffer != VK_NULL_HANDLE) { @@ -2077,7 +2077,7 @@ void VulkanStateTracker::TrackCmdCopyBuffer(VkCommandBuffer commandBuffer, uint32_t regionCount, const VkBufferCopy* pRegions) { - InsertAssetInCommandBuffer(commandBuffer, dstBuffer); + InsertBufferAssetInCommandBuffer(commandBuffer, dstBuffer); } void VulkanStateTracker::TrackCmdCopyImage(VkCommandBuffer commandBuffer, @@ -2088,7 +2088,7 @@ void VulkanStateTracker::TrackCmdCopyImage(VkCommandBuffer commandBuffer, uint32_t regionCount, const VkImageCopy* pRegions) { - InsertAssetInCommandBuffer(commandBuffer, dstImage); + InsertImageAssetInCommandBuffer(commandBuffer, dstImage); } void VulkanStateTracker::TrackCmdCopyBufferToImage(VkCommandBuffer commandBuffer, @@ -2098,7 +2098,7 @@ void VulkanStateTracker::TrackCmdCopyBufferToImage(VkCommandBuffer comm uint32_t regionCount, const VkBufferImageCopy* pRegions) { - InsertAssetInCommandBuffer(commandBuffer, dstImage); + InsertImageAssetInCommandBuffer(commandBuffer, dstImage); } void VulkanStateTracker::TrackCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, @@ -2108,14 +2108,14 @@ void VulkanStateTracker::TrackCmdCopyImageToBuffer(VkCommandBuffer comm uint32_t regionCount, const VkBufferImageCopy* pRegions) { - InsertAssetInCommandBuffer(commandBuffer, dstBuffer); + InsertBufferAssetInCommandBuffer(commandBuffer, dstBuffer); } void VulkanStateTracker::TrackCmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) { if (pCopyBufferInfo != nullptr) { - InsertAssetInCommandBuffer(commandBuffer, pCopyBufferInfo->dstBuffer); + InsertBufferAssetInCommandBuffer(commandBuffer, pCopyBufferInfo->dstBuffer); } } @@ -2123,7 +2123,7 @@ void VulkanStateTracker::TrackCmdCopyImage2(VkCommandBuffer commandBuffer, const { if (pCopyImageInfo != nullptr) { - InsertAssetInCommandBuffer(commandBuffer, pCopyImageInfo->dstImage); + InsertImageAssetInCommandBuffer(commandBuffer, pCopyImageInfo->dstImage); } } @@ -2132,7 +2132,7 @@ void VulkanStateTracker::TrackCmdCopyBufferToImage2(VkCommandBuffer { if (pCopyBufferToImageInfo != nullptr) { - InsertAssetInCommandBuffer(commandBuffer, pCopyBufferToImageInfo->dstImage); + InsertImageAssetInCommandBuffer(commandBuffer, pCopyBufferToImageInfo->dstImage); } } @@ -2141,7 +2141,7 @@ void VulkanStateTracker::TrackCmdCopyImageToBuffer2(VkCommandBuffer { if (pCopyImageToBufferInfo != nullptr) { - InsertAssetInCommandBuffer(commandBuffer, pCopyImageToBufferInfo->dstBuffer); + InsertBufferAssetInCommandBuffer(commandBuffer, pCopyImageToBufferInfo->dstBuffer); } } @@ -2149,7 +2149,7 @@ void VulkanStateTracker::TrackCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, c { if (pCopyBufferInfo != nullptr) { - InsertAssetInCommandBuffer(commandBuffer, pCopyBufferInfo->dstBuffer); + InsertBufferAssetInCommandBuffer(commandBuffer, pCopyBufferInfo->dstBuffer); } } @@ -2157,7 +2157,7 @@ void VulkanStateTracker::TrackCmdCopyImage2KHR(VkCommandBuffer commandBuffer, co { if (pCopyImageInfo != nullptr) { - InsertAssetInCommandBuffer(commandBuffer, pCopyImageInfo->dstImage); + InsertImageAssetInCommandBuffer(commandBuffer, pCopyImageInfo->dstImage); } } @@ -2166,7 +2166,7 @@ void VulkanStateTracker::TrackCmdCopyBufferToImage2KHR(VkCommandBuffer { if (pCopyBufferToImageInfo != nullptr) { - InsertAssetInCommandBuffer(commandBuffer, pCopyBufferToImageInfo->dstImage); + InsertImageAssetInCommandBuffer(commandBuffer, pCopyBufferToImageInfo->dstImage); } } @@ -2175,7 +2175,7 @@ void VulkanStateTracker::TrackCmdCopyImageToBuffer2KHR(VkCommandBuffer { if (pCopyImageToBufferInfo != nullptr) { - InsertAssetInCommandBuffer(commandBuffer, pCopyImageToBufferInfo->dstBuffer); + InsertBufferAssetInCommandBuffer(commandBuffer, pCopyImageToBufferInfo->dstBuffer); } } @@ -2188,14 +2188,14 @@ void VulkanStateTracker::TrackCmdBlitImage(VkCommandBuffer commandBuffer, const VkImageBlit* pRegions, VkFilter filter) { - InsertAssetInCommandBuffer(commandBuffer, dstImage); + InsertImageAssetInCommandBuffer(commandBuffer, dstImage); } void VulkanStateTracker::TrackCmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo) { if (pBlitImageInfo != nullptr) { - InsertAssetInCommandBuffer(commandBuffer, pBlitImageInfo->dstImage); + InsertImageAssetInCommandBuffer(commandBuffer, pBlitImageInfo->dstImage); } } @@ -2207,13 +2207,13 @@ void VulkanStateTracker::TrackCmdBlitImage2KHR(VkCommandBuffer commandBuffer, co void VulkanStateTracker::TrackCmdUpdateBuffer( VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData) { - InsertAssetInCommandBuffer(commandBuffer, dstBuffer); + InsertBufferAssetInCommandBuffer(commandBuffer, dstBuffer); } void VulkanStateTracker::TrackCmdFillBuffer( VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data) { - InsertAssetInCommandBuffer(commandBuffer, dstBuffer); + InsertBufferAssetInCommandBuffer(commandBuffer, dstBuffer); } void VulkanStateTracker::TrackCmdClearColorImage(VkCommandBuffer commandBuffer, @@ -2223,7 +2223,7 @@ void VulkanStateTracker::TrackCmdClearColorImage(VkCommandBuffer uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { - InsertAssetInCommandBuffer(commandBuffer, image); + InsertImageAssetInCommandBuffer(commandBuffer, image); } void VulkanStateTracker::TrackCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, @@ -2233,7 +2233,7 @@ void VulkanStateTracker::TrackCmdClearDepthStencilImage(VkCommandBuffer uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { - InsertAssetInCommandBuffer(commandBuffer, image); + InsertImageAssetInCommandBuffer(commandBuffer, image); } void VulkanStateTracker::TrackCmdResolveImage(VkCommandBuffer commandBuffer, @@ -2244,7 +2244,7 @@ void VulkanStateTracker::TrackCmdResolveImage(VkCommandBuffer commandBuffe uint32_t regionCount, const VkImageResolve* pRegions) { - InsertAssetInCommandBuffer(commandBuffer, dstImage); + InsertImageAssetInCommandBuffer(commandBuffer, dstImage); } void VulkanStateTracker::TrackCmdResolveImage2(VkCommandBuffer commandBuffer, @@ -2252,7 +2252,7 @@ void VulkanStateTracker::TrackCmdResolveImage2(VkCommandBuffer comman { if (pResolveImageInfo != nullptr) { - InsertAssetInCommandBuffer(commandBuffer, pResolveImageInfo->dstImage); + InsertImageAssetInCommandBuffer(commandBuffer, pResolveImageInfo->dstImage); } } diff --git a/framework/encode/vulkan_state_tracker.h b/framework/encode/vulkan_state_tracker.h index 6a7b6588dd..a86fa422e6 100644 --- a/framework/encode/vulkan_state_tracker.h +++ b/framework/encode/vulkan_state_tracker.h @@ -740,9 +740,9 @@ class VulkanStateTracker void TrackPipelineDescriptors(vulkan_wrappers::CommandBufferWrapper* command_wrapper, vulkan_state_info::PipelineBindPoints ppl_bind_point); - void InsertAssetInCommandBuffer(VkCommandBuffer command_buffer, VkImage image); + void InsertImageAssetInCommandBuffer(VkCommandBuffer command_buffer, VkImage image); - void InsertAssetInCommandBuffer(VkCommandBuffer command_buffer, VkBuffer buffer); + void InsertBufferAssetInCommandBuffer(VkCommandBuffer command_buffer, VkBuffer buffer); std::mutex state_table_mutex_; VulkanStateTable state_table_; From d3f8775378190906391cbcc197f6815d96b107f5 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Fri, 2 Aug 2024 16:38:34 +0300 Subject: [PATCH 34/99] Expose WriteAssetsGFXR through the layer --- framework/encode/api_capture_manager.h | 8 +- framework/encode/capture_manager.cpp | 20 +- framework/encode/capture_manager.h | 3 + framework/encode/custom_layer_func_table.h | 3 +- .../custom_vulkan_api_call_encoders.cpp | 6 + .../encode/custom_vulkan_api_call_encoders.h | 2 + framework/encode/vulkan_capture_manager.cpp | 6 + framework/encode/vulkan_capture_manager.h | 2 + framework/encode/vulkan_state_tracker.h | 11 + framework/encode/vulkan_state_writer.cpp | 288 ++++++++++-------- framework/encode/vulkan_state_writer.h | 10 +- 11 files changed, 229 insertions(+), 130 deletions(-) diff --git a/framework/encode/api_capture_manager.h b/framework/encode/api_capture_manager.h index 1397a70bc0..317ccc5034 100644 --- a/framework/encode/api_capture_manager.h +++ b/framework/encode/api_capture_manager.h @@ -43,11 +43,12 @@ class ApiCaptureManager static auto AcquireExclusiveApiCallLock() { return std::move(CommonCaptureManager::AcquireExclusiveApiCallLock()); } // Virtual interface - virtual void CreateStateTracker() = 0; - virtual void DestroyStateTracker() = 0; + virtual void CreateStateTracker() = 0; + virtual void DestroyStateTracker() = 0; virtual void WriteTrackedState(util::FileOutputStream* file_stream, format::ThreadId thread_id, - util::FileOutputStream* asseet_file_stream = nullptr) = 0; + util::FileOutputStream* asseet_file_stream = nullptr) = 0; + virtual void WriteAssets(util::FileOutputStream* assert_file_stream, format::ThreadId thread_id) = 0; virtual CaptureSettings::TraceSettings GetDefaultTraceSettings(); @@ -156,6 +157,7 @@ class ApiCaptureManager uint16_t GetDescriptorMask() const { return common_manager_->GetDescriptorMask(); } uint64_t GetShaderIDMask() const { return common_manager_->GetShaderIDMask(); } uint64_t GetBlockIndex() const { return common_manager_->GetBlockIndex(); } + void SetWriteAssets() const { return common_manager_->SetWriteAssets(); } bool GetForceFileFlush() const { return common_manager_->GetForceFileFlush(); } CaptureSettings::MemoryTrackingMode GetMemoryTrackingMode() const diff --git a/framework/encode/capture_manager.cpp b/framework/encode/capture_manager.cpp index dc83a4d402..cf560fcbdc 100644 --- a/framework/encode/capture_manager.cpp +++ b/framework/encode/capture_manager.cpp @@ -104,7 +104,8 @@ CommonCaptureManager::CommonCaptureManager() : previous_runtime_trigger_state_(CaptureSettings::RuntimeTriggerState::kNotUsed), debug_layer_(false), debug_device_lost_(false), screenshot_prefix_(""), screenshots_enabled_(false), disable_dxr_(false), accel_struct_padding_(0), iunknown_wrapping_(false), force_command_serialization_(false), queue_zero_only_(false), - allow_pipeline_compile_required_(false), quit_after_frame_ranges_(false), use_asset_file_(false), block_index_(0) + allow_pipeline_compile_required_(false), quit_after_frame_ranges_(false), use_asset_file_(false), block_index_(0), + write_assets_(false) {} CommonCaptureManager::~CommonCaptureManager() @@ -784,6 +785,21 @@ void CommonCaptureManager::CheckStartCaptureForTrackMode(format::ApiFamilyId api capture_mode_ = kModeDisabled; } } + else if (write_assets_ && capture_mode_ == kModeTrack) + { + capture_mode_ |= kModeWrite; + + auto thread_data = GetThreadData(); + assert(thread_data != nullptr); + + for (auto& manager : api_capture_managers_) + { + manager.first->WriteAssets(asset_file_stream_.get(), thread_data->thread_id_); + } + + capture_mode_ = kModeTrack; + write_assets_ = false; + } } bool CommonCaptureManager::ShouldTriggerScreenshot() @@ -1114,6 +1130,8 @@ void CommonCaptureManager::ActivateTrimming() manager.first->WriteTrackedState( file_stream_.get(), thread_data->thread_id_, use_asset_file_ ? asset_file_stream_.get() : nullptr); } + + write_assets_ = false; } void CommonCaptureManager::DeactivateTrimming() diff --git a/framework/encode/capture_manager.h b/framework/encode/capture_manager.h index dc4a76577f..60dc65ef34 100644 --- a/framework/encode/capture_manager.h +++ b/framework/encode/capture_manager.h @@ -313,6 +313,8 @@ class CommonCaptureManager GetThreadData()->block_index_ = block_index_; } + void SetWriteAssets() { write_assets_ = true; } + protected: std::unique_ptr compressor_; std::mutex mapped_memory_lock_; @@ -384,6 +386,7 @@ class CommonCaptureManager bool allow_pipeline_compile_required_; bool quit_after_frame_ranges_; bool use_asset_file_; + bool write_assets_; struct { diff --git a/framework/encode/custom_layer_func_table.h b/framework/encode/custom_layer_func_table.h index 80f0885aea..1faa2291db 100644 --- a/framework/encode/custom_layer_func_table.h +++ b/framework/encode/custom_layer_func_table.h @@ -32,7 +32,8 @@ GFXRECON_BEGIN_NAMESPACE(gfxrecon) const std::unordered_map custom_func_table = { - { "GetBlockIndexGFXR", reinterpret_cast(encode::GetBlockIndexGFXR) } + { "GetBlockIndexGFXR", reinterpret_cast(encode::GetBlockIndexGFXR) }, + { "DumpDirtyAssetsGFXR", reinterpret_cast(encode::WriteAssetsGFXR) } }; GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/custom_vulkan_api_call_encoders.cpp b/framework/encode/custom_vulkan_api_call_encoders.cpp index efc01ff1ee..0b5b4ae29a 100644 --- a/framework/encode/custom_vulkan_api_call_encoders.cpp +++ b/framework/encode/custom_vulkan_api_call_encoders.cpp @@ -472,6 +472,12 @@ VKAPI_ATTR uint64_t VKAPI_CALL GetBlockIndexGFXR() return manager->GetBlockIndex(); } +VKAPI_ATTR void VKAPI_CALL WriteAssetsGFXR() +{ + VulkanCaptureManager* manager = VulkanCaptureManager::Get(); + manager->SetWriteAssets(); +} + VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, diff --git a/framework/encode/custom_vulkan_api_call_encoders.h b/framework/encode/custom_vulkan_api_call_encoders.h index 7c9869fa43..edf23ce24d 100644 --- a/framework/encode/custom_vulkan_api_call_encoders.h +++ b/framework/encode/custom_vulkan_api_call_encoders.h @@ -64,6 +64,8 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyAccelerationStructureKHR(VkDevice VKAPI_ATTR uint64_t VKAPI_CALL GetBlockIndexGFXR(); +VKAPI_ATTR void VKAPI_CALL WriteAssetsGFXR(); + VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, diff --git a/framework/encode/vulkan_capture_manager.cpp b/framework/encode/vulkan_capture_manager.cpp index 4bf41f1c6f..67d380e0e0 100644 --- a/framework/encode/vulkan_capture_manager.cpp +++ b/framework/encode/vulkan_capture_manager.cpp @@ -109,6 +109,12 @@ void VulkanCaptureManager::WriteTrackedState(util::FileOutputStream* file_stream common_manager_->IncrementBlockIndex(n_blocks); } +void VulkanCaptureManager::WriteAssets(util::FileOutputStream* assert_file_stream, format::ThreadId thread_id) +{ + assert(state_tracker_ != nullptr); + state_tracker_->WriteAssets(assert_file_stream, thread_id, GetCompressor()); +} + void VulkanCaptureManager::SetLayerFuncs(PFN_vkCreateInstance create_instance, PFN_vkCreateDevice create_device) { assert((create_instance != nullptr) && (create_device != nullptr)); diff --git a/framework/encode/vulkan_capture_manager.h b/framework/encode/vulkan_capture_manager.h index 271446d382..de097f831a 100644 --- a/framework/encode/vulkan_capture_manager.h +++ b/framework/encode/vulkan_capture_manager.h @@ -1559,6 +1559,8 @@ class VulkanCaptureManager : public ApiCaptureManager format::ThreadId thread_id, util::FileOutputStream* assert_file_stream = nullptr) override; + virtual void WriteAssets(util::FileOutputStream* assert_file_stream, format::ThreadId thread_id) override; + private: struct HardwareBufferInfo { diff --git a/framework/encode/vulkan_state_tracker.h b/framework/encode/vulkan_state_tracker.h index a86fa422e6..a108e55450 100644 --- a/framework/encode/vulkan_state_tracker.h +++ b/framework/encode/vulkan_state_tracker.h @@ -70,6 +70,17 @@ class VulkanStateTracker return state_writer.WriteState(state_table_, frame_number); } + uint64_t + WriteAssets(util::FileOutputStream* asset_file_stream, format::ThreadId thread_id, util::Compressor* compressor) + { + assert(asset_file_stream != nullptr); + + VulkanStateWriter state_writer(nullptr, compressor, thread_id, asset_file_stream, &asset_file_offsets_); + + std::unique_lock lock(state_table_mutex_); + return state_writer.WriteAssets(state_table_); + } + template void AddEntry(ParentHandle parent_handle, typename Wrapper::HandleType* new_handle, diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index 736fa51e52..a38ecaf2a2 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -95,6 +95,16 @@ VulkanStateWriter::VulkanStateWriter(util::FileOutputStream* outp VulkanStateWriter::~VulkanStateWriter() {} +uint64_t VulkanStateWriter::WriteAssets(const VulkanStateTable& state_table) +{ + blocks_written_ = 0; + + WriteResourceMemoryState(state_table, false); + WriteDescriptorSetStateWithAssetFile(state_table); + + return blocks_written_; +} + uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint64_t frame_number) { // clang-format off @@ -143,7 +153,7 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint // Bind memory after buffer/image creation and memory allocation. The buffer/image needs to be created before memory // allocation for extensions like dedicated allocation that require a valid buffer/image handle at memory allocation. - WriteResourceMemoryState(state_table); + WriteResourceMemoryState(state_table, true); // Map memory after uploading resource data to buffers and images, which may require mapping resource memory ranges. WriteMappedMemoryState(state_table); @@ -970,14 +980,19 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa (*asset_file_offsets_)[wrapper->handle_id] = offset; WriteFunctionCall( wrapper->set_layout_dependency.create_call_id, dep_create_parameters, asset_file_stream_); - WriteExecuteFromFile(1, offset); + if (output_stream_ != nullptr) + { + WriteExecuteFromFile(1, offset); + } } else { - assert((*asset_file_offsets_).find(wrapper->handle_id) != (*asset_file_offsets_).end()); - - const int64_t offset = (*asset_file_offsets_)[wrapper->handle_id]; - WriteExecuteFromFile(1, offset); + if (output_stream_ != nullptr) + { + assert((*asset_file_offsets_).find(wrapper->handle_id) != (*asset_file_offsets_).end()); + const int64_t offset = (*asset_file_offsets_)[wrapper->handle_id]; + WriteExecuteFromFile(1, offset); + } } } } @@ -1079,7 +1094,10 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa } } - WriteExecuteFromFile(n_blocks, offset); + if (output_stream_ != nullptr) + { + WriteExecuteFromFile(n_blocks, offset); + } if (wrapper->dirty) { @@ -1691,7 +1709,10 @@ void VulkanStateWriter::ProcessBufferMemoryWithAssetFile(const vulkan_wrappers:: asset_file_stream_->Write(bytes, data_size); (*asset_file_offsets_)[buffer_wrapper->handle_id] = offset; - WriteExecuteFromFile(1, offset); + if (output_stream_ != nullptr) + { + WriteExecuteFromFile(1, offset); + } ++blocks_written_; @@ -1708,11 +1729,12 @@ void VulkanStateWriter::ProcessBufferMemoryWithAssetFile(const vulkan_wrappers:: } else { - assert((*asset_file_offsets_).find(buffer_wrapper->handle_id) != (*asset_file_offsets_).end()); - - const int64_t offset = (*asset_file_offsets_)[buffer_wrapper->handle_id]; - - WriteExecuteFromFile(1, offset); + if (output_stream_ != nullptr) + { + assert((*asset_file_offsets_).find(buffer_wrapper->handle_id) != (*asset_file_offsets_).end()); + const int64_t offset = (*asset_file_offsets_)[buffer_wrapper->handle_id]; + WriteExecuteFromFile(1, offset); + } } } } @@ -2007,7 +2029,10 @@ void VulkanStateWriter::ProcessImageMemoryWithAssetFile(const vulkan_wrappers::D asset_file_stream_->Write(snapshot_entry.level_sizes.data(), levels_size); asset_file_stream_->Write(bytes, data_size); - WriteExecuteFromFile(1, offset); + if (output_stream_ != nullptr) + { + WriteExecuteFromFile(1, offset); + } if (!snapshot_entry.need_staging_copy && memory_wrapper->mapped_data == nullptr) { @@ -2016,12 +2041,15 @@ void VulkanStateWriter::ProcessImageMemoryWithAssetFile(const vulkan_wrappers::D } else { - // Write a packet without resource data; replay must still perform a layout transition at image - // initialization. - upload_cmd.data_size = 0; - upload_cmd.level_count = 0; + if (output_stream_ != nullptr) + { + // Write a packet without resource data; replay must still perform a layout transition at image + // initialization. + upload_cmd.data_size = 0; + upload_cmd.level_count = 0; - output_stream_->Write(&upload_cmd, sizeof(upload_cmd)); + output_stream_->Write(&upload_cmd, sizeof(upload_cmd)); + } } ++blocks_written_; @@ -2029,11 +2057,12 @@ void VulkanStateWriter::ProcessImageMemoryWithAssetFile(const vulkan_wrappers::D } else { - assert((*asset_file_offsets_).find(image_wrapper->handle_id) != (*asset_file_offsets_).end()); - - const int64_t offset = (*asset_file_offsets_)[image_wrapper->handle_id]; - - WriteExecuteFromFile(1, offset); + if (output_stream_ != nullptr) + { + assert((*asset_file_offsets_).find(image_wrapper->handle_id) != (*asset_file_offsets_).end()); + const int64_t offset = (*asset_file_offsets_)[image_wrapper->handle_id]; + WriteExecuteFromFile(1, offset); + } } } } @@ -2041,7 +2070,8 @@ void VulkanStateWriter::ProcessImageMemoryWithAssetFile(const vulkan_wrappers::D void VulkanStateWriter::WriteBufferMemoryState(const VulkanStateTable& state_table, DeviceResourceTables* resources, VkDeviceSize* max_resource_size, - VkDeviceSize* max_staging_copy_size) + VkDeviceSize* max_staging_copy_size, + bool write_memory_state) { assert((resources != nullptr) && (max_resource_size != nullptr) && (max_staging_copy_size != nullptr)); @@ -2055,50 +2085,54 @@ void VulkanStateWriter::WriteBufferMemoryState(const VulkanStateTable& state_tab if (memory_wrapper != nullptr) { const vulkan_wrappers::DeviceWrapper* device_wrapper = wrapper->bind_device; - const VulkanDeviceTable* device_table = &device_wrapper->layer_table; - - assert((device_wrapper != nullptr) && (device_table != nullptr)); - - // Write memory requirements query before bind command. - VkMemoryRequirements memory_requirements; - - device_table->GetBufferMemoryRequirements(device_wrapper->handle, wrapper->handle, &memory_requirements); + assert(device_wrapper != nullptr); - encoder_.EncodeHandleIdValue(device_wrapper->handle_id); - encoder_.EncodeHandleIdValue(wrapper->handle_id); - EncodeStructPtr(&encoder_, &memory_requirements); + if (write_memory_state) + { + // Write memory requirements query before bind command. + VkMemoryRequirements memory_requirements; + const VulkanDeviceTable* device_table = &device_wrapper->layer_table; + assert(device_table != nullptr); - WriteFunctionCall(format::ApiCall_vkGetBufferMemoryRequirements, ¶meter_stream_); - parameter_stream_.Clear(); + device_table->GetBufferMemoryRequirements( + device_wrapper->handle, wrapper->handle, &memory_requirements); - // Write memory bind command. - if (wrapper->bind_pnext == nullptr) - { encoder_.EncodeHandleIdValue(device_wrapper->handle_id); encoder_.EncodeHandleIdValue(wrapper->handle_id); - encoder_.EncodeHandleIdValue(memory_wrapper->handle_id); - encoder_.EncodeUInt64Value(wrapper->bind_offset); - encoder_.EncodeEnumValue(VK_SUCCESS); + EncodeStructPtr(&encoder_, &memory_requirements); - WriteFunctionCall(format::ApiCall_vkBindBufferMemory, ¶meter_stream_); - } - else - { - encoder_.EncodeHandleIdValue(device_wrapper->handle_id); - encoder_.EncodeUInt32Value(1); - - VkBindBufferMemoryInfo info = {}; - info.sType = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO; - info.pNext = wrapper->bind_pnext; - info.buffer = wrapper->handle; - info.memory = memory_wrapper->handle; - info.memoryOffset = wrapper->bind_offset; - EncodeStructArray(&encoder_, &info, 1); - encoder_.EncodeEnumValue(VK_SUCCESS); + WriteFunctionCall(format::ApiCall_vkGetBufferMemoryRequirements, ¶meter_stream_); + parameter_stream_.Clear(); + + // Write memory bind command. + if (wrapper->bind_pnext == nullptr) + { + encoder_.EncodeHandleIdValue(device_wrapper->handle_id); + encoder_.EncodeHandleIdValue(wrapper->handle_id); + encoder_.EncodeHandleIdValue(memory_wrapper->handle_id); + encoder_.EncodeUInt64Value(wrapper->bind_offset); + encoder_.EncodeEnumValue(VK_SUCCESS); - WriteFunctionCall(format::ApiCall_vkBindBufferMemory2, ¶meter_stream_); + WriteFunctionCall(format::ApiCall_vkBindBufferMemory, ¶meter_stream_); + } + else + { + encoder_.EncodeHandleIdValue(device_wrapper->handle_id); + encoder_.EncodeUInt32Value(1); + + VkBindBufferMemoryInfo info = {}; + info.sType = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO; + info.pNext = wrapper->bind_pnext; + info.buffer = wrapper->handle; + info.memory = memory_wrapper->handle; + info.memoryOffset = wrapper->bind_offset; + EncodeStructArray(&encoder_, &info, 1); + encoder_.EncodeEnumValue(VK_SUCCESS); + + WriteFunctionCall(format::ApiCall_vkBindBufferMemory2, ¶meter_stream_); + } + parameter_stream_.Clear(); } - parameter_stream_.Clear(); // Group buffers with memory bindings by device for memory snapshot. ResourceSnapshotQueueFamilyTable& snapshot_table = (*resources)[device_wrapper]; @@ -2128,7 +2162,8 @@ void VulkanStateWriter::WriteBufferMemoryState(const VulkanStateTable& state_tab void VulkanStateWriter::WriteImageMemoryState(const VulkanStateTable& state_table, DeviceResourceTables* resources, VkDeviceSize* max_resource_size, - VkDeviceSize* max_staging_copy_size) + VkDeviceSize* max_staging_copy_size, + bool write_memory_state) { assert((resources != nullptr) && (max_resource_size != nullptr) && (max_staging_copy_size != nullptr)); @@ -2143,50 +2178,53 @@ void VulkanStateWriter::WriteImageMemoryState(const VulkanStateTable& state_tabl (!wrapper->is_swapchain_image && memory_wrapper != nullptr)) { const vulkan_wrappers::DeviceWrapper* device_wrapper = wrapper->bind_device; - const VulkanDeviceTable* device_table = &device_wrapper->layer_table; - - assert((device_wrapper != nullptr) && (device_table != nullptr)); + assert(device_wrapper != nullptr); // Write memory requirements query before bind command. - VkMemoryRequirements memory_requirements; - - device_table->GetImageMemoryRequirements(device_wrapper->handle, wrapper->handle, &memory_requirements); - - encoder_.EncodeHandleIdValue(device_wrapper->handle_id); - encoder_.EncodeHandleIdValue(wrapper->handle_id); - EncodeStructPtr(&encoder_, &memory_requirements); + if (write_memory_state) + { + VkMemoryRequirements memory_requirements; + const VulkanDeviceTable* device_table = &device_wrapper->layer_table; + assert(device_table != nullptr); - WriteFunctionCall(format::ApiCall_vkGetImageMemoryRequirements, ¶meter_stream_); - parameter_stream_.Clear(); + device_table->GetImageMemoryRequirements(device_wrapper->handle, wrapper->handle, &memory_requirements); - // Write memory bind command. - if (wrapper->bind_pnext == nullptr) - { encoder_.EncodeHandleIdValue(device_wrapper->handle_id); encoder_.EncodeHandleIdValue(wrapper->handle_id); - encoder_.EncodeHandleIdValue(memory_wrapper->handle_id); - encoder_.EncodeUInt64Value(wrapper->bind_offset); - encoder_.EncodeEnumValue(VK_SUCCESS); + EncodeStructPtr(&encoder_, &memory_requirements); - WriteFunctionCall(format::ApiCall_vkBindImageMemory, ¶meter_stream_); - } - else - { - encoder_.EncodeHandleIdValue(device_wrapper->handle_id); - encoder_.EncodeUInt32Value(1); - - VkBindImageMemoryInfo info = {}; - info.sType = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO; - info.pNext = wrapper->bind_pnext; - info.image = wrapper->handle; - info.memory = memory_wrapper->handle; - info.memoryOffset = wrapper->bind_offset; - EncodeStructArray(&encoder_, &info, 1); - encoder_.EncodeEnumValue(VK_SUCCESS); + WriteFunctionCall(format::ApiCall_vkGetImageMemoryRequirements, ¶meter_stream_); + parameter_stream_.Clear(); - WriteFunctionCall(format::ApiCall_vkBindImageMemory2, ¶meter_stream_); + // Write memory bind command. + if (wrapper->bind_pnext == nullptr) + { + encoder_.EncodeHandleIdValue(device_wrapper->handle_id); + encoder_.EncodeHandleIdValue(wrapper->handle_id); + encoder_.EncodeHandleIdValue(memory_wrapper->handle_id); + encoder_.EncodeUInt64Value(wrapper->bind_offset); + encoder_.EncodeEnumValue(VK_SUCCESS); + + WriteFunctionCall(format::ApiCall_vkBindImageMemory, ¶meter_stream_); + } + else + { + encoder_.EncodeHandleIdValue(device_wrapper->handle_id); + encoder_.EncodeUInt32Value(1); + + VkBindImageMemoryInfo info = {}; + info.sType = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO; + info.pNext = wrapper->bind_pnext; + info.image = wrapper->handle; + info.memory = memory_wrapper->handle; + info.memoryOffset = wrapper->bind_offset; + EncodeStructArray(&encoder_, &info, 1); + encoder_.EncodeEnumValue(VK_SUCCESS); + + WriteFunctionCall(format::ApiCall_vkBindImageMemory2, ¶meter_stream_); + } + parameter_stream_.Clear(); } - parameter_stream_.Clear(); VkMemoryPropertyFlags memory_properties = 0; if (memory_wrapper != nullptr) @@ -2254,7 +2292,7 @@ void VulkanStateWriter::WriteImageMemoryState(const VulkanStateTable& state_tabl snapshot_entry.images.emplace_back(snapshot_info); // Write image subresource layout queries for linear/host-visible images. - if (is_writable) + if (is_writable && write_memory_state) { VkImageAspectFlags aspect_flags = aspect; @@ -2314,7 +2352,7 @@ void VulkanStateWriter::WriteImageSubresourceLayouts(const vulkan_wrappers::Imag } } -void VulkanStateWriter::WriteResourceMemoryState(const VulkanStateTable& state_table) +void VulkanStateWriter::WriteResourceMemoryState(const VulkanStateTable& state_table, bool write_memory_state) { DeviceResourceTables resources; VkDeviceSize max_resource_size = 0; @@ -2322,8 +2360,8 @@ void VulkanStateWriter::WriteResourceMemoryState(const VulkanStateTable& state_t auto started = std::chrono::high_resolution_clock::now(); - WriteBufferMemoryState(state_table, &resources, &max_resource_size, &max_staging_copy_size); - WriteImageMemoryState(state_table, &resources, &max_resource_size, &max_staging_copy_size); + WriteBufferMemoryState(state_table, &resources, &max_resource_size, &max_staging_copy_size, write_memory_state); + WriteImageMemoryState(state_table, &resources, &max_resource_size, &max_staging_copy_size, write_memory_state); // Write resource memory content. for (const auto& resource_entry : resources) @@ -2346,18 +2384,21 @@ void VulkanStateWriter::WriteResourceMemoryState(const VulkanStateTable& state_t if (result == VK_SUCCESS) { - format::BeginResourceInitCommand begin_cmd; - begin_cmd.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(begin_cmd); - begin_cmd.meta_header.block_header.type = format::kMetaDataBlock; - begin_cmd.meta_header.meta_data_id = format::MakeMetaDataId( - format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kBeginResourceInitCommand); - begin_cmd.thread_id = thread_id_; - begin_cmd.device_id = device_wrapper->handle_id; - begin_cmd.max_resource_size = max_resource_size; - begin_cmd.max_copy_size = max_staging_copy_size; - - output_stream_->Write(&begin_cmd, sizeof(begin_cmd)); - ++blocks_written_; + if (output_stream_ != nullptr) + { + format::BeginResourceInitCommand begin_cmd; + begin_cmd.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(begin_cmd); + begin_cmd.meta_header.block_header.type = format::kMetaDataBlock; + begin_cmd.meta_header.meta_data_id = format::MakeMetaDataId( + format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kBeginResourceInitCommand); + begin_cmd.thread_id = thread_id_; + begin_cmd.device_id = device_wrapper->handle_id; + begin_cmd.max_resource_size = max_resource_size; + begin_cmd.max_copy_size = max_staging_copy_size; + + output_stream_->Write(&begin_cmd, sizeof(begin_cmd)); + ++blocks_written_; + } for (const auto& queue_family_entry : resource_entry.second) { @@ -2373,16 +2414,19 @@ void VulkanStateWriter::WriteResourceMemoryState(const VulkanStateTable& state_t } } - format::EndResourceInitCommand end_cmd; - end_cmd.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(end_cmd); - end_cmd.meta_header.block_header.type = format::kMetaDataBlock; - end_cmd.meta_header.meta_data_id = format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_Vulkan, - format::MetaDataType::kEndResourceInitCommand); - end_cmd.thread_id = thread_id_; - end_cmd.device_id = device_wrapper->handle_id; + if (output_stream_ != nullptr) + { + format::EndResourceInitCommand end_cmd; + end_cmd.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(end_cmd); + end_cmd.meta_header.block_header.type = format::kMetaDataBlock; + end_cmd.meta_header.meta_data_id = format::MakeMetaDataId( + format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kEndResourceInitCommand); + end_cmd.thread_id = thread_id_; + end_cmd.device_id = device_wrapper->handle_id; - output_stream_->Write(&end_cmd, sizeof(end_cmd)); - ++blocks_written_; + output_stream_->Write(&end_cmd, sizeof(end_cmd)); + ++blocks_written_; + } } else { diff --git a/framework/encode/vulkan_state_writer.h b/framework/encode/vulkan_state_writer.h index 810c1f26ab..9992342ac9 100644 --- a/framework/encode/vulkan_state_writer.h +++ b/framework/encode/vulkan_state_writer.h @@ -60,6 +60,8 @@ class VulkanStateWriter // Returns number of blocks written to the output_stream. uint64_t WriteState(const VulkanStateTable& state_table, uint64_t frame_number); + uint64_t WriteAssets(const VulkanStateTable& state_table); + private: // Data structures for processing resource memory snapshots. struct BufferSnapshotInfo @@ -172,17 +174,19 @@ class VulkanStateWriter void WriteBufferMemoryState(const VulkanStateTable& state_table, DeviceResourceTables* resources, VkDeviceSize* max_resource_size, - VkDeviceSize* max_staging_copy_size); + VkDeviceSize* max_staging_copy_size, + bool write_memory_state); void WriteImageMemoryState(const VulkanStateTable& state_table, DeviceResourceTables* resources, VkDeviceSize* max_resource_size, - VkDeviceSize* max_staging_copy_size); + VkDeviceSize* max_staging_copy_size, + bool write_memory_state); void WriteImageSubresourceLayouts(const vulkan_wrappers::ImageWrapper* image_wrapper, VkImageAspectFlags aspect_flags); - void WriteResourceMemoryState(const VulkanStateTable& state_table); + void WriteResourceMemoryState(const VulkanStateTable& state_table, bool write_memory_state); void WriteMappedMemoryState(const VulkanStateTable& state_table); From 9ecd5d9c2cd97b42e1048cfba51392cf2180e569 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sat, 3 Aug 2024 10:01:41 +0300 Subject: [PATCH 35/99] Dump assets is also controled by an android setting Android setting capture_android_dump_assets can trigger an asset dump in the asset file. --- USAGE_android.md | 1 + framework/encode/api_capture_manager.h | 2 - framework/encode/capture_manager.cpp | 87 +++++++++++++++--------- framework/encode/capture_manager.h | 6 +- framework/encode/capture_settings.cpp | 14 ++++ framework/encode/capture_settings.h | 1 + framework/encode/vulkan_state_writer.cpp | 2 +- 7 files changed, 75 insertions(+), 38 deletions(-) diff --git a/USAGE_android.md b/USAGE_android.md index 27d4d21173..891f97226e 100644 --- a/USAGE_android.md +++ b/USAGE_android.md @@ -307,6 +307,7 @@ option values. | Quit after capturing frame ranges | debug.gfxrecon.quit_after_capture_frames | BOOL | Setting it to `true` will force the application to terminate once all frame ranges specified by `debug.gfxrecon.capture_frames` have been captured. Default is: `false` | | Capture trigger for Android | debug.gfxrecon.capture_android_trigger | BOOL | Set during runtime to `true` to start capturing and to `false` to stop. If not set at all then it is disabled (non-trimmed capture). Default is not set. | | Use asset file | debug.gfxrecon.capture_use_asset_file | BOOL | When set to `true` assets (images, buffers and descriptors) will be stored separately into an asset file instead of the capture file. | +| Use asset file | debug.gfxrecon.capture_android_dump_assets | BOOL | Setting this triggers a dump of all assets into the asset file. Since android options cannot be set by the layer, dumping is done whenever this option switches between from `false` to `true` or from `true` to `false`. Default is: `false` | | Capture File Compression Type | debug.gfxrecon.capture_compression_type | STRING | Compression format to use with the capture file. Valid values are: `LZ4`, `ZLIB`, `ZSTD`, and `NONE`. Default is: `LZ4` | | Capture File Timestamp | debug.gfxrecon.capture_file_timestamp | BOOL | Add a timestamp to the capture file as described by [Timestamps](#timestamps). Default is: `true` | | Capture File Flush After Write | debug.gfxrecon.capture_file_flush | BOOL | Flush output stream after each packet is written to the capture file. Default is: `false` | diff --git a/framework/encode/api_capture_manager.h b/framework/encode/api_capture_manager.h index 317ccc5034..f9f4282271 100644 --- a/framework/encode/api_capture_manager.h +++ b/framework/encode/api_capture_manager.h @@ -120,8 +120,6 @@ class ApiCaptureManager bool IsTrimHotkeyPressed() { return common_manager_->IsTrimHotkeyPressed(); } - CaptureSettings::RuntimeTriggerState GetRuntimeTriggerState() { return common_manager_->GetRuntimeTriggerState(); } - bool RuntimeTriggerEnabled() { return common_manager_->RuntimeTriggerEnabled(); } bool RuntimeTriggerDisabled() { return common_manager_->RuntimeTriggerDisabled(); } diff --git a/framework/encode/capture_manager.cpp b/framework/encode/capture_manager.cpp index cf560fcbdc..58a077c636 100644 --- a/framework/encode/capture_manager.cpp +++ b/framework/encode/capture_manager.cpp @@ -22,6 +22,7 @@ ** DEALINGS IN THE SOFTWARE. */ +#include "encode/capture_settings.h" #include #include PROJECT_VERSION_HEADER_FILE @@ -105,7 +106,7 @@ CommonCaptureManager::CommonCaptureManager() : debug_device_lost_(false), screenshot_prefix_(""), screenshots_enabled_(false), disable_dxr_(false), accel_struct_padding_(0), iunknown_wrapping_(false), force_command_serialization_(false), queue_zero_only_(false), allow_pipeline_compile_required_(false), quit_after_frame_ranges_(false), use_asset_file_(false), block_index_(0), - write_assets_(false) + write_assets_(false), previous_write_assets_(false) {} CommonCaptureManager::~CommonCaptureManager() @@ -651,17 +652,11 @@ bool CommonCaptureManager::IsTrimHotkeyPressed() return hotkey_pressed; } -CaptureSettings::RuntimeTriggerState CommonCaptureManager::GetRuntimeTriggerState() +bool CommonCaptureManager::RuntimeTriggerEnabled() { CaptureSettings settings; CaptureSettings::LoadRunTimeEnvVarSettings(&settings); - - return settings.GetTraceSettings().runtime_capture_trigger; -} - -bool CommonCaptureManager::RuntimeTriggerEnabled() -{ - CaptureSettings::RuntimeTriggerState state = GetRuntimeTriggerState(); + CaptureSettings::RuntimeTriggerState state = settings.GetTraceSettings().runtime_capture_trigger; bool result = (state == CaptureSettings::RuntimeTriggerState::kEnabled && (previous_runtime_trigger_state_ == CaptureSettings::RuntimeTriggerState::kDisabled || @@ -674,7 +669,9 @@ bool CommonCaptureManager::RuntimeTriggerEnabled() bool CommonCaptureManager::RuntimeTriggerDisabled() { - CaptureSettings::RuntimeTriggerState state = GetRuntimeTriggerState(); + CaptureSettings settings; + CaptureSettings::LoadRunTimeEnvVarSettings(&settings); + CaptureSettings::RuntimeTriggerState state = settings.GetTraceSettings().runtime_capture_trigger; bool result = ((state == CaptureSettings::RuntimeTriggerState::kDisabled || state == CaptureSettings::RuntimeTriggerState::kNotUsed) && @@ -685,6 +682,24 @@ bool CommonCaptureManager::RuntimeTriggerDisabled() return result; } +bool CommonCaptureManager::RuntimeWriteAssetsEnabled() +{ + CaptureSettings settings; + CaptureSettings::LoadRunTimeEnvVarSettings(&settings); + bool write_assets = settings.GetTraceSettings().runtime_write_assets; + + if (previous_write_assets_ != write_assets) + { + write_assets_ = true; + previous_write_assets_ = write_assets; + return true; + } + else + { + return false; + } +} + void CommonCaptureManager::CheckContinueCaptureForWriteMode(format::ApiFamilyId api_family, uint32_t current_boundary_count) { @@ -785,13 +800,18 @@ void CommonCaptureManager::CheckStartCaptureForTrackMode(format::ApiFamilyId api capture_mode_ = kModeDisabled; } } - else if (write_assets_ && capture_mode_ == kModeTrack) + else if ((RuntimeWriteAssetsEnabled() || write_assets_) && capture_mode_ == kModeTrack) { capture_mode_ |= kModeWrite; auto thread_data = GetThreadData(); assert(thread_data != nullptr); + if (asset_file_stream_.get() == nullptr) + { + CreateAssetFile(); + } + for (auto& manager : api_capture_managers_) { manager.first->WriteAssets(asset_file_stream_.get(), thread_data->thread_id_); @@ -942,17 +962,35 @@ std::string CommonCaptureManager::CreateTrimFilename(const std::string& base return util::filepath::InsertFilenamePostfix(base_filename, range_string); } -std::string CommonCaptureManager::CreateAssetFilename(const std::string& base_filename) const +std::string CommonCaptureManager::CreateAssetFile() { - GFXRECON_WRITE_CONSOLE("%s()", __func__) - GFXRECON_WRITE_CONSOLE(" base_filename: %s", base_filename.c_str()) + std::string asset_file_name = CreateAssetFilename(base_filename_); + if (timestamp_filename_) + { + asset_file_name = util::filepath::GenerateTimestampedFilename(asset_file_name); + } + + asset_file_stream_ = std::make_unique(asset_file_name, kFileStreamBufferSize); + if (asset_file_stream_->IsValid()) + { + WriteAssetFileHeader(); + } + else + { + asset_file_stream_ = nullptr; + } + + return asset_file_name; +} + +std::string CommonCaptureManager::CreateAssetFilename(const std::string& base_filename) const +{ std::string asset_filename = base_filename; size_t dot_pos = base_filename.rfind('.'); if (dot_pos != std::string::npos) { - GFXRECON_WRITE_CONSOLE("base_filename.substr(dot_pos): %s", base_filename.substr(dot_pos).c_str()) if (base_filename.substr(dot_pos) == ".gfxr") { asset_filename.insert(dot_pos, "_asset_file"); @@ -1097,22 +1135,7 @@ bool CommonCaptureManager::CreateCaptureFile(format::ApiFamilyId api_family, con // Create asset file if (trim_enabled_ && use_asset_file_ && asset_file_stream_.get() == nullptr) { - std::string asset_file_name = CreateAssetFilename(base_filename_); - - if (timestamp_filename_) - { - asset_file_name = util::filepath::GenerateTimestampedFilename(asset_file_name); - } - - asset_file_stream_ = std::make_unique(asset_file_name, kFileStreamBufferSize); - if (asset_file_stream_->IsValid()) - { - WriteAssetFileHeader(); - } - else - { - asset_file_stream_ = nullptr; - } + CreateAssetFile(); } return success; @@ -1130,8 +1153,6 @@ void CommonCaptureManager::ActivateTrimming() manager.first->WriteTrackedState( file_stream_.get(), thread_data->thread_id_, use_asset_file_ ? asset_file_stream_.get() : nullptr); } - - write_assets_ = false; } void CommonCaptureManager::DeactivateTrimming() diff --git a/framework/encode/capture_manager.h b/framework/encode/capture_manager.h index 60dc65ef34..11e6fb93a7 100644 --- a/framework/encode/capture_manager.h +++ b/framework/encode/capture_manager.h @@ -134,12 +134,12 @@ class CommonCaptureManager bool IsTrimHotkeyPressed(); - CaptureSettings::RuntimeTriggerState GetRuntimeTriggerState(); - bool RuntimeTriggerEnabled(); bool RuntimeTriggerDisabled(); + bool RuntimeWriteAssetsEnabled(); + void WriteDisplayMessageCmd(format::ApiFamilyId api_family, const char* message); void WriteExeFileInfo(format::ApiFamilyId api_family, const gfxrecon::util::filepath::FileInfo& info); @@ -264,6 +264,7 @@ class CommonCaptureManager util::ScreenshotFormat GetScreenShotFormat() const { return screenshot_format_; } std::string CreateTrimFilename(const std::string& base_filename, const util::UintRange& trim_range); + std::string CreateAssetFile(); std::string CreateAssetFilename(const std::string& base_filename) const; bool CreateCaptureFile(format::ApiFamilyId api_family, const std::string& base_filename); void WriteCaptureOptions(std::string& operation_annotation); @@ -387,6 +388,7 @@ class CommonCaptureManager bool quit_after_frame_ranges_; bool use_asset_file_; bool write_assets_; + bool previous_write_assets_; struct { diff --git a/framework/encode/capture_settings.cpp b/framework/encode/capture_settings.cpp index af6c95da11..123d07c67a 100644 --- a/framework/encode/capture_settings.cpp +++ b/framework/encode/capture_settings.cpp @@ -91,6 +91,8 @@ GFXRECON_BEGIN_NAMESPACE(encode) #define CAPTURE_TRIGGER_FRAMES_UPPER "CAPTURE_TRIGGER_FRAMES" #define CAPTURE_ANDROID_TRIGGER_LOWER "capture_android_trigger" #define CAPTURE_ANDROID_TRIGGER_UPPER "CAPTURE_ANDROID_TRIGGER" +#define CAPTURE_ANDROID_DUMP_ASSETS_LOWER "capture_android_dump_assets" +#define CAPTURE_ANDROID_DUMP_ASSETS_UPPER "CAPTURE_ANDROID_DUMP_ASSETS" #define CAPTURE_IUNKNOWN_WRAPPING_LOWER "capture_iunknown_wrapping" #define CAPTURE_IUNKNOWN_WRAPPING_UPPER "CAPTURE_IUNKNOWN_WRAPPING" #define CAPTURE_QUEUE_SUBMITS_LOWER "capture_queue_submits" @@ -182,6 +184,7 @@ const char kPageGuardSignalHandlerWatcherMaxRestoresEnvVar[] = GFXRECON_ENV_VAR_ const char kDebugLayerEnvVar[] = GFXRECON_ENV_VAR_PREFIX DEBUG_LAYER_LOWER; const char kDebugDeviceLostEnvVar[] = GFXRECON_ENV_VAR_PREFIX DEBUG_DEVICE_LOST_LOWER; const char kCaptureAndroidTriggerEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_ANDROID_TRIGGER_LOWER; +const char kCaptureAndroidDumpAssetsEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_ANDROID_DUMP_ASSETS_LOWER; const char kDisableDxrEnvVar[] = GFXRECON_ENV_VAR_PREFIX DISABLE_DXR_LOWER; const char kAccelStructPaddingEnvVar[] = GFXRECON_ENV_VAR_PREFIX ACCEL_STRUCT_PADDING_LOWER; const char kForceCommandSerializationEnvVar[] = GFXRECON_ENV_VAR_PREFIX FORCE_COMMAND_SERIALIZATION_LOWER; @@ -351,6 +354,17 @@ void CaptureSettings::LoadRunTimeEnvVarSettings(CaptureSettings* settings) { settings->trace_settings_.trim_boundary = TrimBoundary::kFrames; } + + value = util::platform::GetEnv(kCaptureAndroidDumpAssetsEnvVar); + if (value.empty()) + { + settings->trace_settings_.runtime_write_assets = false; + } + else + { + settings->trace_settings_.runtime_write_assets = + ParseBoolString(value, settings->trace_settings_.runtime_write_assets); + } } #endif } diff --git a/framework/encode/capture_settings.h b/framework/encode/capture_settings.h index 0adf54aa90..0d6be3966d 100644 --- a/framework/encode/capture_settings.h +++ b/framework/encode/capture_settings.h @@ -102,6 +102,7 @@ class CaptureSettings std::string trim_key; uint32_t trim_key_frames{ 0 }; RuntimeTriggerState runtime_capture_trigger{ kNotUsed }; + bool runtime_write_assets{ false }; int page_guard_signal_handler_watcher_max_restores{ 1 }; bool page_guard_copy_on_map{ util::PageGuardManager::kDefaultEnableCopyOnMap }; bool page_guard_separate_read{ util::PageGuardManager::kDefaultEnableSeparateRead }; diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index a38ecaf2a2..74066412fc 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -90,7 +90,7 @@ VulkanStateWriter::VulkanStateWriter(util::FileOutputStream* outp compressor_(compressor), thread_id_(thread_id), encoder_(¶meter_stream_), asset_file_stream_(asset_file_stream), asset_file_offsets_(asset_file_offsets) { - assert(output_stream != nullptr); + assert(output_stream != nullptr || asset_file_stream != nullptr); } VulkanStateWriter::~VulkanStateWriter() {} From 9d61e61618be27c19e34ac880e4761cfae94e081 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sat, 3 Aug 2024 10:03:55 +0300 Subject: [PATCH 36/99] Fix formatting --- framework/encode/vulkan_capture_manager.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/framework/encode/vulkan_capture_manager.h b/framework/encode/vulkan_capture_manager.h index de097f831a..74654363a7 100644 --- a/framework/encode/vulkan_capture_manager.h +++ b/framework/encode/vulkan_capture_manager.h @@ -1257,7 +1257,10 @@ class VulkanCaptureManager : public ApiCaptureManager void PostProcess_vkCmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); - void PostProcess_vkFrameBoundaryANDROID(VkDevice device, VkSemaphore semaphore, VkImage image) { EndFrame(); } + void PostProcess_vkFrameBoundaryANDROID(VkDevice device, VkSemaphore semaphore, VkImage image) + { + EndFrame(); + } void PostProcess_vkCmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo); @@ -1551,9 +1554,15 @@ class VulkanCaptureManager : public ApiCaptureManager virtual ~VulkanCaptureManager() {} - virtual void CreateStateTracker() override { state_tracker_ = std::make_unique(); } + virtual void CreateStateTracker() override + { + state_tracker_ = std::make_unique(); + } - virtual void DestroyStateTracker() override { state_tracker_ = nullptr; } + virtual void DestroyStateTracker() override + { + state_tracker_ = nullptr; + } virtual void WriteTrackedState(util::FileOutputStream* file_stream, format::ThreadId thread_id, From 1347c039236264de27c4ba77d9d882c8f238c2bc Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sat, 3 Aug 2024 10:05:58 +0300 Subject: [PATCH 37/99] Fix windows build --- framework/encode/d3d12_capture_manager.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/framework/encode/d3d12_capture_manager.h b/framework/encode/d3d12_capture_manager.h index 131d653e35..30224666ad 100644 --- a/framework/encode/d3d12_capture_manager.h +++ b/framework/encode/d3d12_capture_manager.h @@ -773,6 +773,8 @@ class D3D12CaptureManager : public ApiCaptureManager format::ThreadId thread_id, util::FileOutputStream* asset_file_stream = nullptr) override; + virtual void WriteAssets(util::FileOutputStream* assert_file_stream, format::ThreadId thread_id) override {} + void PreAcquireSwapChainImages(IDXGISwapChain_Wrapper* wrapper, IUnknown* command_queue, uint32_t image_count, From 7dd618470f57421c2eb1d72f140dfd444e2eb084 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sat, 3 Aug 2024 10:10:37 +0300 Subject: [PATCH 38/99] Fix formatting --- framework/encode/capture_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/encode/capture_manager.cpp b/framework/encode/capture_manager.cpp index 58a077c636..3cb9527a2f 100644 --- a/framework/encode/capture_manager.cpp +++ b/framework/encode/capture_manager.cpp @@ -690,7 +690,7 @@ bool CommonCaptureManager::RuntimeWriteAssetsEnabled() if (previous_write_assets_ != write_assets) { - write_assets_ = true; + write_assets_ = true; previous_write_assets_ = write_assets; return true; } From d3d889f51adb3ec73276b202d36b06905623ede4 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 5 Aug 2024 09:45:23 +0300 Subject: [PATCH 39/99] Track secondary command buffers --- framework/encode/vulkan_capture_manager.cpp | 28 +------ framework/encode/vulkan_handle_wrappers.h | 5 +- framework/encode/vulkan_state_tracker.cpp | 81 ++++++++++++++++----- framework/encode/vulkan_state_tracker.h | 8 +- 4 files changed, 75 insertions(+), 47 deletions(-) diff --git a/framework/encode/vulkan_capture_manager.cpp b/framework/encode/vulkan_capture_manager.cpp index 67d380e0e0..863acbe045 100644 --- a/framework/encode/vulkan_capture_manager.cpp +++ b/framework/encode/vulkan_capture_manager.cpp @@ -2464,20 +2464,10 @@ void VulkanCaptureManager::PreProcess_vkQueueSubmit(VkQueue queue, GFXRECON_UNREFERENCED_PARAMETER(fence); // This must be done before QueueSubmitWriteFillMemoryCmd is called - // and tracked mapped memory regions are reseted + // and tracked mapped memory regions are resetted if (IsCaptureModeTrack()) { - if (pSubmits) - { - for (uint32_t s = 0; s < submitCount; ++s) - { - for (uint32_t c = 0; c < pSubmits[s].commandBufferCount; ++c) - { - state_tracker_->TrackMappedAssetsWrites(pSubmits[s].pCommandBuffers[c]); - state_tracker_->MarkReferencedAssetsAsDirty(pSubmits[s].pCommandBuffers[c]); - } - } - } + state_tracker_->TrackSubmission(submitCount, pSubmits); } QueueSubmitWriteFillMemoryCmd(); @@ -2508,20 +2498,10 @@ void VulkanCaptureManager::PreProcess_vkQueueSubmit2(VkQueue queue, GFXRECON_UNREFERENCED_PARAMETER(fence); // This must be done before QueueSubmitWriteFillMemoryCmd is called - // and tracked mapped memory regions are reseted + // and tracked mapped memory regions are resetted if (IsCaptureModeTrack()) { - if (pSubmits) - { - for (uint32_t s = 0; s < submitCount; ++s) - { - for (uint32_t c = 0; c < pSubmits[s].commandBufferInfoCount; ++c) - { - state_tracker_->TrackMappedAssetsWrites(pSubmits[s].pCommandBufferInfos[c].commandBuffer); - state_tracker_->MarkReferencedAssetsAsDirty(pSubmits[s].pCommandBufferInfos[c].commandBuffer); - } - } - } + state_tracker_->TrackSubmission(submitCount, pSubmits); } QueueSubmitWriteFillMemoryCmd(); diff --git a/framework/encode/vulkan_handle_wrappers.h b/framework/encode/vulkan_handle_wrappers.h index f3d6298d6a..e7fe83289a 100644 --- a/framework/encode/vulkan_handle_wrappers.h +++ b/framework/encode/vulkan_handle_wrappers.h @@ -225,8 +225,8 @@ struct DeviceMemoryWrapper : public HandleWrapper format::HandleId device_id{ format::kNullHandleId }; VkDeviceAddress address{ 0 }; - std::map bound_assets; - std::mutex asset_map_lock; + std::unordered_set bound_assets; + std::mutex asset_map_lock; }; struct BufferViewWrapper : public HandleWrapper @@ -406,6 +406,7 @@ struct CommandBufferWrapper : public HandleWrapper bound_descriptors[vulkan_state_info::PipelineBindPoints::kBindPoint_count]; std::unordered_set modified_assets; + std::vector secondaries; }; struct DeferredOperationKHRWrapper : public HandleWrapper diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index c3ddc8a422..7d959eb052 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -22,6 +22,7 @@ #include "encode/vulkan_state_tracker.h" +#include "decode/vulkan_object_info.h" #include "encode/vulkan_handle_wrappers.h" #include "encode/vulkan_state_info.h" #include "encode/custom_vulkan_struct_handle_wrappers.h" @@ -61,7 +62,7 @@ void VulkanStateTracker::TrackCommandExecution(vulkan_wrappers::CommandBufferWra wrapper->recorded_queries.clear(); wrapper->tlas_build_info_map.clear(); wrapper->modified_assets.clear(); - wrapper->modified_assets.clear(); + wrapper->secondaries.clear(); for (uint32_t point = vulkan_state_info::kBindPoint_graphics; point != vulkan_state_info::kBindPoint_count; ++point) { @@ -109,7 +110,7 @@ void VulkanStateTracker::TrackResetCommandPool(VkCommandPool command_pool) entry.second->recorded_queries.clear(); entry.second->tlas_build_info_map.clear(); entry.second->modified_assets.clear(); - entry.second->modified_assets.clear(); + entry.second->secondaries.clear(); for (uint32_t point = vulkan_state_info::kBindPoint_graphics; point != vulkan_state_info::kBindPoint_count; ++point) { @@ -373,7 +374,7 @@ void VulkanStateTracker::TrackBufferMemoryBinding( vulkan_wrappers::GetWrapper(memory); assert(mem_wrapper != nullptr); mem_wrapper->asset_map_lock.lock(); - mem_wrapper->bound_assets.emplace(memoryOffset, wrapper); + mem_wrapper->bound_assets.emplace(wrapper); mem_wrapper->asset_map_lock.unlock(); if (bind_info_pnext != nullptr) @@ -444,7 +445,7 @@ void VulkanStateTracker::TrackImageMemoryBinding( vulkan_wrappers::GetWrapper(memory); assert(mem_wrapper != nullptr); mem_wrapper->asset_map_lock.lock(); - mem_wrapper->bound_assets.emplace(memoryOffset, wrapper); + mem_wrapper->bound_assets.emplace(wrapper); mem_wrapper->asset_map_lock.unlock(); if (bind_info_pnext != nullptr) @@ -538,6 +539,8 @@ void VulkanStateTracker::TrackExecuteCommands(VkCommandBuffer command_buf auto secondary_wrapper = vulkan_wrappers::GetWrapper(command_buffers[i]); assert(secondary_wrapper != nullptr); + primary_wrapper->secondaries.push_back(secondary_wrapper); + for (const auto& layout_entry : secondary_wrapper->pending_layouts) { primary_wrapper->pending_layouts[layout_entry.first] = layout_entry.second; @@ -1817,7 +1820,7 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::ImageWrapper* wrapper) if (mem_wrapper != nullptr) { mem_wrapper->asset_map_lock.lock(); - auto bind_entry = mem_wrapper->bound_assets.find(wrapper->bind_offset); + auto bind_entry = mem_wrapper->bound_assets.find(wrapper); if (bind_entry != mem_wrapper->bound_assets.end()) { mem_wrapper->bound_assets.erase(bind_entry); @@ -1837,7 +1840,7 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::BufferWrapper* wrapper) if (mem_wrapper != nullptr) { mem_wrapper->asset_map_lock.lock(); - auto bind_entry = mem_wrapper->bound_assets.find(wrapper->bind_offset); + auto bind_entry = mem_wrapper->bound_assets.find(wrapper); if (bind_entry != mem_wrapper->bound_assets.end()) { mem_wrapper->bound_assets.erase(bind_entry); @@ -2333,7 +2336,7 @@ void VulkanStateTracker::TrackCmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer c } } -void VulkanStateTracker::TrackMappedAssetsWrites(VkCommandBuffer commandBuffer) +void VulkanStateTracker::TrackMappedAssetsWrites() { util::PageGuardManager* manager = util::PageGuardManager::Get(); if (manager == nullptr) @@ -2341,10 +2344,6 @@ void VulkanStateTracker::TrackMappedAssetsWrites(VkCommandBuffer commandBuffer) return; } - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); - assert(cmd_buf_wrapper != nullptr); - std::unordered_map memories_page_status; manager->GetModifiedMemoryRegions(memories_page_status); const size_t page_size = util::platform::GetSystemPageSize(); @@ -2357,14 +2356,13 @@ void VulkanStateTracker::TrackMappedAssetsWrites(VkCommandBuffer commandBuffer) dev_mem_wrapper->asset_map_lock.lock(); for (auto& asset : dev_mem_wrapper->bound_assets) { - if (asset.second->dirty || !asset.second->size) + if (asset->dirty || !asset->size) { continue; } - const size_t first_page = asset.first / page_size; - const size_t last_page = (asset.first + asset.second->size - 1) / page_size; - + const size_t first_page = asset->bind_offset / page_size; + const size_t last_page = (asset->bind_offset + asset->size - 1) / page_size; assert(first_page <= last_page); assert(first_page <= entry.second.size()); @@ -2372,7 +2370,7 @@ void VulkanStateTracker::TrackMappedAssetsWrites(VkCommandBuffer commandBuffer) { if (entry.second[page]) { - asset.second->dirty = true; + asset->dirty = true; break; } } @@ -2660,10 +2658,8 @@ void VulkanStateTracker::TrackCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBu TrackPipelineDescriptors(cmd_buf_wrapper, vulkan_state_info::PipelineBindPoints::kBindPoint_ray_tracing); } -void VulkanStateTracker::MarkReferencedAssetsAsDirty(VkCommandBuffer commandBuffer) +void VulkanStateTracker::MarkReferencedAssetsAsDirty(vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper) { - vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper = - vulkan_wrappers::GetWrapper(commandBuffer); assert(cmd_buf_wrapper != nullptr); for (auto asset : cmd_buf_wrapper->modified_assets) @@ -2673,5 +2669,52 @@ void VulkanStateTracker::MarkReferencedAssetsAsDirty(VkCommandBuffer commandBuff } } +void VulkanStateTracker::TrackSubmission(uint32_t submitCount, const VkSubmitInfo* pSubmits) +{ + if (pSubmits != nullptr && submitCount) + { + for (uint32_t s = 0; s < submitCount; ++s) + { + for (uint32_t c = 0; c < pSubmits[s].commandBufferCount; ++c) + { + vulkan_wrappers::CommandBufferWrapper* primary = + vulkan_wrappers::GetWrapper(pSubmits[s].pCommandBuffers[c]); + MarkReferencedAssetsAsDirty(primary); + + for (const auto secondary : primary->secondaries) + { + MarkReferencedAssetsAsDirty(secondary); + } + } + } + + TrackMappedAssetsWrites(); + } +} + +void VulkanStateTracker::TrackSubmission(uint32_t submitCount, const VkSubmitInfo2* pSubmits) +{ + if (pSubmits != nullptr && submitCount) + { + for (uint32_t s = 0; s < submitCount; ++s) + { + for (uint32_t c = 0; c < pSubmits[s].commandBufferInfoCount; ++c) + { + vulkan_wrappers::CommandBufferWrapper* primary = + vulkan_wrappers::GetWrapper( + pSubmits[s].pCommandBufferInfos[c].commandBuffer); + MarkReferencedAssetsAsDirty(primary); + + for (const auto secondary : primary->secondaries) + { + MarkReferencedAssetsAsDirty(secondary); + } + } + } + + TrackMappedAssetsWrites(); + } +} + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/vulkan_state_tracker.h b/framework/encode/vulkan_state_tracker.h index a108e55450..4e8614e4d4 100644 --- a/framework/encode/vulkan_state_tracker.h +++ b/framework/encode/vulkan_state_tracker.h @@ -673,9 +673,9 @@ class VulkanStateTracker uint32_t maxDrawCount, uint32_t stride); - void TrackMappedAssetsWrites(VkCommandBuffer commandBuffer); + void TrackSubmission(uint32_t submitCount, const VkSubmitInfo* pSubmits); - void MarkReferencedAssetsAsDirty(VkCommandBuffer commandBuffer); + void TrackSubmission(uint32_t submitCount, const VkSubmitInfo2* pSubmits); private: template @@ -755,6 +755,10 @@ class VulkanStateTracker void InsertBufferAssetInCommandBuffer(VkCommandBuffer command_buffer, VkBuffer buffer); + void TrackMappedAssetsWrites(); + + void MarkReferencedAssetsAsDirty(vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper); + std::mutex state_table_mutex_; VulkanStateTable state_table_; From b54bdd49d20c01ea9d8e0b09be281410f1908871 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 5 Aug 2024 14:16:05 +0300 Subject: [PATCH 40/99] Fix bug in SetDescriptorUpdateTemplateInfo --- framework/encode/vulkan_capture_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/encode/vulkan_capture_manager.cpp b/framework/encode/vulkan_capture_manager.cpp index 863acbe045..04615b133a 100644 --- a/framework/encode/vulkan_capture_manager.cpp +++ b/framework/encode/vulkan_capture_manager.cpp @@ -473,7 +473,7 @@ void VulkanCaptureManager::SetDescriptorUpdateTemplateInfo(VkDescriptorUpdateTem entry_size = sizeof(VkDescriptorImageInfo); } - if (type == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE) + else if (type == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE) { UpdateTemplateEntryInfo image_info; image_info.binding = entry->dstBinding; From 120cac6648c21db6cbbc2fb92471cc24801cbd06 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Tue, 6 Aug 2024 09:20:10 +0300 Subject: [PATCH 41/99] There should be 3 encoded values --- framework/encode/custom_vulkan_api_call_encoders.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/framework/encode/custom_vulkan_api_call_encoders.cpp b/framework/encode/custom_vulkan_api_call_encoders.cpp index 0b5b4ae29a..d10850773b 100644 --- a/framework/encode/custom_vulkan_api_call_encoders.cpp +++ b/framework/encode/custom_vulkan_api_call_encoders.cpp @@ -170,12 +170,9 @@ static void EncodeDescriptorUpdateTemplateInfo(VulkanCaptureManager* manager // before we write the entries, so that the decoder will know up front how much memory it needs to allocate for // decoding. Optional entries must be encoded after the required entries, and must encode the number of elements // in the array as well as VkDescriptorType. - encoder->EncodeSizeTValue(info->image_info_count); - encoder->EncodeSizeTValue(info->storage_image_info_count); - encoder->EncodeSizeTValue(info->buffer_info_count); - encoder->EncodeSizeTValue(info->storage_buffer_info_count); - encoder->EncodeSizeTValue(info->uniform_texel_buffer_view_count); - encoder->EncodeSizeTValue(info->storage_texel_buffer_view_count); + encoder->EncodeSizeTValue(info->image_info_count + info->storage_image_info_count); + encoder->EncodeSizeTValue(info->buffer_info_count + info->storage_buffer_info_count); + encoder->EncodeSizeTValue(info->uniform_texel_buffer_view_count + info->storage_texel_buffer_view_count); // Write the individual template update entries, sorted by type, as tightly packed arrays. const uint8_t* bytes = reinterpret_cast(data); From 382df46b1559140433b83feabc342ce0c44a7472 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Tue, 6 Aug 2024 10:54:56 +0300 Subject: [PATCH 42/99] Rename a function --- framework/encode/vulkan_state_tracker.cpp | 4 ++-- framework/util/page_guard_manager.cpp | 4 ++-- framework/util/page_guard_manager.h | 3 ++- framework/util/page_status_tracker.h | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index 7d959eb052..60fc0fc290 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -2344,8 +2344,8 @@ void VulkanStateTracker::TrackMappedAssetsWrites() return; } - std::unordered_map memories_page_status; - manager->GetModifiedMemoryRegions(memories_page_status); + std::unordered_map memories_page_status; + manager->GetTrackedMemoryRegions(memories_page_status); const size_t page_size = util::platform::GetSystemPageSize(); for (const auto& entry : memories_page_status) diff --git a/framework/util/page_guard_manager.cpp b/framework/util/page_guard_manager.cpp index 437630a0ba..986cf76101 100644 --- a/framework/util/page_guard_manager.cpp +++ b/framework/util/page_guard_manager.cpp @@ -1370,8 +1370,8 @@ const void* PageGuardManager::GetMappedMemory(uint64_t memory_id) const return nullptr; } -void PageGuardManager::GetModifiedMemoryRegions( - std::unordered_map& memories_page_status) +void PageGuardManager::GetTrackedMemoryRegions( + std::unordered_map& memories_page_status) { memories_page_status.clear(); diff --git a/framework/util/page_guard_manager.h b/framework/util/page_guard_manager.h index c1276af6e7..8f09abfb13 100644 --- a/framework/util/page_guard_manager.h +++ b/framework/util/page_guard_manager.h @@ -145,7 +145,8 @@ class PageGuardManager void UffdUnblockRtSignal(); - void GetModifiedMemoryRegions(std::unordered_map& memories_page_status); + void + GetTrackedMemoryRegions(std::unordered_map& memories_page_status); protected: PageGuardManager(); diff --git a/framework/util/page_status_tracker.h b/framework/util/page_status_tracker.h index edb920e93f..b6cb7c4b45 100644 --- a/framework/util/page_status_tracker.h +++ b/framework/util/page_status_tracker.h @@ -53,7 +53,7 @@ class PageStatusTracker void SetAllBlocksActiveWrite() { std::fill(active_writes_.begin(), active_writes_.end(), 1); } - PageStatus& GetActiveWrites() { return active_writes_; } + const PageStatus& GetActiveWrites() { return active_writes_; } private: PageStatus active_writes_; //< Track blocks that have been written. From e3ca6abab868b7e21c1d8fa85801c0e992486209 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Tue, 6 Aug 2024 12:43:31 +0300 Subject: [PATCH 43/99] No need to clear map --- framework/util/page_guard_manager.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/framework/util/page_guard_manager.cpp b/framework/util/page_guard_manager.cpp index 986cf76101..09cd50ddbe 100644 --- a/framework/util/page_guard_manager.cpp +++ b/framework/util/page_guard_manager.cpp @@ -1373,8 +1373,6 @@ const void* PageGuardManager::GetMappedMemory(uint64_t memory_id) const void PageGuardManager::GetTrackedMemoryRegions( std::unordered_map& memories_page_status) { - memories_page_status.clear(); - for (auto& entry : memory_info_) { auto new_entry = memories_page_status.emplace(entry.first, entry.second.status_tracker.GetActiveWrites()); From 16f8681f077dcd496ef0ba4f8d4147dd7da6268f Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Thu, 8 Aug 2024 10:23:28 +0300 Subject: [PATCH 44/99] Track dynamic rendering --- .../encode/custom_vulkan_encoder_commands.h | 20 ++++++++ framework/encode/vulkan_capture_manager.cpp | 9 ++++ framework/encode/vulkan_capture_manager.h | 2 + framework/encode/vulkan_state_tracker.cpp | 46 +++++++++++++++++++ framework/encode/vulkan_state_tracker.h | 2 + 5 files changed, 79 insertions(+) diff --git a/framework/encode/custom_vulkan_encoder_commands.h b/framework/encode/custom_vulkan_encoder_commands.h index a80e6777d6..ca2318cf83 100644 --- a/framework/encode/custom_vulkan_encoder_commands.h +++ b/framework/encode/custom_vulkan_encoder_commands.h @@ -1690,6 +1690,26 @@ struct CustomEncoderPostCall +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdBeginRendering(args...); + } +}; + +template <> +struct CustomEncoderPostCall +{ + template + static void Dispatch(VulkanCaptureManager* manager, Args... args) + { + manager->PostProcess_vkCmdBeginRendering(args...); + } +}; + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/vulkan_capture_manager.cpp b/framework/encode/vulkan_capture_manager.cpp index 04615b133a..55eff01734 100644 --- a/framework/encode/vulkan_capture_manager.cpp +++ b/framework/encode/vulkan_capture_manager.cpp @@ -3566,5 +3566,14 @@ void VulkanCaptureManager::PostProcess_vkCmdDrawMeshTasksIndirectCountEXT(VkComm } } +void VulkanCaptureManager::PostProcess_vkCmdBeginRendering(VkCommandBuffer commandBuffer, + const VkRenderingInfo* pRenderingInfo) +{ + if (IsCaptureModeTrack()) + { + state_tracker_->TrackBeginRendering(commandBuffer, pRenderingInfo); + } +} + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/vulkan_capture_manager.h b/framework/encode/vulkan_capture_manager.h index 74654363a7..06f619a138 100644 --- a/framework/encode/vulkan_capture_manager.h +++ b/framework/encode/vulkan_capture_manager.h @@ -1545,6 +1545,8 @@ class VulkanCaptureManager : public ApiCaptureManager uint32_t maxDrawCount, uint32_t stride); + void PostProcess_vkCmdBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo); + #if defined(__ANDROID__) void OverrideGetPhysicalDeviceSurfacePresentModesKHR(uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes); #endif diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index 60fc0fc290..f421fd12a6 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -27,6 +27,7 @@ #include "encode/vulkan_state_info.h" #include "encode/custom_vulkan_struct_handle_wrappers.h" #include "encode/vulkan_handle_wrapper_util.h" +#include "encode/vulkan_state_table_base.h" #include "encode/vulkan_track_struct.h" #include "graphics/vulkan_struct_get_pnext.h" #include "util/logging.h" @@ -2716,5 +2717,50 @@ void VulkanStateTracker::TrackSubmission(uint32_t submitCount, const VkSubmitInf } } +void VulkanStateTracker::TrackBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo) +{ + if (commandBuffer != VK_NULL_HANDLE && pRenderingInfo != nullptr) + { + vulkan_wrappers::CommandBufferWrapper* wrapper = + vulkan_wrappers::GetWrapper(commandBuffer); + assert(wrapper != nullptr); + + for (uint32_t i = 0; i < pRenderingInfo->colorAttachmentCount; ++i) + { + if (pRenderingInfo->pColorAttachments[i].storeOp == VK_ATTACHMENT_STORE_OP_STORE) + { + vulkan_wrappers::ImageViewWrapper* img_view_wrapper = + vulkan_wrappers::GetWrapper( + pRenderingInfo->pColorAttachments[i].imageView); + assert(img_view_wrapper != nullptr); + + wrapper->modified_assets.insert(img_view_wrapper->image); + } + } + + if (pRenderingInfo->pDepthAttachment != nullptr && + pRenderingInfo->pDepthAttachment->storeOp == VK_ATTACHMENT_STORE_OP_STORE) + { + vulkan_wrappers::ImageViewWrapper* img_view_wrapper = + vulkan_wrappers::GetWrapper( + pRenderingInfo->pDepthAttachment->imageView); + assert(img_view_wrapper != nullptr); + + wrapper->modified_assets.insert(img_view_wrapper->image); + } + + if (pRenderingInfo->pDepthAttachment != nullptr && + pRenderingInfo->pStencilAttachment->storeOp == VK_ATTACHMENT_STORE_OP_STORE) + { + vulkan_wrappers::ImageViewWrapper* img_view_wrapper = + vulkan_wrappers::GetWrapper( + pRenderingInfo->pStencilAttachment->imageView); + assert(img_view_wrapper != nullptr); + + wrapper->modified_assets.insert(img_view_wrapper->image); + } + } +} + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/vulkan_state_tracker.h b/framework/encode/vulkan_state_tracker.h index 4e8614e4d4..99532fdfc0 100644 --- a/framework/encode/vulkan_state_tracker.h +++ b/framework/encode/vulkan_state_tracker.h @@ -677,6 +677,8 @@ class VulkanStateTracker void TrackSubmission(uint32_t submitCount, const VkSubmitInfo2* pSubmits); + void TrackBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo); + private: template void AddGroupHandles(ParentHandle parent_handle, From e4967e6707f281eadd540a89c3ea1266b276bf58 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Thu, 8 Aug 2024 10:24:06 +0300 Subject: [PATCH 45/99] Handle VK_DESCRIPTOR_TYPE_MUTABLE_VALVE --- framework/encode/vulkan_state_tracker_initializers.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/framework/encode/vulkan_state_tracker_initializers.h b/framework/encode/vulkan_state_tracker_initializers.h index 4a8d1a0987..dd050fd44e 100644 --- a/framework/encode/vulkan_state_tracker_initializers.h +++ b/framework/encode/vulkan_state_tracker_initializers.h @@ -608,7 +608,6 @@ inline void InitializeStatecreate_call_id = create_call_id; wrapper->create_parameters = std::move(create_parameters); - wrapper->size = create_info->size; wrapper->size = create_info->size; // TODO: Do we need to track the queue family that the buffer is actually used with? @@ -892,10 +891,13 @@ inline void InitializePoolObjectState(VkDevice par std::make_unique(binding_info.count); break; case VK_DESCRIPTOR_TYPE_MUTABLE_VALVE: - descriptor_info.sampler_ids = std::make_unique(binding_info.count); - descriptor_info.images = std::make_unique(binding_info.count); - descriptor_info.buffers = std::make_unique(binding_info.count); + descriptor_info.sampler_ids = std::make_unique(binding_info.count); + descriptor_info.images = std::make_unique(binding_info.count); + descriptor_info.storage_images = std::make_unique(binding_info.count); + descriptor_info.buffers = std::make_unique(binding_info.count); + descriptor_info.storage_buffers = std::make_unique(binding_info.count); descriptor_info.uniform_texel_buffer_views = std::make_unique(binding_info.count); + descriptor_info.storage_texel_buffer_views = std::make_unique(binding_info.count); descriptor_info.acceleration_structures = std::make_unique(binding_info.count); descriptor_info.mutable_type = std::make_unique(binding_info.count); From 306cb51539d06e3dc8224c6bce37b2ae892ed23c Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Thu, 8 Aug 2024 12:28:59 +0300 Subject: [PATCH 46/99] These are Post functions, not Pre --- .../encode/custom_vulkan_encoder_commands.h | 4 ++-- framework/encode/vulkan_capture_manager.cpp | 4 ++-- framework/encode/vulkan_capture_manager.h | 22 +++++++++---------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/framework/encode/custom_vulkan_encoder_commands.h b/framework/encode/custom_vulkan_encoder_commands.h index ca2318cf83..d7b0a5a011 100644 --- a/framework/encode/custom_vulkan_encoder_commands.h +++ b/framework/encode/custom_vulkan_encoder_commands.h @@ -816,7 +816,7 @@ struct CustomEncoderPostCall static void Dispatch(VulkanCaptureManager* manager, Args... args) { - manager->PreProcess_vkCreateDescriptorUpdateTemplate(args...); + manager->PostProcess_vkCreateDescriptorUpdateTemplate(args...); } }; @@ -826,7 +826,7 @@ struct CustomEncoderPostCall static void Dispatch(VulkanCaptureManager* manager, Args... args) { - manager->PreProcess_vkCreateDescriptorUpdateTemplateKHR(args...); + manager->PostProcess_vkCreateDescriptorUpdateTemplateKHR(args...); } }; diff --git a/framework/encode/vulkan_capture_manager.cpp b/framework/encode/vulkan_capture_manager.cpp index 55eff01734..d54b27d889 100644 --- a/framework/encode/vulkan_capture_manager.cpp +++ b/framework/encode/vulkan_capture_manager.cpp @@ -2561,7 +2561,7 @@ void VulkanCaptureManager::QueueSubmitWriteFillMemoryCmd() } } -void VulkanCaptureManager::PreProcess_vkCreateDescriptorUpdateTemplate( +void VulkanCaptureManager::PostProcess_vkCreateDescriptorUpdateTemplate( VkResult result, VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, @@ -2577,7 +2577,7 @@ void VulkanCaptureManager::PreProcess_vkCreateDescriptorUpdateTemplate( } } -void VulkanCaptureManager::PreProcess_vkCreateDescriptorUpdateTemplateKHR( +void VulkanCaptureManager::PostProcess_vkCreateDescriptorUpdateTemplateKHR( VkResult result, VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, diff --git a/framework/encode/vulkan_capture_manager.h b/framework/encode/vulkan_capture_manager.h index 06f619a138..9061a35e4c 100644 --- a/framework/encode/vulkan_capture_manager.h +++ b/framework/encode/vulkan_capture_manager.h @@ -1204,17 +1204,17 @@ class VulkanCaptureManager : public ApiCaptureManager void PreProcess_vkQueueSubmit2(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence); - void PreProcess_vkCreateDescriptorUpdateTemplate(VkResult result, - VkDevice device, - const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate); - - void PreProcess_vkCreateDescriptorUpdateTemplateKHR(VkResult result, - VkDevice device, - const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate); + void PostProcess_vkCreateDescriptorUpdateTemplate(VkResult result, + VkDevice device, + const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate); + + void PostProcess_vkCreateDescriptorUpdateTemplateKHR(VkResult result, + VkDevice device, + const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate); void PreProcess_vkGetBufferDeviceAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo); From a70a0a5ad6d1ba0e184f7e185fdc4f64bf190528 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Thu, 8 Aug 2024 13:47:20 +0300 Subject: [PATCH 47/99] Reverted DescriptorUpdateTemplate --- .../custom_vulkan_api_call_encoders.cpp | 76 +------ .../encode/descriptor_update_template_info.h | 10 +- framework/encode/vulkan_capture_manager.cpp | 59 +----- framework/encode/vulkan_state_tracker.cpp | 185 ++++-------------- 4 files changed, 50 insertions(+), 280 deletions(-) diff --git a/framework/encode/custom_vulkan_api_call_encoders.cpp b/framework/encode/custom_vulkan_api_call_encoders.cpp index d10850773b..12a2ecbd2a 100644 --- a/framework/encode/custom_vulkan_api_call_encoders.cpp +++ b/framework/encode/custom_vulkan_api_call_encoders.cpp @@ -66,18 +66,6 @@ static const void* UnwrapDescriptorUpdateTemplateInfoHandles(const UpdateTemplat } } - for (const auto& entry_info : info->storage_image_info) - { - for (size_t i = 0; i < entry_info.count; ++i) - { - size_t offset = entry_info.offset + (entry_info.stride * i); - auto unwrapped_entry = reinterpret_cast(unwrapped_data + offset); - - memcpy(unwrapped_entry, bytes + offset, sizeof(VkDescriptorImageInfo)); - vulkan_wrappers::UnwrapStructHandles(entry_info.type, unwrapped_entry, unwrap_memory); - } - } - // Process VkDescriptorBufferInfo for (const auto& entry_info : info->buffer_info) { @@ -91,32 +79,8 @@ static const void* UnwrapDescriptorUpdateTemplateInfoHandles(const UpdateTemplat } } - for (const auto& entry_info : info->storage_buffer_info) - { - for (size_t i = 0; i < entry_info.count; ++i) - { - size_t offset = entry_info.offset + (entry_info.stride * i); - auto unwrapped_entry = reinterpret_cast(unwrapped_data + offset); - - memcpy(unwrapped_entry, bytes + offset, sizeof(VkDescriptorBufferInfo)); - vulkan_wrappers::UnwrapStructHandles(unwrapped_entry, unwrap_memory); - } - } - // Process VkBufferView - for (const auto& entry_info : info->uniform_texel_buffer_view) - { - for (size_t i = 0; i < entry_info.count; ++i) - { - size_t offset = entry_info.offset + (entry_info.stride * i); - auto unwrapped_entry = reinterpret_cast(unwrapped_data + offset); - auto entry = reinterpret_cast(bytes + offset); - - *unwrapped_entry = (*entry); - } - } - - for (const auto& entry_info : info->storage_texel_buffer_view) + for (const auto& entry_info : info->texel_buffer_view) { for (size_t i = 0; i < entry_info.count; ++i) { @@ -170,9 +134,9 @@ static void EncodeDescriptorUpdateTemplateInfo(VulkanCaptureManager* manager // before we write the entries, so that the decoder will know up front how much memory it needs to allocate for // decoding. Optional entries must be encoded after the required entries, and must encode the number of elements // in the array as well as VkDescriptorType. - encoder->EncodeSizeTValue(info->image_info_count + info->storage_image_info_count); - encoder->EncodeSizeTValue(info->buffer_info_count + info->storage_buffer_info_count); - encoder->EncodeSizeTValue(info->uniform_texel_buffer_view_count + info->storage_texel_buffer_view_count); + encoder->EncodeSizeTValue(info->image_info_count); + encoder->EncodeSizeTValue(info->buffer_info_count); + encoder->EncodeSizeTValue(info->texel_buffer_view_count); // Write the individual template update entries, sorted by type, as tightly packed arrays. const uint8_t* bytes = reinterpret_cast(data); @@ -187,16 +151,6 @@ static void EncodeDescriptorUpdateTemplateInfo(VulkanCaptureManager* manager } } - for (const auto& entry_info : info->storage_image_info) - { - for (size_t i = 0; i < entry_info.count; ++i) - { - size_t offset = entry_info.offset + (entry_info.stride * i); - const VkDescriptorImageInfo* entry = reinterpret_cast(bytes + offset); - EncodeStruct(encoder, entry_info.type, (*entry)); - } - } - // Process VkDescriptorBufferInfo for (const auto& entry_info : info->buffer_info) { @@ -208,28 +162,8 @@ static void EncodeDescriptorUpdateTemplateInfo(VulkanCaptureManager* manager } } - for (const auto& entry_info : info->storage_buffer_info) - { - for (size_t i = 0; i < entry_info.count; ++i) - { - size_t offset = entry_info.offset + (entry_info.stride * i); - const VkDescriptorBufferInfo* entry = reinterpret_cast(bytes + offset); - EncodeStruct(encoder, (*entry)); - } - } - // Process VkBufferView - for (const auto& entry_info : info->uniform_texel_buffer_view) - { - for (size_t i = 0; i < entry_info.count; ++i) - { - size_t offset = entry_info.offset + (entry_info.stride * i); - const VkBufferView* entry = reinterpret_cast(bytes + offset); - encoder->EncodeVulkanHandleValue(*entry); - } - } - - for (const auto& entry_info : info->storage_texel_buffer_view) + for (const auto& entry_info : info->texel_buffer_view) { for (size_t i = 0; i < entry_info.count; ++i) { diff --git a/framework/encode/descriptor_update_template_info.h b/framework/encode/descriptor_update_template_info.h index 873571401c..1c216afa0e 100644 --- a/framework/encode/descriptor_update_template_info.h +++ b/framework/encode/descriptor_update_template_info.h @@ -53,19 +53,13 @@ struct UpdateTemplateInfo // items to encode prior to processing the individual UpdateTemplateEntry structures. size_t max_size{ 0 }; size_t image_info_count{ 0 }; - size_t storage_image_info_count{ 0 }; size_t buffer_info_count{ 0 }; - size_t storage_buffer_info_count{ 0 }; - size_t uniform_texel_buffer_view_count{ 0 }; - size_t storage_texel_buffer_view_count{ 0 }; + size_t texel_buffer_view_count{ 0 }; size_t acceleration_structure_khr_count{ 0 }; size_t inline_uniform_block_count{ 0 }; std::vector image_info; - std::vector storage_image_info; std::vector buffer_info; - std::vector storage_buffer_info; - std::vector uniform_texel_buffer_view; - std::vector storage_texel_buffer_view; + std::vector texel_buffer_view; std::vector acceleration_structure_khr; std::vector inline_uniform_block; }; diff --git a/framework/encode/vulkan_capture_manager.cpp b/framework/encode/vulkan_capture_manager.cpp index d54b27d889..e45e17ee6d 100644 --- a/framework/encode/vulkan_capture_manager.cpp +++ b/framework/encode/vulkan_capture_manager.cpp @@ -458,7 +458,8 @@ void VulkanCaptureManager::SetDescriptorUpdateTemplateInfo(VkDescriptorUpdateTem // as tightly packed arrays of structures. One array will be written for each descriptor info // structure/textel buffer view. if ((type == VK_DESCRIPTOR_TYPE_SAMPLER) || (type == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER) || - (type == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE) || (type == VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT)) + (type == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE) || (type == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE) || + (type == VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT)) { UpdateTemplateEntryInfo image_info; image_info.binding = entry->dstBinding; @@ -473,22 +474,9 @@ void VulkanCaptureManager::SetDescriptorUpdateTemplateInfo(VkDescriptorUpdateTem entry_size = sizeof(VkDescriptorImageInfo); } - else if (type == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE) - { - UpdateTemplateEntryInfo image_info; - image_info.binding = entry->dstBinding; - image_info.array_element = entry->dstArrayElement; - image_info.count = entry->descriptorCount; - image_info.offset = entry->offset; - image_info.stride = entry->stride; - image_info.type = type; - - info->storage_image_info_count += entry->descriptorCount; - info->storage_image_info.emplace_back(image_info); - - entry_size = sizeof(VkDescriptorImageInfo); - } - else if ((type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER) || (type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC)) + else if ((type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER) || (type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER) || + (type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC) || + (type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC)) { UpdateTemplateEntryInfo buffer_info; buffer_info.binding = entry->dstBinding; @@ -503,37 +491,8 @@ void VulkanCaptureManager::SetDescriptorUpdateTemplateInfo(VkDescriptorUpdateTem entry_size = sizeof(VkDescriptorBufferInfo); } - else if ((type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER) || (type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC)) - { - UpdateTemplateEntryInfo buffer_info; - buffer_info.binding = entry->dstBinding; - buffer_info.array_element = entry->dstArrayElement; - buffer_info.count = entry->descriptorCount; - buffer_info.offset = entry->offset; - buffer_info.stride = entry->stride; - buffer_info.type = type; - - info->storage_buffer_info_count += entry->descriptorCount; - info->storage_buffer_info.emplace_back(buffer_info); - - entry_size = sizeof(VkDescriptorBufferInfo); - } - else if (type == VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER) - { - UpdateTemplateEntryInfo texel_buffer_view_info; - texel_buffer_view_info.binding = entry->dstBinding; - texel_buffer_view_info.array_element = entry->dstArrayElement; - texel_buffer_view_info.count = entry->descriptorCount; - texel_buffer_view_info.offset = entry->offset; - texel_buffer_view_info.stride = entry->stride; - texel_buffer_view_info.type = type; - - info->uniform_texel_buffer_view_count += entry->descriptorCount; - info->uniform_texel_buffer_view.emplace_back(texel_buffer_view_info); - - entry_size = sizeof(VkBufferView); - } - else if (type == VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER) + else if ((type == VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER) || + (type == VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER)) { UpdateTemplateEntryInfo texel_buffer_view_info; texel_buffer_view_info.binding = entry->dstBinding; @@ -543,8 +502,8 @@ void VulkanCaptureManager::SetDescriptorUpdateTemplateInfo(VkDescriptorUpdateTem texel_buffer_view_info.stride = entry->stride; texel_buffer_view_info.type = type; - info->storage_texel_buffer_view_count += entry->descriptorCount; - info->storage_texel_buffer_view.emplace_back(texel_buffer_view_info); + info->texel_buffer_view_count += entry->descriptorCount; + info->texel_buffer_view.emplace_back(texel_buffer_view_info); entry_size = sizeof(VkBufferView); } diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index f421fd12a6..aba6c65e5d 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -33,6 +33,7 @@ #include "util/logging.h" #include "util/platform.h" #include "Vulkan-Utility-Libraries/vk_format_utils.h" +#include "util/to_string.h" #include "vulkan/vulkan_core.h" #include "util/page_status_tracker.h" @@ -1074,9 +1075,22 @@ void VulkanStateTracker::TrackUpdateDescriptorSetWithTemplate(VkDescriptorSet bool* written_start = &binding.written[current_array_element]; std::fill(written_start, written_start + current_writes, true); + if (binding.type != entry.type) + { + GFXRECON_LOG_WARNING("%s() Descriptors mismatch: %s != %s", + __func__, + util::ToString(binding.type).c_str(), + util::ToString(entry.type).c_str()); + } + const bool immutable_image = binding.type == VK_DESCRIPTOR_TYPE_SAMPLER || + binding.type == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER || + binding.type == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE || + binding.type == VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT; + format::HandleId* dst_sampler_ids = &binding.sampler_ids[current_array_element]; format::HandleId* dst_image_ids = &binding.handle_ids[current_array_element]; - VkDescriptorImageInfo* dst_info = &binding.images[current_array_element]; + VkDescriptorImageInfo* dst_info = immutable_image ? &binding.images[current_array_element] + : &binding.storage_images[current_array_element]; const uint8_t* src_address = bytes + current_offset; for (uint32_t i = 0; i < current_writes; ++i) @@ -1115,59 +1129,6 @@ void VulkanStateTracker::TrackUpdateDescriptorSetWithTemplate(VkDescriptorSet } } - for (const auto& entry : template_info->storage_image_info) - { - // Descriptor update rules specify that a write descriptorCount that is greater than the binding's count - // will result in updates to consecutive bindings. - uint32_t current_count = entry.count; - uint32_t current_binding = entry.binding; - uint32_t current_array_element = entry.array_element; - size_t current_offset = entry.offset; - - for (;;) - { - auto& binding = wrapper->bindings[current_binding]; - - assert(binding.storage_images != nullptr); - - // Check count for consecutive updates. - uint32_t current_writes = std::min(current_count, (binding.count - current_array_element)); - - bool* written_start = &binding.written[current_array_element]; - std::fill(written_start, written_start + current_writes, true); - - format::HandleId* dst_image_ids = &binding.handle_ids[current_array_element]; - VkDescriptorImageInfo* dst_info = &binding.storage_images[current_array_element]; - const uint8_t* src_address = bytes + current_offset; - - for (uint32_t i = 0; i < current_writes; ++i) - { - assert(binding.type == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE); - - auto image_info = reinterpret_cast(src_address); - dst_image_ids[i] = - vulkan_wrappers::GetWrappedId(image_info->imageView); - - memcpy(&dst_info[i], image_info, sizeof(dst_info[i])); - - src_address += entry.stride; - } - - // Check for consecutive update. - if (current_count == current_writes) - { - break; - } - else - { - current_count -= current_writes; - current_binding += 1; - current_array_element = 0; - current_offset += (current_writes * entry.stride); - } - } - } - for (const auto& entry : template_info->buffer_info) { // Descriptor update rules specify that a write descriptorCount that is greater than the binding's count @@ -1189,58 +1150,19 @@ void VulkanStateTracker::TrackUpdateDescriptorSetWithTemplate(VkDescriptorSet bool* written_start = &binding.written[current_array_element]; std::fill(written_start, written_start + current_writes, true); - format::HandleId* dst_buffer_ids = &binding.handle_ids[current_array_element]; - VkDescriptorBufferInfo* dst_info = &binding.buffers[current_array_element]; - const uint8_t* src_address = bytes + current_offset; - - for (uint32_t i = 0; i < current_writes; ++i) + if (binding.type != entry.type) { - auto buffer_info = reinterpret_cast(src_address); - dst_buffer_ids[i] = - vulkan_wrappers::GetWrappedId(buffer_info->buffer); - memcpy(&dst_info[i], buffer_info, sizeof(dst_info[i])); - - src_address += entry.stride; + GFXRECON_LOG_WARNING("%s() Descriptors mismatch: %s != %s", + __func__, + util::ToString(binding.type).c_str(), + util::ToString(entry.type).c_str()); } - - // Check for consecutive update. - if (current_count == current_writes) - { - break; - } - else - { - current_count -= current_writes; - current_binding += 1; - current_array_element = 0; - current_offset += (current_writes * entry.stride); - } - } - } - - for (const auto& entry : template_info->storage_buffer_info) - { - // Descriptor update rules specify that a write descriptorCount that is greater than the binding's count - // will result in updates to consecutive bindings. - uint32_t current_count = entry.count; - uint32_t current_binding = entry.binding; - uint32_t current_array_element = entry.array_element; - size_t current_offset = entry.offset; - - for (;;) - { - auto& binding = wrapper->bindings[current_binding]; - - assert(binding.storage_buffers != nullptr); - - // Check count for consecutive updates. - uint32_t current_writes = std::min(current_count, (binding.count - current_array_element)); - - bool* written_start = &binding.written[current_array_element]; - std::fill(written_start, written_start + current_writes, true); + const bool immutable_buffer = binding.type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC || + binding.type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; format::HandleId* dst_buffer_ids = &binding.handle_ids[current_array_element]; - VkDescriptorBufferInfo* dst_info = &binding.storage_buffers[current_array_element]; + VkDescriptorBufferInfo* dst_info = immutable_buffer ? &binding.buffers[current_array_element] + : &binding.storage_buffers[current_array_element]; const uint8_t* src_address = bytes + current_offset; for (uint32_t i = 0; i < current_writes; ++i) @@ -1268,7 +1190,7 @@ void VulkanStateTracker::TrackUpdateDescriptorSetWithTemplate(VkDescriptorSet } } - for (const auto& entry : template_info->uniform_texel_buffer_view) + for (const auto& entry : template_info->texel_buffer_view) { // Descriptor update rules specify that a write descriptorCount that is greater than the binding's count // will result in updates to consecutive bindings. @@ -1289,58 +1211,19 @@ void VulkanStateTracker::TrackUpdateDescriptorSetWithTemplate(VkDescriptorSet bool* written_start = &binding.written[current_array_element]; std::fill(written_start, written_start + current_writes, true); - format::HandleId* dst_view_ids = &binding.handle_ids[current_array_element]; - VkBufferView* dst_info = &binding.uniform_texel_buffer_views[current_array_element]; - const uint8_t* src_address = bytes + current_offset; - - for (uint32_t i = 0; i < current_writes; ++i) + if (binding.type != entry.type) { - auto buffer_view = reinterpret_cast(src_address); - dst_view_ids[i] = vulkan_wrappers::GetWrappedId(*buffer_view); - dst_info[i] = *buffer_view; - - src_address += entry.stride; + GFXRECON_LOG_WARNING("%s() Descriptors mismatch: %s != %s", + __func__, + util::ToString(binding.type).c_str(), + util::ToString(entry.type).c_str()); } - - // Check for consecutive update. - if (current_count == current_writes) - { - break; - } - else - { - current_count -= current_writes; - current_binding += 1; - current_array_element = 0; - current_offset += (current_writes * entry.stride); - } - } - } - - for (const auto& entry : template_info->storage_texel_buffer_view) - { - // Descriptor update rules specify that a write descriptorCount that is greater than the binding's count - // will result in updates to consecutive bindings. - uint32_t current_count = entry.count; - uint32_t current_binding = entry.binding; - uint32_t current_array_element = entry.array_element; - size_t current_offset = entry.offset; - - for (;;) - { - auto& binding = wrapper->bindings[current_binding]; - - assert(binding.storage_texel_buffer_views != nullptr); - - // Check count for consecutive updates. - uint32_t current_writes = std::min(current_count, (binding.count - current_array_element)); - - bool* written_start = &binding.written[current_array_element]; - std::fill(written_start, written_start + current_writes, true); + const bool immutable_buffer = binding.type == VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER; format::HandleId* dst_view_ids = &binding.handle_ids[current_array_element]; - VkBufferView* dst_info = &binding.storage_texel_buffer_views[current_array_element]; - const uint8_t* src_address = bytes + current_offset; + VkBufferView* dst_info = immutable_buffer ? &binding.uniform_texel_buffer_views[current_array_element] + : &binding.storage_texel_buffer_views[current_array_element]; + const uint8_t* src_address = bytes + current_offset; for (uint32_t i = 0; i < current_writes; ++i) { From f8ebd58fee31fabbb6a41d8418590832500a250d Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Thu, 8 Aug 2024 14:34:42 +0300 Subject: [PATCH 48/99] Fix windows build --- framework/encode/vulkan_state_tracker.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index aba6c65e5d..331a562cd9 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -1077,10 +1077,7 @@ void VulkanStateTracker::TrackUpdateDescriptorSetWithTemplate(VkDescriptorSet if (binding.type != entry.type) { - GFXRECON_LOG_WARNING("%s() Descriptors mismatch: %s != %s", - __func__, - util::ToString(binding.type).c_str(), - util::ToString(entry.type).c_str()); + GFXRECON_LOG_WARNING("%s() Descriptors mismatch: %u != %u", __func__, binding.type, entry.type); } const bool immutable_image = binding.type == VK_DESCRIPTOR_TYPE_SAMPLER || binding.type == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER || @@ -1152,10 +1149,7 @@ void VulkanStateTracker::TrackUpdateDescriptorSetWithTemplate(VkDescriptorSet if (binding.type != entry.type) { - GFXRECON_LOG_WARNING("%s() Descriptors mismatch: %s != %s", - __func__, - util::ToString(binding.type).c_str(), - util::ToString(entry.type).c_str()); + GFXRECON_LOG_WARNING("%s() Descriptors mismatch: %u != %u", __func__, binding.type, entry.type); } const bool immutable_buffer = binding.type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC || binding.type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; @@ -1213,10 +1207,7 @@ void VulkanStateTracker::TrackUpdateDescriptorSetWithTemplate(VkDescriptorSet if (binding.type != entry.type) { - GFXRECON_LOG_WARNING("%s() Descriptors mismatch: %s != %s", - __func__, - util::ToString(binding.type).c_str(), - util::ToString(entry.type).c_str()); + GFXRECON_LOG_WARNING("%s() Descriptors mismatch: %u != %u", __func__, binding.type, entry.type); } const bool immutable_buffer = binding.type == VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER; From d9e597dab4cda5931e3205fcd4eb3b6a9d01be6b Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Thu, 8 Aug 2024 20:20:04 +0300 Subject: [PATCH 49/99] Fix in TrackBeginRendering --- framework/encode/vulkan_state_tracker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index 331a562cd9..0cdeee436b 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -2623,7 +2623,7 @@ void VulkanStateTracker::TrackBeginRendering(VkCommandBuffer commandBuffer, cons wrapper->modified_assets.insert(img_view_wrapper->image); } - if (pRenderingInfo->pDepthAttachment != nullptr && + if (pRenderingInfo->pStencilAttachment != nullptr && pRenderingInfo->pStencilAttachment->storeOp == VK_ATTACHMENT_STORE_OP_STORE) { vulkan_wrappers::ImageViewWrapper* img_view_wrapper = From dc86e8e13888972d77542aa720fd24536627b880 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Fri, 9 Aug 2024 07:04:11 +0300 Subject: [PATCH 50/99] CmdBindDescriptorSets can bind VK_NULL_HANDLE desc set handles --- framework/encode/vulkan_state_info.h | 2 +- framework/encode/vulkan_state_tracker.cpp | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/framework/encode/vulkan_state_info.h b/framework/encode/vulkan_state_info.h index 7e04b8a4dc..03977c7d37 100644 --- a/framework/encode/vulkan_state_info.h +++ b/framework/encode/vulkan_state_info.h @@ -178,7 +178,6 @@ static PipelineBindPoints VkPipelinePointToPipelinePoint(VkPipelineBindPoint bin { switch (bind_point) { - case VK_PIPELINE_BIND_POINT_GRAPHICS: return kBindPoint_graphics; case VK_PIPELINE_BIND_POINT_COMPUTE: @@ -186,6 +185,7 @@ static PipelineBindPoints VkPipelinePointToPipelinePoint(VkPipelineBindPoint bin case VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR: return kBindPoint_ray_tracing; default: + GFXRECON_LOG_ERROR("Unrecognized/unsupported pipeline binding point (%u)", bind_point); assert(0); return kBindPoint_graphics; } diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index 0cdeee436b..6e3c0a0953 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -1861,10 +1861,10 @@ void VulkanStateTracker::TrackCmdBindDescriptorSets(VkCommandBuffer comma { vulkan_wrappers::DescriptorSetWrapper* desc_set_wrapper = vulkan_wrappers::GetWrapper(pDescriptorSets[i]); - assert(desc_set_wrapper != nullptr); - cmd_buf_wrapper->bound_descriptors[vulkan_state_info::VkPipelinePointToPipelinePoint(pipelineBindPoint)] - [firstSet + i] = desc_set_wrapper; + const vulkan_state_info::PipelineBindPoints bind_point = + vulkan_state_info::VkPipelinePointToPipelinePoint(pipelineBindPoint); + cmd_buf_wrapper->bound_descriptors[bind_point][firstSet + i] = desc_set_wrapper; } } } @@ -1884,14 +1884,13 @@ void VulkanStateTracker::TrackCmdBindDescriptorSets2KHR(VkCommandBuffer vulkan_wrappers::DescriptorSetWrapper* desc_set_wrapper = vulkan_wrappers::GetWrapper( pBindDescriptorSetsInfo->pDescriptorSets[i]); - assert(desc_set_wrapper != nullptr); - std::vector points; - vulkan_state_info::VkShaderStageFlagsToPipelinePoint(pBindDescriptorSetsInfo->stageFlags, points); - - for (auto point : points) + std::vector bind_points; + vulkan_state_info::VkShaderStageFlagsToPipelinePoint(pBindDescriptorSetsInfo->stageFlags, bind_points); + for (auto bind_point : bind_points) { - cmd_buf_wrapper->bound_descriptors[point][pBindDescriptorSetsInfo->firstSet + i] = desc_set_wrapper; + cmd_buf_wrapper->bound_descriptors[bind_point][pBindDescriptorSetsInfo->firstSet + i] = + desc_set_wrapper; } } } From ef45a1349cb91c0b5aff6f32cd575992a9d8961b Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sat, 10 Aug 2024 18:42:36 +0300 Subject: [PATCH 51/99] GetTrackedMemoryRegions should lock the mutex --- framework/util/page_guard_manager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/framework/util/page_guard_manager.cpp b/framework/util/page_guard_manager.cpp index 09cd50ddbe..ee7aecb1a8 100644 --- a/framework/util/page_guard_manager.cpp +++ b/framework/util/page_guard_manager.cpp @@ -1373,6 +1373,8 @@ const void* PageGuardManager::GetMappedMemory(uint64_t memory_id) const void PageGuardManager::GetTrackedMemoryRegions( std::unordered_map& memories_page_status) { + std::lock_guard lock(tracked_memory_lock_); + for (auto& entry : memory_info_) { auto new_entry = memories_page_status.emplace(entry.first, entry.second.status_tracker.GetActiveWrites()); From 5eda5e70332cfdb2f316337a7bafa7fe337b7f1b Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sat, 10 Aug 2024 18:45:19 +0300 Subject: [PATCH 52/99] Fix a couple of typos --- framework/encode/api_capture_manager.h | 8 ++++---- framework/encode/vulkan_capture_manager.cpp | 4 ++-- framework/encode/vulkan_capture_manager.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/framework/encode/api_capture_manager.h b/framework/encode/api_capture_manager.h index f9f4282271..8bdd0a002a 100644 --- a/framework/encode/api_capture_manager.h +++ b/framework/encode/api_capture_manager.h @@ -43,12 +43,12 @@ class ApiCaptureManager static auto AcquireExclusiveApiCallLock() { return std::move(CommonCaptureManager::AcquireExclusiveApiCallLock()); } // Virtual interface - virtual void CreateStateTracker() = 0; - virtual void DestroyStateTracker() = 0; + virtual void CreateStateTracker() = 0; + virtual void DestroyStateTracker() = 0; virtual void WriteTrackedState(util::FileOutputStream* file_stream, format::ThreadId thread_id, - util::FileOutputStream* asseet_file_stream = nullptr) = 0; - virtual void WriteAssets(util::FileOutputStream* assert_file_stream, format::ThreadId thread_id) = 0; + util::FileOutputStream* asset_file_stream = nullptr) = 0; + virtual void WriteAssets(util::FileOutputStream* asset_file_stream, format::ThreadId thread_id) = 0; virtual CaptureSettings::TraceSettings GetDefaultTraceSettings(); diff --git a/framework/encode/vulkan_capture_manager.cpp b/framework/encode/vulkan_capture_manager.cpp index e45e17ee6d..7f27a3cf2c 100644 --- a/framework/encode/vulkan_capture_manager.cpp +++ b/framework/encode/vulkan_capture_manager.cpp @@ -109,10 +109,10 @@ void VulkanCaptureManager::WriteTrackedState(util::FileOutputStream* file_stream common_manager_->IncrementBlockIndex(n_blocks); } -void VulkanCaptureManager::WriteAssets(util::FileOutputStream* assert_file_stream, format::ThreadId thread_id) +void VulkanCaptureManager::WriteAssets(util::FileOutputStream* asset_file_stream, format::ThreadId thread_id) { assert(state_tracker_ != nullptr); - state_tracker_->WriteAssets(assert_file_stream, thread_id, GetCompressor()); + state_tracker_->WriteAssets(asset_file_stream, thread_id, GetCompressor()); } void VulkanCaptureManager::SetLayerFuncs(PFN_vkCreateInstance create_instance, PFN_vkCreateDevice create_device) diff --git a/framework/encode/vulkan_capture_manager.h b/framework/encode/vulkan_capture_manager.h index 9061a35e4c..a724fbbc24 100644 --- a/framework/encode/vulkan_capture_manager.h +++ b/framework/encode/vulkan_capture_manager.h @@ -1568,9 +1568,9 @@ class VulkanCaptureManager : public ApiCaptureManager virtual void WriteTrackedState(util::FileOutputStream* file_stream, format::ThreadId thread_id, - util::FileOutputStream* assert_file_stream = nullptr) override; + util::FileOutputStream* asset_file_stream = nullptr) override; - virtual void WriteAssets(util::FileOutputStream* assert_file_stream, format::ThreadId thread_id) override; + virtual void WriteAssets(util::FileOutputStream* asset_file_stream, format::ThreadId thread_id) override; private: struct HardwareBufferInfo From 1572b153b7f023bc202830f1dcc836ad990a288b Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sat, 10 Aug 2024 20:15:08 +0300 Subject: [PATCH 53/99] Scan only dirty regions --- framework/encode/vulkan_state_tracker.cpp | 2 +- framework/util/page_guard_manager.cpp | 7 +++++-- framework/util/page_guard_manager.h | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index 6e3c0a0953..ce15de799e 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -2219,7 +2219,7 @@ void VulkanStateTracker::TrackMappedAssetsWrites() } std::unordered_map memories_page_status; - manager->GetTrackedMemoryRegions(memories_page_status); + manager->GetDirtyMemoryRegions(memories_page_status); const size_t page_size = util::platform::GetSystemPageSize(); for (const auto& entry : memories_page_status) diff --git a/framework/util/page_guard_manager.cpp b/framework/util/page_guard_manager.cpp index ee7aecb1a8..78dec14e6e 100644 --- a/framework/util/page_guard_manager.cpp +++ b/framework/util/page_guard_manager.cpp @@ -1370,14 +1370,17 @@ const void* PageGuardManager::GetMappedMemory(uint64_t memory_id) const return nullptr; } -void PageGuardManager::GetTrackedMemoryRegions( +void PageGuardManager::GetDirtyMemoryRegions( std::unordered_map& memories_page_status) { std::lock_guard lock(tracked_memory_lock_); for (auto& entry : memory_info_) { - auto new_entry = memories_page_status.emplace(entry.first, entry.second.status_tracker.GetActiveWrites()); + if (entry.second.is_modified) + { + auto new_entry = memories_page_status.emplace(entry.first, entry.second.status_tracker.GetActiveWrites()); + } } } diff --git a/framework/util/page_guard_manager.h b/framework/util/page_guard_manager.h index 8f09abfb13..775475d729 100644 --- a/framework/util/page_guard_manager.h +++ b/framework/util/page_guard_manager.h @@ -146,7 +146,7 @@ class PageGuardManager void UffdUnblockRtSignal(); void - GetTrackedMemoryRegions(std::unordered_map& memories_page_status); + GetDirtyMemoryRegions(std::unordered_map& memories_page_status); protected: PageGuardManager(); From b04347dc6f92aded66e67a0e226f5436b6ebe710 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Fri, 9 Aug 2024 18:13:21 +0300 Subject: [PATCH 54/99] Write state file for each frame --- android/scripts/gfxrecon.py | 5 ++ framework/decode/file_processor.cpp | 55 +++++++++++---- framework/decode/file_processor.h | 26 ++++++- framework/decode/replay_options.h | 1 + framework/encode/capture_manager.cpp | 101 ++++++++++++++++++++++----- framework/encode/capture_manager.h | 8 ++- tools/replay/desktop_main.cpp | 9 ++- tools/replay/replay_settings.h | 3 +- tools/tool_settings.h | 6 ++ 9 files changed, 178 insertions(+), 36 deletions(-) diff --git a/android/scripts/gfxrecon.py b/android/scripts/gfxrecon.py index ce17433ac9..9bfaaafb7c 100644 --- a/android/scripts/gfxrecon.py +++ b/android/scripts/gfxrecon.py @@ -115,6 +115,7 @@ def CreateReplayParser(): parser.add_argument('--pbis', metavar='RANGES', default=False, help='Print block information between block index1 and block index2') parser.add_argument('--pcj', '--pipeline-creation-jobs', action='store_true', default=False, help='Specify the number of pipeline-creation-jobs or background-threads.') parser.add_argument('--asset-file-path', metavar='RANGES', default=False, help='Provide an alternative path for the asset file') + parser.add_argument('--state-file', metavar='RANGES', default=False, help='State file') return parser def MakeExtrasString(args): @@ -287,6 +288,10 @@ def MakeExtrasString(args): arg_list.append('--asset-file-path') arg_list.append('{}'.format(args.asset_file_path)) + if args.state_file: + arg_list.append('--state-file') + arg_list.append('{}'.format(args.state_file)) + if args.file: arg_list.append(args.file) elif not args.version: diff --git a/framework/decode/file_processor.cpp b/framework/decode/file_processor.cpp index 698200608f..088faa1bc3 100644 --- a/framework/decode/file_processor.cpp +++ b/framework/decode/file_processor.cpp @@ -78,13 +78,13 @@ void FileProcessor::WaitDecodersIdle() } }; -bool FileProcessor::Initialize(const std::string& filename) +bool FileProcessor::Initialize(const std::string& filename, const std::string* state_file) { bool success = OpenFile(filename); if (success) { - success = SetActiveFile(filename); + success = SetActiveFile(filename, true); success = success && ProcessFileHeader(); } else @@ -93,6 +93,16 @@ bool FileProcessor::Initialize(const std::string& filename) error_state_ = kErrorOpeningFile; } + if (success && state_file != nullptr) + { + success = OpenFile(*state_file); + if (success) + { + SetActiveFile(*state_file, true); + success = success && ProcessFileHeader(); + } + } + return success; } @@ -254,15 +264,17 @@ bool FileProcessor::ProcessFileHeader() void FileProcessor::DecrementRemainingCommands() { - assert((!file_stack_.top().remaining_commands && file_stack_.size() == 1) || - (file_stack_.top().remaining_commands && file_stack_.size() > 1)); - - if (file_stack_.size() > 1) + if (!file_stack_.size()) { - assert(file_stack_.top().remaining_commands); + return; + } - --file_stack_.top().remaining_commands; - if (file_stack_.top().remaining_commands == 0) + ActiveFileContext& current_file = GetCurrentFile(); + + if (!current_file.execute_till_eof) + { + --current_file.remaining_commands; + if (current_file.remaining_commands == 0) { file_stack_.pop(); } @@ -436,6 +448,17 @@ bool FileProcessor::ProcessBlocks() block_index_); error_state_ = kErrorReadingBlockHeader; } + else + { + assert(file_stack_.size()); + + ActiveFileContext& current_file = GetCurrentFile(); + if (current_file.execute_till_eof) + { + file_stack_.pop(); + success = !file_stack_.empty(); + } + } } } ++block_index_; @@ -550,11 +573,11 @@ bool FileProcessor::SeekActiveFile(int64_t offset, util::platform::FileSeekOrigi return SeekActiveFile(file_stack_.top().filename, offset, origin); } -bool FileProcessor::SetActiveFile(const std::string& filename) +bool FileProcessor::SetActiveFile(const std::string& filename, bool eteof) { if (active_files_.find(filename) != active_files_.end()) { - file_stack_.emplace(filename); + file_stack_.emplace(filename, eteof); return true; } else @@ -563,11 +586,14 @@ bool FileProcessor::SetActiveFile(const std::string& filename) } } -bool FileProcessor::SetActiveFile(const std::string& filename, int64_t offset, util::platform::FileSeekOrigin origin) +bool FileProcessor::SetActiveFile(const std::string& filename, + int64_t offset, + util::platform::FileSeekOrigin origin, + bool eteof) { if (active_files_.find(filename) != active_files_.end()) { - file_stack_.emplace(filename); + file_stack_.emplace(filename, eteof); return SeekActiveFile(filename, offset, origin); } else @@ -1966,7 +1992,8 @@ bool FileProcessor::ProcessMetaData(const format::BlockHeader& block_header, for exec_from_file.thread_id, exec_from_file.n_blocks, exec_from_file.offset, filename); } - SetActiveFile(filename, exec_from_file.offset, util::platform::FileSeekSet); + SetActiveFile( + filename, exec_from_file.offset, util::platform::FileSeekSet, exec_from_file.n_blocks == 0); // We need to add 1 because it will be decremented right after this function returns file_stack_.top().remaining_commands = exec_from_file.n_blocks + 1; } diff --git a/framework/decode/file_processor.h b/framework/decode/file_processor.h index a33c3fb856..f055c1e55c 100644 --- a/framework/decode/file_processor.h +++ b/framework/decode/file_processor.h @@ -32,6 +32,7 @@ #include "util/defines.h" #include +#include #include #include #include @@ -85,7 +86,7 @@ class FileProcessor decoders_.erase(std::remove(decoders_.begin(), decoders_.end(), decoder), decoders_.end()); } - bool Initialize(const std::string& filename); + bool Initialize(const std::string& filename, const std::string* state_file = nullptr); // Returns true if there are more frames to process, false if all frames have been processed or an error has // occurred. Use GetErrorState() to determine error condition. @@ -183,6 +184,8 @@ class FileProcessor protected: FILE* GetFileDescriptor() { + assert(!file_stack_.empty()); + auto file_entry = active_files_.find(file_stack_.top().filename); assert(file_entry != active_files_.end()); @@ -202,6 +205,8 @@ class FileProcessor bool IsFileHeaderValid() const { + assert(!file_stack_.empty()); + auto file_entry = active_files_.find(file_stack_.top().filename); assert(file_entry != active_files_.end()); @@ -210,6 +215,11 @@ class FileProcessor bool IsFileValid() const { + if (file_stack_.empty()) + { + return false; + } + auto file_entry = active_files_.find(file_stack_.top().filename); assert(file_entry != active_files_.end()); @@ -222,9 +232,9 @@ class FileProcessor bool SeekActiveFile(int64_t offset, util::platform::FileSeekOrigin origin); - bool SetActiveFile(const std::string& filename); + bool SetActiveFile(const std::string& filename, bool eteof); - bool SetActiveFile(const std::string& filename, int64_t offset, util::platform::FileSeekOrigin origin); + bool SetActiveFile(const std::string& filename, int64_t offset, util::platform::FileSeekOrigin origin, bool eteof); void DecrementRemainingCommands(); @@ -258,13 +268,23 @@ class FileProcessor struct ActiveFileContext { ActiveFileContext(const std::string& filename) : filename(filename){}; + ActiveFileContext(const std::string& filename, bool eteof) : filename(filename), execute_till_eof(eteof){}; std::string filename; uint32_t remaining_commands{ 0 }; + bool execute_till_eof{ false }; }; std::stack file_stack_; std::string override_asset_filename_; + + private: + ActiveFileContext& GetCurrentFile() + { + assert(file_stack_.size()); + + return file_stack_.top(); + } }; GFXRECON_END_NAMESPACE(decode) diff --git a/framework/decode/replay_options.h b/framework/decode/replay_options.h index 1316f7360e..933f9105e5 100644 --- a/framework/decode/replay_options.h +++ b/framework/decode/replay_options.h @@ -62,6 +62,7 @@ struct ReplayOptions int64_t block_index_to{ -1 }; int32_t num_pipeline_creation_jobs{ 0 }; std::string asset_file_path; + std::string state_file; }; GFXRECON_END_NAMESPACE(decode) diff --git a/framework/encode/capture_manager.cpp b/framework/encode/capture_manager.cpp index 3cb9527a2f..651b18230a 100644 --- a/framework/encode/capture_manager.cpp +++ b/framework/encode/capture_manager.cpp @@ -106,7 +106,7 @@ CommonCaptureManager::CommonCaptureManager() : debug_device_lost_(false), screenshot_prefix_(""), screenshots_enabled_(false), disable_dxr_(false), accel_struct_padding_(0), iunknown_wrapping_(false), force_command_serialization_(false), queue_zero_only_(false), allow_pipeline_compile_required_(false), quit_after_frame_ranges_(false), use_asset_file_(false), block_index_(0), - write_assets_(false), previous_write_assets_(false) + write_assets_(false), previous_write_assets_(false), write_state_files_(true) {} CommonCaptureManager::~CommonCaptureManager() @@ -195,7 +195,7 @@ bool CommonCaptureManager::LockedCreateInstance(ApiCaptureManager* api // NOTE: moved here from CaptureTracker::Initialize... DRY'r than putting it into the API specific // CreateInstances. For actual multiple simulatenous API support we need to ensure all API capture manager // state trackers are in the correct state given the differing settings that may be present. - if ((capture_mode_ & kModeTrack) == kModeTrack) + if ((capture_mode_ & kModeTrack) == kModeTrack || write_state_files_) { api_capture_singleton->CreateStateTracker(); } @@ -311,6 +311,7 @@ bool CommonCaptureManager::Initialize(format::ApiFamilyId api_ force_command_serialization_ = trace_settings.force_command_serialization; queue_zero_only_ = trace_settings.queue_zero_only; allow_pipeline_compile_required_ = trace_settings.allow_pipeline_compile_required; + use_asset_file_ = trace_settings.use_asset_file; rv_annotation_info_.gpuva_mask = trace_settings.rv_anotation_info.gpuva_mask; rv_annotation_info_.descriptor_mask = trace_settings.rv_anotation_info.descriptor_mask; @@ -355,7 +356,7 @@ bool CommonCaptureManager::Initialize(format::ApiFamilyId api_ // External memory takes precedence over shadow memory modes. if (use_external_memory) { - page_guard_memory_mode_ = kMemoryModeExternal; + page_guard_memory_mode_ = kMemoryModeExternal; page_guard_external_memory_ = true; } else if (trace_settings.page_guard_persistent_memory) @@ -388,7 +389,6 @@ bool CommonCaptureManager::Initialize(format::ApiFamilyId api_ trim_enabled_ = true; trim_boundary_ = trace_settings.trim_boundary; quit_after_frame_ranges_ = trace_settings.quit_after_frame_ranges; - use_asset_file_ = trace_settings.use_asset_file; // Check if trim ranges were specified. if (!trace_settings.trim_ranges.empty()) @@ -497,7 +497,7 @@ CommonCaptureManager::ThreadData* CommonCaptureManager::GetThreadData() bool CommonCaptureManager::IsCaptureModeTrack() const { - return (GetCaptureMode() & kModeTrack) == kModeTrack; + return ((GetCaptureMode() & kModeTrack) == kModeTrack) || write_state_files_; } bool CommonCaptureManager::IsCaptureModeWrite() const { @@ -887,6 +887,11 @@ void CommonCaptureManager::EndFrame(format::ApiFamilyId api_family) } } + if (IsCaptureModeWrite() && write_state_files_) + { + WriteFrameStateFile(); + } + // Flush after presents to help avoid capture files with incomplete final blocks. if (file_stream_.get() != nullptr) { @@ -974,7 +979,7 @@ std::string CommonCaptureManager::CreateAssetFile() asset_file_stream_ = std::make_unique(asset_file_name, kFileStreamBufferSize); if (asset_file_stream_->IsValid()) { - WriteAssetFileHeader(); + WriteFileHeader(asset_file_stream_.get()); } else { @@ -1006,19 +1011,19 @@ std::string CommonCaptureManager::CreateAssetFilename(const std::string& base_fi bool CommonCaptureManager::CreateCaptureFile(format::ApiFamilyId api_family, const std::string& base_filename) { - bool success = true; - std::string capture_filename = base_filename; + bool success = true; + capture_filename_ = base_filename; if (timestamp_filename_) { - capture_filename = util::filepath::GenerateTimestampedFilename(capture_filename); + capture_filename_ = util::filepath::GenerateTimestampedFilename(capture_filename_); } - file_stream_ = std::make_unique(capture_filename, kFileStreamBufferSize); + file_stream_ = std::make_unique(capture_filename_, kFileStreamBufferSize); if (file_stream_->IsValid()) { - GFXRECON_LOG_INFO("Recording graphics API capture to %s", capture_filename.c_str()); + GFXRECON_LOG_INFO("Recording graphics API capture to %s", capture_filename_.c_str()); WriteFileHeader(); gfxrecon::util::filepath::FileInfo info{}; @@ -1133,7 +1138,7 @@ bool CommonCaptureManager::CreateCaptureFile(format::ApiFamilyId api_family, con } // Create asset file - if (trim_enabled_ && use_asset_file_ && asset_file_stream_.get() == nullptr) + if (use_asset_file_ && asset_file_stream_.get() == nullptr) { CreateAssetFile(); } @@ -1148,11 +1153,73 @@ void CommonCaptureManager::ActivateTrimming() auto thread_data = GetThreadData(); assert(thread_data != nullptr); + if (!write_state_files_) + { + for (auto& manager : api_capture_managers_) + { + manager.first->WriteTrackedState( + file_stream_.get(), thread_data->thread_id_, use_asset_file_ ? asset_file_stream_.get() : nullptr); + } + } +} + +bool CommonCaptureManager::WriteFrameStateFile() +{ + assert(write_state_files_); + + std::string state_filename = capture_filename_; + + const std::string state_filename_post = std::string("_state_frame_") + std::to_string(current_frame_); + + size_t dot_pos = capture_filename_.rfind('.'); + if (dot_pos != std::string::npos) + { + if (capture_filename_.substr(dot_pos) == ".gfxr") + { + state_filename.insert(dot_pos, state_filename_post); + } + } + else + { + state_filename += state_filename_post; + } + + util::FileOutputStream state_file_stream(state_filename, kFileStreamBufferSize); + if (!state_file_stream.IsValid()) + { + assert(0); + return false; + } + + WriteFileHeader(&state_file_stream); + + auto thread_data = GetThreadData(); + assert(thread_data != nullptr); + for (auto& manager : api_capture_managers_) { manager.first->WriteTrackedState( - file_stream_.get(), thread_data->thread_id_, use_asset_file_ ? asset_file_stream_.get() : nullptr); + &state_file_stream, thread_data->thread_id_, use_asset_file_ ? asset_file_stream_.get() : nullptr); } + + const size_t filename_length = file_stream_->GetFilename().length(); + + format::ExecuteBlocksFromFile execute_from_file; + execute_from_file.meta_header.block_header.size = + format::GetMetaDataBlockBaseSize(execute_from_file) + filename_length; + execute_from_file.meta_header.block_header.type = format::kMetaDataBlock; + execute_from_file.meta_header.meta_data_id = + format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kExecuteBlocksFromFile); + execute_from_file.thread_id = thread_data->thread_id_; + execute_from_file.n_blocks = 0; + execute_from_file.offset = file_stream_->GetOffset(); + execute_from_file.filename_length = filename_length; + + state_file_stream.Write(&execute_from_file, sizeof(execute_from_file)); + state_file_stream.Write(file_stream_->GetFilename().c_str(), filename_length); + state_file_stream.Flush(); + + return true; } void CommonCaptureManager::DeactivateTrimming() @@ -1187,8 +1254,10 @@ void CommonCaptureManager::WriteFileHeader() thread_data->block_index_ = block_index_.load(); } -void CommonCaptureManager::WriteAssetFileHeader() +void CommonCaptureManager::WriteFileHeader(util::FileOutputStream* file_stream) { + assert(file_stream != nullptr); + std::vector option_list; BuildOptionList(file_options_, &option_list); @@ -1199,8 +1268,8 @@ void CommonCaptureManager::WriteAssetFileHeader() file_header.minor_version = 0; file_header.num_options = static_cast(option_list.size()); - WriteToFile(&file_header, sizeof(file_header), asset_file_stream_.get()); - WriteToFile(option_list.data(), option_list.size() * sizeof(format::FileOptionPair), asset_file_stream_.get()); + WriteToFile(&file_header, sizeof(file_header), file_stream); + WriteToFile(option_list.data(), option_list.size() * sizeof(format::FileOptionPair), file_stream); } void CommonCaptureManager::BuildOptionList(const format::EnabledOptions& enabled_options, diff --git a/framework/encode/capture_manager.h b/framework/encode/capture_manager.h index 11e6fb93a7..b129566d7f 100644 --- a/framework/encode/capture_manager.h +++ b/framework/encode/capture_manager.h @@ -272,7 +272,9 @@ class CommonCaptureManager void DeactivateTrimming(); void WriteFileHeader(); - void WriteAssetFileHeader(); + + void WriteFileHeader(util::FileOutputStream* file_stream); + void BuildOptionList(const format::EnabledOptions& enabled_options, std::vector* option_list); @@ -316,6 +318,8 @@ class CommonCaptureManager void SetWriteAssets() { write_assets_ = true; } + bool WriteFrameStateFile(); + protected: std::unique_ptr compressor_; std::mutex mapped_memory_lock_; @@ -351,6 +355,7 @@ class CommonCaptureManager std::unique_ptr asset_file_stream_; format::EnabledOptions file_options_; std::string base_filename_; + std::string capture_filename_; bool timestamp_filename_; bool force_file_flush_; CaptureSettings::MemoryTrackingMode memory_tracking_mode_; @@ -389,6 +394,7 @@ class CommonCaptureManager bool use_asset_file_; bool write_assets_; bool previous_write_assets_; + bool write_state_files_; struct { diff --git a/tools/replay/desktop_main.cpp b/tools/replay/desktop_main.cpp index f705abc2cd..658e9b2f9c 100644 --- a/tools/replay/desktop_main.cpp +++ b/tools/replay/desktop_main.cpp @@ -161,7 +161,14 @@ int main(int argc, const char** argv) file_processor = std::make_unique(); } - if (!file_processor->Initialize(filename)) + const bool use_state_file = arg_parser.IsArgumentSet(kStateFileArgument); + std::string state_file; + if (use_state_file) + { + state_file = arg_parser.GetArgumentValue(kStateFileArgument); + } + + if (!file_processor->Initialize(filename, use_state_file ? &state_file : nullptr)) { return_code = -1; } diff --git a/tools/replay/replay_settings.h b/tools/replay/replay_settings.h index 5073d24a70..8682f3910a 100644 --- a/tools/replay/replay_settings.h +++ b/tools/replay/replay_settings.h @@ -43,7 +43,7 @@ const char kArguments[] = "force-windowed,--fwo|--force-windowed-origin,--batching-memory-usage,--measurement-file,--swapchain,--sgfs|--skip-" "get-fence-status,--sgfr|--" "skip-get-fence-ranges,--dump-resources,--dump-resources-scale,--dump-resources-image-format,--dump-resources-dir," - "--dump-resources-dump-color-attachment-index,--pbis,--pcj|--pipeline-creation-jobs,--asset-file-path"; + "--dump-resources-dump-color-attachment-index,--pbis,--pcj|--pipeline-creation-jobs,--asset-file-path,--state-file"; static void PrintUsage(const char* exe_name) { @@ -165,6 +165,7 @@ static void PrintUsage(const char* exe_name) GFXRECON_WRITE_CONSOLE(" \t\toriginal capture devices."); GFXRECON_WRITE_CONSOLE(" --pbi-all\t\tPrint all block information."); GFXRECON_WRITE_CONSOLE(" --asset-file-path\t\tProvide an alternative path for the asset file."); + GFXRECON_WRITE_CONSOLE(" --state-file\t\tPath to state file"); GFXRECON_WRITE_CONSOLE( " --pbis \t\tPrint block information between block index1 and block index2."); #if defined(WIN32) diff --git a/tools/tool_settings.h b/tools/tool_settings.h index 066eb74e2a..3fc9ca27cd 100644 --- a/tools/tool_settings.h +++ b/tools/tool_settings.h @@ -130,6 +130,7 @@ const char kDxOverrideObjectNames[] = "--dx12-override-object-names"; const char kBatchingMemoryUsageArgument[] = "--batching-memory-usage"; #endif const char kAssetFilePathArgument[] = "--asset-file-path"; +const char kStateFileArgument[] = "--state-file"; const char kDumpResourcesArgument[] = "--dump-resources"; const char kDumpResourcesBeforeDrawOption[] = "--dump-resources-before-draw"; @@ -929,6 +930,11 @@ static void GetReplayOptions(gfxrecon::decode::ReplayOptions& options, options.asset_file_path = arg_parser.GetArgumentValue(kAssetFilePathArgument); } + if (arg_parser.IsArgumentSet(kAssetFilePathArgument)) + { + options.state_file = arg_parser.GetArgumentValue(kStateFileArgument); + } + const auto& override_gpu = arg_parser.GetArgumentValue(kOverrideGpuArgument); if (!override_gpu.empty()) { From e0070a33f37330fb8c938d7ba8e8ab4c14e3ad14 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sun, 11 Aug 2024 09:05:18 +0300 Subject: [PATCH 55/99] Deactivate state file status when done with trim ranges --- framework/encode/capture_manager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/framework/encode/capture_manager.cpp b/framework/encode/capture_manager.cpp index 651b18230a..b1b86f8955 100644 --- a/framework/encode/capture_manager.cpp +++ b/framework/encode/capture_manager.cpp @@ -732,6 +732,7 @@ void CommonCaptureManager::CheckContinueCaptureForWriteMode(format::ApiFamilyId manager_it.first->DestroyStateTracker(); } compressor_ = nullptr; + write_state_files_ = false; } else if (trim_ranges_[trim_current_range_].first == current_boundary_count) { From 4e40c457603e325f14777a00b5c85fab33145198 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sun, 11 Aug 2024 10:17:07 +0300 Subject: [PATCH 56/99] Enable state file loading for android --- tools/replay/android_main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/replay/android_main.cpp b/tools/replay/android_main.cpp index 4a0ce6c427..eb4dda5dec 100644 --- a/tools/replay/android_main.cpp +++ b/tools/replay/android_main.cpp @@ -107,7 +107,14 @@ void android_main(struct android_app* app) ? std::make_unique() : std::make_unique(); - if (!file_processor->Initialize(filename)) + const bool use_state_file = arg_parser.IsArgumentSet(kStateFileArgument); + std::string state_file; + if (use_state_file) + { + state_file = arg_parser.GetArgumentValue(kStateFileArgument); + } + + if (!file_processor->Initialize(filename, use_state_file ? &state_file : nullptr)) { GFXRECON_WRITE_CONSOLE("Failed to load file %s.", filename.c_str()); } From 0abbfc882bd7db106931afc8a2fbe97320ee0f9d Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sun, 11 Aug 2024 15:56:12 +0300 Subject: [PATCH 57/99] Override path --- android/scripts/gfxrecon.py | 8 ++-- framework/decode/file_processor.cpp | 57 +++++++++++++++++------- framework/decode/file_processor.h | 10 +++-- framework/decode/replay_options.h | 2 +- framework/encode/vulkan_state_writer.cpp | 2 +- tools/replay/android_main.cpp | 14 +++--- tools/replay/desktop_main.cpp | 15 ++++--- tools/replay/replay_settings.h | 2 +- tools/tool_settings.h | 10 ++--- 9 files changed, 77 insertions(+), 43 deletions(-) diff --git a/android/scripts/gfxrecon.py b/android/scripts/gfxrecon.py index 9bfaaafb7c..f6414cfb50 100644 --- a/android/scripts/gfxrecon.py +++ b/android/scripts/gfxrecon.py @@ -114,7 +114,7 @@ def CreateReplayParser(): parser.add_argument('--pbi-all', action='store_true', default=False, help='Print all block information.') parser.add_argument('--pbis', metavar='RANGES', default=False, help='Print block information between block index1 and block index2') parser.add_argument('--pcj', '--pipeline-creation-jobs', action='store_true', default=False, help='Specify the number of pipeline-creation-jobs or background-threads.') - parser.add_argument('--asset-file-path', metavar='RANGES', default=False, help='Provide an alternative path for the asset file') + parser.add_argument('--override-path', metavar='RANGES', default=False, help='Provide an alternative path for the capture file(s)') parser.add_argument('--state-file', metavar='RANGES', default=False, help='State file') return parser @@ -284,9 +284,9 @@ def MakeExtrasString(args): arg_list.append('--pcj') arg_list.append('{}'.format(args.pcj)) - if args.asset_file_path: - arg_list.append('--asset-file-path') - arg_list.append('{}'.format(args.asset_file_path)) + if args.override_path: + arg_list.append('--override-path') + arg_list.append('{}'.format(args.override_path)) if args.state_file: arg_list.append('--state-file') diff --git a/framework/decode/file_processor.cpp b/framework/decode/file_processor.cpp index 088faa1bc3..c61d431647 100644 --- a/framework/decode/file_processor.cpp +++ b/framework/decode/file_processor.cpp @@ -78,8 +78,15 @@ void FileProcessor::WaitDecodersIdle() } }; -bool FileProcessor::Initialize(const std::string& filename, const std::string* state_file) +bool FileProcessor::Initialize(const std::string& filename, + const std::string* state_file, + const std::string* override_path) { + if (override_path != nullptr) + { + override_path_ = *override_path; + } + bool success = OpenFile(filename); if (success) @@ -106,21 +113,48 @@ bool FileProcessor::Initialize(const std::string& filename, const std::string* s return success; } +std::string FileProcessor::ApplyOverrideFilePath(const std::string& file) +{ + if (override_path_.empty()) + { + return file; + } + + + std::string new_file = file; + const size_t slash_last_pos = new_file.find_last_of('/'); + if (slash_last_pos != std::string::npos) + { + new_file = new_file.substr(slash_last_pos); + new_file = override_path_ + new_file; + // new_file = std::string(".") + new_file; + } + + GFXRECON_WRITE_CONSOLE("%s -> %s", file.c_str(), new_file.c_str()) + + return new_file; +} + bool FileProcessor::OpenFile(const std::string& filename) { - if (active_files_.find(filename) == active_files_.end()) + std::string new_filename = ApplyOverrideFilePath(filename); + + GFXRECON_WRITE_CONSOLE("new_filename: %s", new_filename.c_str()) + + if (active_files_.find(new_filename) == active_files_.end()) { FILE* fd; - int result = util::platform::FileOpen(&fd, filename.c_str(), "rb"); + int result = util::platform::FileOpen(&fd, new_filename.c_str(), "rb"); if (result || fd == nullptr) { - GFXRECON_LOG_ERROR("Failed to open file %s", filename.c_str()); + GFXRECON_LOG_ERROR("Failed to open file %s", new_filename.c_str()); error_state_ = kErrorOpeningFile; return false; } else { - active_files_.emplace(std::piecewise_construct, std::forward_as_tuple(filename), std::forward_as_tuple(fd)); + active_files_.emplace( + std::piecewise_construct, std::forward_as_tuple(new_filename), std::forward_as_tuple(fd)); error_state_ = kErrorNone; } } @@ -1973,17 +2007,8 @@ bool FileProcessor::ProcessMetaData(const format::BlockHeader& block_header, for { filename_c_str[exec_from_file.filename_length] = '\0'; - std::string filename; - if (override_asset_filename_.empty()) - { - filename = std::string(filename_c_str.data()); - } - else - { - filename = override_asset_filename_; - } - - success = OpenFile(filename); + std::string filename = ApplyOverrideFilePath(std::string(filename_c_str.data())); + success = OpenFile(filename); if (success) { for (auto decoder : decoders_) diff --git a/framework/decode/file_processor.h b/framework/decode/file_processor.h index f055c1e55c..4951b04e5a 100644 --- a/framework/decode/file_processor.h +++ b/framework/decode/file_processor.h @@ -86,7 +86,9 @@ class FileProcessor decoders_.erase(std::remove(decoders_.begin(), decoders_.end(), decoder), decoders_.end()); } - bool Initialize(const std::string& filename, const std::string* state_file = nullptr); + bool Initialize(const std::string& filename, + const std::string* state_file = nullptr, + const std::string* override_path = nullptr); // Returns true if there are more frames to process, false if all frames have been processed or an error has // occurred. Use GetErrorState() to determine error condition. @@ -140,8 +142,6 @@ class FileProcessor block_index_to_ = block_index_to; } - void OverrideAssetFilename(const std::string& new_filename) { override_asset_filename_ = new_filename; } - protected: bool ContinueDecoding(); @@ -238,6 +238,8 @@ class FileProcessor void DecrementRemainingCommands(); + std::string ApplyOverrideFilePath(const std::string& file); + private: format::EnabledOptions enabled_options_; std::vector parameter_buffer_; @@ -276,7 +278,7 @@ class FileProcessor }; std::stack file_stack_; - std::string override_asset_filename_; + std::string override_path_; private: ActiveFileContext& GetCurrentFile() diff --git a/framework/decode/replay_options.h b/framework/decode/replay_options.h index 933f9105e5..cfefc29acd 100644 --- a/framework/decode/replay_options.h +++ b/framework/decode/replay_options.h @@ -61,7 +61,7 @@ struct ReplayOptions int64_t block_index_from{ -1 }; int64_t block_index_to{ -1 }; int32_t num_pipeline_creation_jobs{ 0 }; - std::string asset_file_path; + std::string override_path; std::string state_file; }; diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index 74066412fc..2d287421ba 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -1094,7 +1094,7 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa } } - if (output_stream_ != nullptr) + if (output_stream_ != nullptr && n_blocks) { WriteExecuteFromFile(n_blocks, offset); } diff --git a/tools/replay/android_main.cpp b/tools/replay/android_main.cpp index eb4dda5dec..1f40334c75 100644 --- a/tools/replay/android_main.cpp +++ b/tools/replay/android_main.cpp @@ -114,7 +114,15 @@ void android_main(struct android_app* app) state_file = arg_parser.GetArgumentValue(kStateFileArgument); } - if (!file_processor->Initialize(filename, use_state_file ? &state_file : nullptr)) + const bool use_path_override = arg_parser.IsArgumentSet(kOverridePathArgument); + std::string override_path; + if (use_path_override) + { + override_path = arg_parser.GetArgumentValue(kOverridePathArgument); + } + + if (!file_processor->Initialize( + filename, use_state_file ? &state_file : nullptr, use_path_override ? &override_path : nullptr)) { GFXRECON_WRITE_CONSOLE("Failed to load file %s.", filename.c_str()); } @@ -162,10 +170,6 @@ void android_main(struct android_app* app) decoder.AddConsumer(&replay_consumer); file_processor->AddDecoder(&decoder); - if (!replay_options.asset_file_path.empty()) - { - file_processor->OverrideAssetFilename(replay_options.asset_file_path); - } application->SetPauseFrame(GetPauseFrame(arg_parser)); diff --git a/tools/replay/desktop_main.cpp b/tools/replay/desktop_main.cpp index 658e9b2f9c..e4e49d9650 100644 --- a/tools/replay/desktop_main.cpp +++ b/tools/replay/desktop_main.cpp @@ -168,7 +168,15 @@ int main(int argc, const char** argv) state_file = arg_parser.GetArgumentValue(kStateFileArgument); } - if (!file_processor->Initialize(filename, use_state_file ? &state_file : nullptr)) + const bool use_path_override = arg_parser.IsArgumentSet(kOverridePathArgument); + std::string override_path; + if (use_path_override) + { + override_path = arg_parser.GetArgumentValue(kOverridePathArgument); + } + + if (!file_processor->Initialize( + filename, use_state_file ? &state_file : nullptr, use_path_override ? &override_path : nullptr)) { return_code = -1; } @@ -239,11 +247,6 @@ int main(int argc, const char** argv) vulkan_replay_options.block_index_from, vulkan_replay_options.block_index_to); - if (!vulkan_replay_options.asset_file_path.empty()) - { - file_processor->OverrideAssetFilename(vulkan_replay_options.asset_file_path); - } - #if defined(D3D12_SUPPORT) gfxrecon::decode::DxReplayOptions dx_replay_options = GetDxReplayOptions(arg_parser, filename); gfxrecon::decode::Dx12ReplayConsumer dx12_replay_consumer(application, dx_replay_options); diff --git a/tools/replay/replay_settings.h b/tools/replay/replay_settings.h index 8682f3910a..d65e613c05 100644 --- a/tools/replay/replay_settings.h +++ b/tools/replay/replay_settings.h @@ -43,7 +43,7 @@ const char kArguments[] = "force-windowed,--fwo|--force-windowed-origin,--batching-memory-usage,--measurement-file,--swapchain,--sgfs|--skip-" "get-fence-status,--sgfr|--" "skip-get-fence-ranges,--dump-resources,--dump-resources-scale,--dump-resources-image-format,--dump-resources-dir," - "--dump-resources-dump-color-attachment-index,--pbis,--pcj|--pipeline-creation-jobs,--asset-file-path,--state-file"; + "--dump-resources-dump-color-attachment-index,--pbis,--pcj|--pipeline-creation-jobs,--override-path,--state-file"; static void PrintUsage(const char* exe_name) { diff --git a/tools/tool_settings.h b/tools/tool_settings.h index 3fc9ca27cd..aac89e7e0d 100644 --- a/tools/tool_settings.h +++ b/tools/tool_settings.h @@ -129,8 +129,8 @@ const char kDxTwoPassReplay[] = "--dx12-two-pass-replay"; const char kDxOverrideObjectNames[] = "--dx12-override-object-names"; const char kBatchingMemoryUsageArgument[] = "--batching-memory-usage"; #endif -const char kAssetFilePathArgument[] = "--asset-file-path"; -const char kStateFileArgument[] = "--state-file"; +const char kOverridePathArgument[] = "--override-path"; +const char kStateFileArgument[] = "--state-file"; const char kDumpResourcesArgument[] = "--dump-resources"; const char kDumpResourcesBeforeDrawOption[] = "--dump-resources-before-draw"; @@ -925,12 +925,12 @@ static void GetReplayOptions(gfxrecon::decode::ReplayOptions& options, options.num_pipeline_creation_jobs = std::stoi(arg_parser.GetArgumentValue(kNumPipelineCreationJobs)); } - if (arg_parser.IsArgumentSet(kAssetFilePathArgument)) + if (arg_parser.IsArgumentSet(kOverridePathArgument)) { - options.asset_file_path = arg_parser.GetArgumentValue(kAssetFilePathArgument); + options.override_path = arg_parser.GetArgumentValue(kOverridePathArgument); } - if (arg_parser.IsArgumentSet(kAssetFilePathArgument)) + if (arg_parser.IsArgumentSet(kStateFileArgument)) { options.state_file = arg_parser.GetArgumentValue(kStateFileArgument); } From 6dd2681a92791f32e6fbf611b97efd920fdb9aa0 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 12 Aug 2024 08:30:41 +0300 Subject: [PATCH 58/99] Removed couple of stray printfs --- framework/decode/file_processor.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/framework/decode/file_processor.cpp b/framework/decode/file_processor.cpp index c61d431647..e02639ac23 100644 --- a/framework/decode/file_processor.cpp +++ b/framework/decode/file_processor.cpp @@ -120,18 +120,14 @@ std::string FileProcessor::ApplyOverrideFilePath(const std::string& file) return file; } - std::string new_file = file; const size_t slash_last_pos = new_file.find_last_of('/'); if (slash_last_pos != std::string::npos) { new_file = new_file.substr(slash_last_pos); new_file = override_path_ + new_file; - // new_file = std::string(".") + new_file; } - GFXRECON_WRITE_CONSOLE("%s -> %s", file.c_str(), new_file.c_str()) - return new_file; } @@ -139,8 +135,6 @@ bool FileProcessor::OpenFile(const std::string& filename) { std::string new_filename = ApplyOverrideFilePath(filename); - GFXRECON_WRITE_CONSOLE("new_filename: %s", new_filename.c_str()) - if (active_files_.find(new_filename) == active_files_.end()) { FILE* fd; From 9c2c86bf09e2e3898d903127bd9c1f49cd762a3f Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 12 Aug 2024 08:55:07 +0300 Subject: [PATCH 59/99] Writing state files is control by an env var --- USAGE_android.md | 1 + USAGE_desktop_Vulkan.md | 5 +++-- framework/encode/capture_manager.cpp | 5 +++-- framework/encode/capture_settings.cpp | 9 +++++++++ framework/encode/capture_settings.h | 1 + 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/USAGE_android.md b/USAGE_android.md index 891f97226e..0f817a8f10 100644 --- a/USAGE_android.md +++ b/USAGE_android.md @@ -308,6 +308,7 @@ option values. | Capture trigger for Android | debug.gfxrecon.capture_android_trigger | BOOL | Set during runtime to `true` to start capturing and to `false` to stop. If not set at all then it is disabled (non-trimmed capture). Default is not set. | | Use asset file | debug.gfxrecon.capture_use_asset_file | BOOL | When set to `true` assets (images, buffers and descriptors) will be stored separately into an asset file instead of the capture file. | | Use asset file | debug.gfxrecon.capture_android_dump_assets | BOOL | Setting this triggers a dump of all assets into the asset file. Since android options cannot be set by the layer, dumping is done whenever this option switches between from `false` to `true` or from `true` to `false`. Default is: `false` | +| Write state files | debug.gfxrecon.capture_write_state_files | BOOL | When set to `true` for each frame captured its corresponding state will be stored in a separate capture file. Specifying a specific state file can start replaying from the corresponding frame. Default is: `false` | | Capture File Compression Type | debug.gfxrecon.capture_compression_type | STRING | Compression format to use with the capture file. Valid values are: `LZ4`, `ZLIB`, `ZSTD`, and `NONE`. Default is: `LZ4` | | Capture File Timestamp | debug.gfxrecon.capture_file_timestamp | BOOL | Add a timestamp to the capture file as described by [Timestamps](#timestamps). Default is: `true` | | Capture File Flush After Write | debug.gfxrecon.capture_file_flush | BOOL | Flush output stream after each packet is written to the capture file. Default is: `false` | diff --git a/USAGE_desktop_Vulkan.md b/USAGE_desktop_Vulkan.md index f8ccdf3f4a..2715566437 100644 --- a/USAGE_desktop_Vulkan.md +++ b/USAGE_desktop_Vulkan.md @@ -263,6 +263,7 @@ option values. | Hotkey Capture Trigger | GFXRECON_CAPTURE_TRIGGER | STRING | Specify a hotkey (any one of F1-F12, TAB, CONTROL) that will be used to start/stop capture. Example: `F3` will set the capture trigger to F3 hotkey. One capture file will be generated for each pair of start/stop hotkey presses. Default is: Empty string (hotkey capture trigger is disabled). | | Hotkey Capture Trigger Frames | GFXRECON_CAPTURE_TRIGGER_FRAMES | STRING | Specify a limit on the number of frames to be captured via hotkey. Example: `1` will capture exactly one frame when the trigger key is pressed. Default is: Empty string (no limit) | | Use asset file | GFXRECON_CAPTURE_USE_ASSET_FILE | BOOL | When set to `true` assets (images, buffers and descriptors) will be stored separately into an asset file instead of the capture file. | +| Write state files | GFXRECON_CAPTURE_WRITE_STATE_FILES | BOOL | When set to `true` for each frame captured its corresponding state will be stored in a separate capture file. Specifying a specific state file can start replaying from the corresponding frame. Default is: `false` | | Capture Specific GPU Queue Submits | GFXRECON_CAPTURE_QUEUE_SUBMITS | STRING | Specify one or more comma-separated GPU queue submit call ranges to capture. Queue submit calls are `vkQueueSubmit` for Vulkan and `ID3D12CommandQueue::ExecuteCommandLists` for DX12. Queue submit ranges work as described above in `GFXRECON_CAPTURE_FRAMES` but on GPU queue submit calls instead of frames. Default is: Empty string (all queue submits are captured). | | Capture File Compression Type | GFXRECON_CAPTURE_COMPRESSION_TYPE | STRING | Compression format to use with the capture file. Valid values are: `LZ4`, `ZLIB`, `ZSTD`, and `NONE`. Default is: `LZ4` | | Capture File Timestamp | GFXRECON_CAPTURE_FILE_TIMESTAMP | BOOL | Add a timestamp to the capture file as described by [Timestamps](#timestamps). Default is: `true` | @@ -770,7 +771,7 @@ Optional arguments: Enables dumping of resources that are used as inputs in the commands requested for dumping. --dump-resources-dump-all-image-subresources Enables dumping of all image sub resources (mip map levels and array layers). - --pbi-all + --pbi-all Print all block information. --pbis Print block information between block index1 and block index2. @@ -778,7 +779,7 @@ Optional arguments: Specify the number of asynchronous pipeline-creation jobs as integer. If is negative it will be added to the number of cpu-cores, e.g. -1 -> num_cores - 1. Default: 0 (do not use asynchronous operations) - + ``` ### Key Controls diff --git a/framework/encode/capture_manager.cpp b/framework/encode/capture_manager.cpp index b1b86f8955..100279cf65 100644 --- a/framework/encode/capture_manager.cpp +++ b/framework/encode/capture_manager.cpp @@ -106,7 +106,7 @@ CommonCaptureManager::CommonCaptureManager() : debug_device_lost_(false), screenshot_prefix_(""), screenshots_enabled_(false), disable_dxr_(false), accel_struct_padding_(0), iunknown_wrapping_(false), force_command_serialization_(false), queue_zero_only_(false), allow_pipeline_compile_required_(false), quit_after_frame_ranges_(false), use_asset_file_(false), block_index_(0), - write_assets_(false), previous_write_assets_(false), write_state_files_(true) + write_assets_(false), previous_write_assets_(false), write_state_files_(false) {} CommonCaptureManager::~CommonCaptureManager() @@ -312,6 +312,7 @@ bool CommonCaptureManager::Initialize(format::ApiFamilyId api_ queue_zero_only_ = trace_settings.queue_zero_only; allow_pipeline_compile_required_ = trace_settings.allow_pipeline_compile_required; use_asset_file_ = trace_settings.use_asset_file; + write_state_files_ = trace_settings.write_state_files; rv_annotation_info_.gpuva_mask = trace_settings.rv_anotation_info.gpuva_mask; rv_annotation_info_.descriptor_mask = trace_settings.rv_anotation_info.descriptor_mask; @@ -731,7 +732,7 @@ void CommonCaptureManager::CheckContinueCaptureForWriteMode(format::ApiFamilyId { manager_it.first->DestroyStateTracker(); } - compressor_ = nullptr; + compressor_ = nullptr; write_state_files_ = false; } else if (trim_ranges_[trim_current_range_].first == current_boundary_count) diff --git a/framework/encode/capture_settings.cpp b/framework/encode/capture_settings.cpp index 123d07c67a..9c5cf638a9 100644 --- a/framework/encode/capture_settings.cpp +++ b/framework/encode/capture_settings.cpp @@ -99,6 +99,8 @@ GFXRECON_BEGIN_NAMESPACE(encode) #define CAPTURE_QUEUE_SUBMITS_UPPER "CAPTURE_QUEUE_SUBMITS" #define CAPTURE_USE_ASSET_FILE_LOWER "capture_use_asset_file" #define CAPTURE_USE_ASSET_FILE_UPPER "CAPTURE_USE_ASSET_FILE" +#define CAPTURE_WRITE_STATE_FILES_LOWER "capture_write_state_files" +#define CAPTURE_WRITE_STATE_FILES_UPPER "CAPTURE_WRITE_STATE_FILES" #define PAGE_GUARD_COPY_ON_MAP_LOWER "page_guard_copy_on_map" #define PAGE_GUARD_COPY_ON_MAP_UPPER "PAGE_GUARD_COPY_ON_MAP" #define PAGE_GUARD_SEPARATE_READ_LOWER "page_guard_separate_read" @@ -172,6 +174,7 @@ const char kCaptureTriggerFramesEnvVar[] = GFXRECON_ENV_VAR_ const char kCaptureIUnknownWrappingEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_IUNKNOWN_WRAPPING_LOWER; const char kCaptureQueueSubmitsEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_QUEUE_SUBMITS_LOWER; const char kCaptureUseAssetFileEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_USE_ASSET_FILE_LOWER; +const char kCaptureWriteStateFilesEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_WRITE_STATE_FILES_LOWER; const char kPageGuardCopyOnMapEnvVar[] = GFXRECON_ENV_VAR_PREFIX PAGE_GUARD_COPY_ON_MAP_LOWER; const char kPageGuardSeparateReadEnvVar[] = GFXRECON_ENV_VAR_PREFIX PAGE_GUARD_SEPARATE_READ_LOWER; const char kPageGuardPersistentMemoryEnvVar[] = GFXRECON_ENV_VAR_PREFIX PAGE_GUARD_PERSISTENT_MEMORY_LOWER; @@ -206,6 +209,7 @@ const char kCaptureFileFlushEnvVar[] = GFXRECON_ENV_VAR_ const char kCaptureFileNameEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_FILE_NAME_UPPER; const char kCaptureFileUseTimestampEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_FILE_USE_TIMESTAMP_UPPER; const char kCaptureUseAssetFileEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_USE_ASSET_FILE_UPPER; +const char kCaptureWriteStateFilesEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_WRITE_STATE_FILES_UPPER; const char kLogAllowIndentsEnvVar[] = GFXRECON_ENV_VAR_PREFIX LOG_ALLOW_INDENTS_UPPER; const char kLogBreakOnErrorEnvVar[] = GFXRECON_ENV_VAR_PREFIX LOG_BREAK_ON_ERROR_UPPER; const char kLogDetailedEnvVar[] = GFXRECON_ENV_VAR_PREFIX LOG_DETAILED_UPPER; @@ -279,6 +283,7 @@ const std::string kOptionKeyCaptureTriggerFrames = std::stri const std::string kOptionKeyCaptureIUnknownWrapping = std::string(kSettingsFilter) + std::string(CAPTURE_IUNKNOWN_WRAPPING_LOWER); const std::string kOptionKeyCaptureQueueSubmits = std::string(kSettingsFilter) + std::string(CAPTURE_QUEUE_SUBMITS_LOWER); const std::string kOptionKeyCaptureUseAssetFile = std::string(kSettingsFilter) + std::string(CAPTURE_USE_ASSET_FILE_LOWER); +const std::string kOptionKeyCaptureWriteStateFiles = std::string(kSettingsFilter) + std::string(CAPTURE_WRITE_STATE_FILES_LOWER); const std::string kOptionKeyPageGuardCopyOnMap = std::string(kSettingsFilter) + std::string(PAGE_GUARD_COPY_ON_MAP_LOWER); const std::string kOptionKeyPageGuardSeparateRead = std::string(kSettingsFilter) + std::string(PAGE_GUARD_SEPARATE_READ_LOWER); const std::string kOptionKeyPageGuardPersistentMemory = std::string(kSettingsFilter) + std::string(PAGE_GUARD_PERSISTENT_MEMORY_LOWER); @@ -428,6 +433,7 @@ void CaptureSettings::LoadOptionsEnvVar(OptionsMap* options) LoadSingleOptionEnvVar(options, kCaptureTriggerFramesEnvVar, kOptionKeyCaptureTriggerFrames); LoadSingleOptionEnvVar(options, kCaptureQueueSubmitsEnvVar, kOptionKeyCaptureQueueSubmits); LoadSingleOptionEnvVar(options, kCaptureUseAssetFileEnvVar, kOptionKeyCaptureUseAssetFile); + LoadSingleOptionEnvVar(options, kCaptureWriteStateFilesEnvVar, kOptionKeyCaptureWriteStateFiles); // Page guard environment variables LoadSingleOptionEnvVar(options, kPageGuardCopyOnMapEnvVar, kOptionKeyPageGuardCopyOnMap); @@ -568,6 +574,9 @@ void CaptureSettings::ProcessOptions(OptionsMap* options, CaptureSettings* setti settings->trace_settings_.use_asset_file = ParseBoolString(FindOption(options, kOptionKeyCaptureUseAssetFile), settings->trace_settings_.use_asset_file); + settings->trace_settings_.write_state_files = ParseBoolString(FindOption(options, kOptionKeyCaptureWriteStateFiles), + settings->trace_settings_.use_asset_file); + // Page guard environment variables settings->trace_settings_.page_guard_copy_on_map = ParseBoolString( FindOption(options, kOptionKeyPageGuardCopyOnMap), settings->trace_settings_.page_guard_copy_on_map); diff --git a/framework/encode/capture_settings.h b/framework/encode/capture_settings.h index 0d6be3966d..70d4be4b6e 100644 --- a/framework/encode/capture_settings.h +++ b/framework/encode/capture_settings.h @@ -120,6 +120,7 @@ class CaptureSettings bool allow_pipeline_compile_required{ false }; bool quit_after_frame_ranges{ false }; bool use_asset_file{ false }; + bool write_state_files{ false }; // An optimization for the page_guard memory tracking mode that eliminates the need for shadow memory by // overriding vkAllocateMemory so that all host visible allocations use the external memory extension with a From dc1547e49b45b9206becfc27825daab14709f776 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 12 Aug 2024 09:47:18 +0300 Subject: [PATCH 60/99] --override-path now works for gfxrecon-convert too --- tools/convert/main.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/convert/main.cpp b/tools/convert/main.cpp index b7528d0836..f0572b657c 100644 --- a/tools/convert/main.cpp +++ b/tools/convert/main.cpp @@ -46,7 +46,7 @@ using Dx12JsonConsumer = #endif const char kOptions[] = "-h|--help,--version,--no-debug-popup,--file-per-frame,--include-binaries,--expand-flags"; -const char kArguments[] = "--output,--format"; +const char kArguments[] = "--output,--format,--override-path"; static void PrintUsage(const char* exe_name) { @@ -81,6 +81,7 @@ static void PrintUsage(const char* exe_name) GFXRECON_WRITE_CONSOLE( " --file-per-frame\tCreates a new file for every frame processed. Frame number is added as a suffix"); GFXRECON_WRITE_CONSOLE(" \tto the output file name."); + GFXRECON_WRITE_CONSOLE(" --alternative-path\tProvide an alternative path for capture files"); #if defined(WIN32) && defined(_DEBUG) GFXRECON_WRITE_CONSOLE(" --no-debug-popup\tDisable the 'Abort, Retry, Ignore' message box"); @@ -171,8 +172,15 @@ int main(int argc, const char** argv) bool dump_binaries = arg_parser.IsOptionSet(kIncludeBinariesOption); bool expand_flags = arg_parser.IsOptionSet(kExpandFlagsOption); bool file_per_frame = arg_parser.IsOptionSet(kFilePerFrameOption); + bool use_override_path = arg_parser.IsArgumentSet(kOverridePathArgument); bool output_to_stdout = output_filename == "stdout"; + std::string override_path; + if (use_override_path) + { + override_path = arg_parser.GetArgumentValue(kOverridePathArgument); + } + gfxrecon::decode::FileProcessor file_processor; #ifndef D3D12_SUPPORT @@ -198,7 +206,7 @@ int main(int argc, const char** argv) gfxrecon::util::filepath::MakeDirectory(data_dir); } - if (file_processor.Initialize(input_filename)) + if (file_processor.Initialize(input_filename, nullptr, use_override_path ? &override_path : nullptr)) { std::string json_filename; FILE* out_file_handle = nullptr; From 5aeb8aae72e0e1aa28983961eb750abb2083e4ac Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 12 Aug 2024 12:33:08 +0300 Subject: [PATCH 61/99] Fixes for other file processor users --- framework/decode/file_processor.h | 75 ++++++++++++++++++++++--------- tools/info/main.cpp | 15 ++++--- 2 files changed, 62 insertions(+), 28 deletions(-) diff --git a/framework/decode/file_processor.h b/framework/decode/file_processor.h index 4951b04e5a..63fa62b0f5 100644 --- a/framework/decode/file_processor.h +++ b/framework/decode/file_processor.h @@ -97,17 +97,17 @@ class FileProcessor // Returns false if processing failed. Use GetErrorState() to determine error condition for failure case. bool ProcessAllFrames(); - const format::FileHeader& GetFileHeader() const + const format::FileHeader& GetFileHeader(const std::string& filename) const { - auto file_entry = active_files_.find(file_stack_.top().filename); + auto file_entry = active_files_.find(filename); assert(file_entry != active_files_.end()); return file_entry->second.file_header; } - const std::vector& GetFileOptions() const + const std::vector& GetFileOptions(const std::string& filename) const { - auto file_entry = active_files_.find(file_stack_.top().filename); + auto file_entry = active_files_.find(filename); assert(file_entry != active_files_.end()); return file_entry->second.file_options; @@ -117,20 +117,34 @@ class FileProcessor uint64_t GetNumBytesRead() const { - auto file_entry = active_files_.find(file_stack_.top().filename); - assert(file_entry != active_files_.end()); + if (!file_stack_.empty()) + { + auto file_entry = active_files_.find(file_stack_.top().filename); + assert(file_entry != active_files_.end()); - return file_entry->second.bytes_read; + return file_entry->second.bytes_read; + } + else + { + return 0; + } } Error GetErrorState() const { return error_state_; } bool EntireFileWasProcessed() const { - auto file_entry = active_files_.find(file_stack_.top().filename); - assert(file_entry != active_files_.end()); + if (!file_stack_.empty()) + { + auto file_entry = active_files_.find(file_stack_.top().filename); + assert(file_entry != active_files_.end()); - return (feof(file_entry->second.fd) != 0); + return (feof(file_entry->second.fd) != 0); + } + else + { + return true; + } } bool UsesFrameMarkers() const { return capture_uses_frame_markers_; } @@ -186,10 +200,17 @@ class FileProcessor { assert(!file_stack_.empty()); - auto file_entry = active_files_.find(file_stack_.top().filename); - assert(file_entry != active_files_.end()); + if (!file_stack_.empty()) + { + auto file_entry = active_files_.find(file_stack_.top().filename); + assert(file_entry != active_files_.end()); - return file_entry->second.fd; + return file_entry->second.fd; + } + else + { + return nullptr; + } } private: @@ -207,23 +228,33 @@ class FileProcessor { assert(!file_stack_.empty()); - auto file_entry = active_files_.find(file_stack_.top().filename); - assert(file_entry != active_files_.end()); + if (!file_stack_.empty()) + { + + auto file_entry = active_files_.find(file_stack_.top().filename); + assert(file_entry != active_files_.end()); - return (file_entry->second.file_header.fourcc == GFXRECON_FOURCC); + return (file_entry->second.file_header.fourcc == GFXRECON_FOURCC); + } + else + { + return false; + } } bool IsFileValid() const { - if (file_stack_.empty()) + if (!file_stack_.empty()) + { + auto file_entry = active_files_.find(file_stack_.top().filename); + assert(file_entry != active_files_.end()); + + return (file_entry->second.fd && !feof(file_entry->second.fd) && !ferror(file_entry->second.fd)); + } + else { return false; } - - auto file_entry = active_files_.find(file_stack_.top().filename); - assert(file_entry != active_files_.end()); - - return (file_entry->second.fd && !feof(file_entry->second.fd) && !ferror(file_entry->second.fd)); } bool OpenFile(const std::string& filename); diff --git a/tools/info/main.cpp b/tools/info/main.cpp index 0110c80be3..b10a748049 100644 --- a/tools/info/main.cpp +++ b/tools/info/main.cpp @@ -203,14 +203,15 @@ static std::string GetVersionString(uint32_t api_version) void GatherApiAgnosticStats(ApiAgnosticStats& api_agnostic_stats, gfxrecon::decode::FileProcessor& file_processor, - gfxrecon::decode::StatConsumer& stat_consumer) + gfxrecon::decode::StatConsumer& stat_consumer, + const std::string& input_filename) { api_agnostic_stats.error_state = file_processor.GetErrorState(); // File options. gfxrecon::format::CompressionType compression_type = gfxrecon::format::CompressionType::kNone; - auto file_options = file_processor.GetFileOptions(); + auto file_options = file_processor.GetFileOptions(input_filename); for (const auto& option : file_options) { if (option.key == gfxrecon::format::FileOption::kCompressionType) @@ -360,7 +361,8 @@ void GatherAndPrintExeInfo(const std::string& input_filename) void PrintVulkanStats(const gfxrecon::decode::VulkanStatsConsumer& vulkan_stats_consumer, const gfxrecon::decode::FileProcessor& file_processor, const ApiAgnosticStats& api_agnostic_stats, - const AnnotationRecorder& annotation_recoder) + const AnnotationRecorder& annotation_recoder, + const std::string& input_filename) { if (api_agnostic_stats.error_state == gfxrecon::decode::FileProcessor::kErrorNone) { @@ -368,7 +370,7 @@ void PrintVulkanStats(const gfxrecon::decode::VulkanStatsConsumer& vulkan_stats_ GFXRECON_WRITE_CONSOLE("File info:"); gfxrecon::format::CompressionType compression_type = gfxrecon::format::CompressionType::kNone; - auto file_options = file_processor.GetFileOptions(); + auto file_options = file_processor.GetFileOptions(input_filename); for (const auto& option : file_options) { if (option.key == gfxrecon::format::FileOption::kCompressionType) @@ -792,7 +794,7 @@ void GatherAndPrintAllInfo(const std::string& input_filename) if (file_processor.GetErrorState() == gfxrecon::decode::FileProcessor::kErrorNone) { ApiAgnosticStats api_agnostic_stats = {}; - GatherApiAgnosticStats(api_agnostic_stats, file_processor, stat_consumer); + GatherApiAgnosticStats(api_agnostic_stats, file_processor, stat_consumer, input_filename); std::vector target_annotations = { { "GFXR version", gfxrecon::format::kOperationAnnotationGfxreconstructVersion }, @@ -815,7 +817,8 @@ void GatherAndPrintAllInfo(const std::string& input_filename) if (vulkan_detection_consumer.WasVulkanAPIDetected() || print_all_apis) { - PrintVulkanStats(vulkan_stats_consumer, file_processor, api_agnostic_stats, annotation_recorder); + PrintVulkanStats( + vulkan_stats_consumer, file_processor, api_agnostic_stats, annotation_recorder, input_filename); // Add annotations relevant to Vulkan target_annotations.push_back({ "Vulkan version", gfxrecon::format::kOperationAnnotationVulkanVersion }); From 0dc5578b5e9ac802a48d7d953e3361297dc44e51 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Tue, 13 Aug 2024 08:46:58 +0300 Subject: [PATCH 62/99] Add few comments in ExecuteBlocksFromFile metacommand --- framework/encode/vulkan_state_writer.cpp | 2 ++ framework/format/format.h | 13 ++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index 2d287421ba..359a0826fa 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -1094,6 +1094,8 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa } } + // Don't write when n_blocks is zero because it will be translated + // as execute till the end of file if (output_stream_ != nullptr && n_blocks) { WriteExecuteFromFile(n_blocks, offset); diff --git a/framework/format/format.h b/framework/format/format.h index e5a71d285e..d3ae0169af 100644 --- a/framework/format/format.h +++ b/framework/format/format.h @@ -675,9 +675,16 @@ struct ExecuteBlocksFromFile { MetaDataHeader meta_header; format::ThreadId thread_id; - uint32_t n_blocks; - int64_t offset; - uint32_t filename_length; + + // Number of commands to execute from file. + // 0 means execute till the end of file. + uint32_t n_blocks; + + // The offset from the start of the file to start executing + int64_t offset; + + // Number of characters in file name + uint32_t filename_length; }; // Restore size_t to normal behavior. From d820d6777f3ac8a9aedd1017f352a5efd630b238 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Thu, 15 Aug 2024 09:42:35 +0300 Subject: [PATCH 63/99] Specifying state file for replay is enough --- android/scripts/gfxrecon.py | 5 ----- framework/decode/file_processor.cpp | 14 +------------- framework/decode/file_processor.h | 4 +--- framework/decode/replay_options.h | 1 - tools/convert/main.cpp | 2 +- tools/replay/android_main.cpp | 10 +--------- tools/replay/desktop_main.cpp | 10 +--------- tools/tool_settings.h | 6 ------ 8 files changed, 5 insertions(+), 47 deletions(-) diff --git a/android/scripts/gfxrecon.py b/android/scripts/gfxrecon.py index f6414cfb50..1f90c0cd0d 100644 --- a/android/scripts/gfxrecon.py +++ b/android/scripts/gfxrecon.py @@ -115,7 +115,6 @@ def CreateReplayParser(): parser.add_argument('--pbis', metavar='RANGES', default=False, help='Print block information between block index1 and block index2') parser.add_argument('--pcj', '--pipeline-creation-jobs', action='store_true', default=False, help='Specify the number of pipeline-creation-jobs or background-threads.') parser.add_argument('--override-path', metavar='RANGES', default=False, help='Provide an alternative path for the capture file(s)') - parser.add_argument('--state-file', metavar='RANGES', default=False, help='State file') return parser def MakeExtrasString(args): @@ -288,10 +287,6 @@ def MakeExtrasString(args): arg_list.append('--override-path') arg_list.append('{}'.format(args.override_path)) - if args.state_file: - arg_list.append('--state-file') - arg_list.append('{}'.format(args.state_file)) - if args.file: arg_list.append(args.file) elif not args.version: diff --git a/framework/decode/file_processor.cpp b/framework/decode/file_processor.cpp index e02639ac23..29a29df77b 100644 --- a/framework/decode/file_processor.cpp +++ b/framework/decode/file_processor.cpp @@ -78,9 +78,7 @@ void FileProcessor::WaitDecodersIdle() } }; -bool FileProcessor::Initialize(const std::string& filename, - const std::string* state_file, - const std::string* override_path) +bool FileProcessor::Initialize(const std::string& filename, const std::string* override_path) { if (override_path != nullptr) { @@ -100,16 +98,6 @@ bool FileProcessor::Initialize(const std::string& filename, error_state_ = kErrorOpeningFile; } - if (success && state_file != nullptr) - { - success = OpenFile(*state_file); - if (success) - { - SetActiveFile(*state_file, true); - success = success && ProcessFileHeader(); - } - } - return success; } diff --git a/framework/decode/file_processor.h b/framework/decode/file_processor.h index 63fa62b0f5..227c337b1b 100644 --- a/framework/decode/file_processor.h +++ b/framework/decode/file_processor.h @@ -86,9 +86,7 @@ class FileProcessor decoders_.erase(std::remove(decoders_.begin(), decoders_.end(), decoder), decoders_.end()); } - bool Initialize(const std::string& filename, - const std::string* state_file = nullptr, - const std::string* override_path = nullptr); + bool Initialize(const std::string& filename, const std::string* override_path = nullptr); // Returns true if there are more frames to process, false if all frames have been processed or an error has // occurred. Use GetErrorState() to determine error condition. diff --git a/framework/decode/replay_options.h b/framework/decode/replay_options.h index cfefc29acd..c1198b4376 100644 --- a/framework/decode/replay_options.h +++ b/framework/decode/replay_options.h @@ -62,7 +62,6 @@ struct ReplayOptions int64_t block_index_to{ -1 }; int32_t num_pipeline_creation_jobs{ 0 }; std::string override_path; - std::string state_file; }; GFXRECON_END_NAMESPACE(decode) diff --git a/tools/convert/main.cpp b/tools/convert/main.cpp index f0572b657c..bf130a0f6c 100644 --- a/tools/convert/main.cpp +++ b/tools/convert/main.cpp @@ -206,7 +206,7 @@ int main(int argc, const char** argv) gfxrecon::util::filepath::MakeDirectory(data_dir); } - if (file_processor.Initialize(input_filename, nullptr, use_override_path ? &override_path : nullptr)) + if (file_processor.Initialize(input_filename, use_override_path ? &override_path : nullptr)) { std::string json_filename; FILE* out_file_handle = nullptr; diff --git a/tools/replay/android_main.cpp b/tools/replay/android_main.cpp index 1f40334c75..fd33cc0564 100644 --- a/tools/replay/android_main.cpp +++ b/tools/replay/android_main.cpp @@ -107,13 +107,6 @@ void android_main(struct android_app* app) ? std::make_unique() : std::make_unique(); - const bool use_state_file = arg_parser.IsArgumentSet(kStateFileArgument); - std::string state_file; - if (use_state_file) - { - state_file = arg_parser.GetArgumentValue(kStateFileArgument); - } - const bool use_path_override = arg_parser.IsArgumentSet(kOverridePathArgument); std::string override_path; if (use_path_override) @@ -121,8 +114,7 @@ void android_main(struct android_app* app) override_path = arg_parser.GetArgumentValue(kOverridePathArgument); } - if (!file_processor->Initialize( - filename, use_state_file ? &state_file : nullptr, use_path_override ? &override_path : nullptr)) + if (!file_processor->Initialize(filename, use_path_override ? &override_path : nullptr)) { GFXRECON_WRITE_CONSOLE("Failed to load file %s.", filename.c_str()); } diff --git a/tools/replay/desktop_main.cpp b/tools/replay/desktop_main.cpp index e4e49d9650..59e6010af8 100644 --- a/tools/replay/desktop_main.cpp +++ b/tools/replay/desktop_main.cpp @@ -161,13 +161,6 @@ int main(int argc, const char** argv) file_processor = std::make_unique(); } - const bool use_state_file = arg_parser.IsArgumentSet(kStateFileArgument); - std::string state_file; - if (use_state_file) - { - state_file = arg_parser.GetArgumentValue(kStateFileArgument); - } - const bool use_path_override = arg_parser.IsArgumentSet(kOverridePathArgument); std::string override_path; if (use_path_override) @@ -175,8 +168,7 @@ int main(int argc, const char** argv) override_path = arg_parser.GetArgumentValue(kOverridePathArgument); } - if (!file_processor->Initialize( - filename, use_state_file ? &state_file : nullptr, use_path_override ? &override_path : nullptr)) + if (!file_processor->Initialize(filename, use_path_override ? &override_path : nullptr)) { return_code = -1; } diff --git a/tools/tool_settings.h b/tools/tool_settings.h index aac89e7e0d..8010c3e853 100644 --- a/tools/tool_settings.h +++ b/tools/tool_settings.h @@ -130,7 +130,6 @@ const char kDxOverrideObjectNames[] = "--dx12-override-object-names"; const char kBatchingMemoryUsageArgument[] = "--batching-memory-usage"; #endif const char kOverridePathArgument[] = "--override-path"; -const char kStateFileArgument[] = "--state-file"; const char kDumpResourcesArgument[] = "--dump-resources"; const char kDumpResourcesBeforeDrawOption[] = "--dump-resources-before-draw"; @@ -930,11 +929,6 @@ static void GetReplayOptions(gfxrecon::decode::ReplayOptions& options, options.override_path = arg_parser.GetArgumentValue(kOverridePathArgument); } - if (arg_parser.IsArgumentSet(kStateFileArgument)) - { - options.state_file = arg_parser.GetArgumentValue(kStateFileArgument); - } - const auto& override_gpu = arg_parser.GetArgumentValue(kOverrideGpuArgument); if (!override_gpu.empty()) { From 3fb6efbe44aa73d23cfc75135644a40879048d2c Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sat, 17 Aug 2024 15:17:04 +0300 Subject: [PATCH 64/99] Fix override-path for convert --- tools/convert/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/convert/main.cpp b/tools/convert/main.cpp index bf130a0f6c..1abf41921f 100644 --- a/tools/convert/main.cpp +++ b/tools/convert/main.cpp @@ -81,7 +81,7 @@ static void PrintUsage(const char* exe_name) GFXRECON_WRITE_CONSOLE( " --file-per-frame\tCreates a new file for every frame processed. Frame number is added as a suffix"); GFXRECON_WRITE_CONSOLE(" \tto the output file name."); - GFXRECON_WRITE_CONSOLE(" --alternative-path\tProvide an alternative path for capture files"); + GFXRECON_WRITE_CONSOLE(" --override-path\tProvide an alternative path for capture files"); #if defined(WIN32) && defined(_DEBUG) GFXRECON_WRITE_CONSOLE(" --no-debug-popup\tDisable the 'Abort, Retry, Ignore' message box"); From 5a790c03a4d480755ceba65e624716100de1e499 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sat, 17 Aug 2024 15:19:08 +0300 Subject: [PATCH 65/99] Track resource <-> descriptor set connections When a resource that is bound to one or more descriptor sets is deleted then those descriptor sets are marked as dirty. This will make them to be dumped again in the next WriteState --- framework/encode/vulkan_handle_wrappers.h | 20 +- framework/encode/vulkan_state_tracker.cpp | 370 +++++++++++++++++++++- framework/encode/vulkan_state_tracker.h | 10 + 3 files changed, 395 insertions(+), 5 deletions(-) diff --git a/framework/encode/vulkan_handle_wrappers.h b/framework/encode/vulkan_handle_wrappers.h index e7fe83289a..997f909817 100644 --- a/framework/encode/vulkan_handle_wrappers.h +++ b/framework/encode/vulkan_handle_wrappers.h @@ -75,7 +75,6 @@ struct HandleWrapper // // clang-format off -struct SamplerWrapper : public HandleWrapper {}; struct SamplerYcbcrConversionWrapper : public HandleWrapper {}; struct DebugReportCallbackEXTWrapper : public HandleWrapper {}; struct DebugUtilsMessengerEXTWrapper : public HandleWrapper {}; @@ -167,6 +166,7 @@ struct EventWrapper : public HandleWrapper DeviceWrapper* device{ nullptr }; }; +struct DescriptorSetWrapper; struct AssetWrapperBase { DeviceWrapper* bind_device{ nullptr }; @@ -177,8 +177,9 @@ struct AssetWrapperBase VkDeviceSize bind_offset{ 0 }; uint32_t queue_family_index{ 0 }; - VkDeviceSize size{ 0 }; - bool dirty{ true }; + VkDeviceSize size{ 0 }; + bool dirty{ true }; + std::unordered_set descriptor_sets_bound_to; }; struct BufferWrapper : public HandleWrapper, AssetWrapperBase @@ -202,6 +203,11 @@ struct ImageWrapper : public HandleWrapper, AssetWrapperBase std::set parent_swapchains; }; +struct SamplerWrapper : public HandleWrapper +{ + std::unordered_set descriptor_sets_bound_to; +}; + struct DeviceMemoryWrapper : public HandleWrapper { uint32_t memory_type_index{ std::numeric_limits::max() }; @@ -233,12 +239,16 @@ struct BufferViewWrapper : public HandleWrapper { format::HandleId buffer_id{ format::kNullHandleId }; BufferWrapper* buffer{ nullptr }; + + std::unordered_set descriptor_sets_bound_to; }; struct ImageViewWrapper : public HandleWrapper { format::HandleId image_id{ format::kNullHandleId }; ImageWrapper* image{ nullptr }; + + std::unordered_set descriptor_sets_bound_to; }; struct FramebufferWrapper : public HandleWrapper @@ -515,10 +525,14 @@ struct AccelerationStructureKHRWrapper : public HandleWrapper blas; + + std::unordered_set descriptor_sets_bound_to; }; struct AccelerationStructureNVWrapper : public HandleWrapper { + std::unordered_set descriptor_sets_bound_to; + // TODO: Determine what additional state tracking is needed. }; diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index ce15de799e..af570e7f6e 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -736,6 +736,13 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w dst_sampler_ids[i] = vulkan_wrappers::GetWrappedId(src_info[i].sampler); memcpy(&dst_info[i], &src_info[i], sizeof(dst_info[i])); + + vulkan_wrappers::SamplerWrapper* sampler_wrapper = + vulkan_wrappers::GetWrapper(src_info[i].sampler); + if (sampler_wrapper != nullptr) + { + sampler_wrapper->descriptor_sets_bound_to.insert(wrapper); + } } break; } @@ -753,6 +760,24 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w dst_image_ids[i] = vulkan_wrappers::GetWrappedId(src_info[i].imageView); memcpy(&dst_info[i], &src_info[i], sizeof(dst_info[i])); + + vulkan_wrappers::ImageViewWrapper* image_view_wrapper = + vulkan_wrappers::GetWrapper(src_info[i].imageView); + if (image_view_wrapper != nullptr) + { + image_view_wrapper->descriptor_sets_bound_to.insert(wrapper); + if (image_view_wrapper->image != nullptr) + { + image_view_wrapper->image->descriptor_sets_bound_to.insert(wrapper); + } + } + + vulkan_wrappers::SamplerWrapper* sampler_wrapper = + vulkan_wrappers::GetWrapper(src_info[i].sampler); + if (sampler_wrapper != nullptr) + { + sampler_wrapper->descriptor_sets_bound_to.insert(wrapper); + } } break; } @@ -768,6 +793,17 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w dst_image_ids[i] = vulkan_wrappers::GetWrappedId(src_info[i].imageView); memcpy(&dst_info[i], &src_info[i], sizeof(dst_info[i])); + + vulkan_wrappers::ImageViewWrapper* image_view_wrapper = + vulkan_wrappers::GetWrapper(src_info[i].imageView); + if (image_view_wrapper != nullptr) + { + image_view_wrapper->descriptor_sets_bound_to.insert(wrapper); + if (image_view_wrapper->image != nullptr) + { + image_view_wrapper->image->descriptor_sets_bound_to.insert(wrapper); + } + } } break; } @@ -782,6 +818,13 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w dst_image_ids[i] = vulkan_wrappers::GetWrappedId(src_info[i].imageView); memcpy(&dst_info[i], &src_info[i], sizeof(dst_info[i])); + + vulkan_wrappers::ImageViewWrapper* image_view_wrapper = + vulkan_wrappers::GetWrapper(src_info[i].imageView); + if (image_view_wrapper != nullptr && image_view_wrapper->image != nullptr) + { + image_view_wrapper->image->descriptor_sets_bound_to.insert(wrapper); + } } break; } @@ -797,6 +840,13 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w dst_buffer_ids[i] = vulkan_wrappers::GetWrappedId(src_info[i].buffer); memcpy(&dst_info[i], &src_info[i], sizeof(dst_info[i])); + + vulkan_wrappers::BufferWrapper* buffer_wrapper = + vulkan_wrappers::GetWrapper(src_info[i].buffer); + if (buffer_wrapper != nullptr) + { + buffer_wrapper->descriptor_sets_bound_to.insert(wrapper); + } } break; } @@ -812,6 +862,13 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w dst_buffer_ids[i] = vulkan_wrappers::GetWrappedId(src_info[i].buffer); memcpy(&dst_info[i], &src_info[i], sizeof(dst_info[i])); + + vulkan_wrappers::BufferWrapper* buffer_wrapper = + vulkan_wrappers::GetWrapper(src_info[i].buffer); + if (buffer_wrapper != nullptr) + { + buffer_wrapper->descriptor_sets_bound_to.insert(wrapper); + } } break; } @@ -826,6 +883,17 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w dst_view_ids[i] = vulkan_wrappers::GetWrappedId(src_info[i]); dst_info[i] = src_info[i]; + + vulkan_wrappers::BufferViewWrapper* buffer_view_wrapper = + vulkan_wrappers::GetWrapper(src_info[i]); + if (buffer_view_wrapper != nullptr) + { + buffer_view_wrapper->descriptor_sets_bound_to.insert(wrapper); + if (buffer_view_wrapper->buffer != nullptr) + { + buffer_view_wrapper->buffer->descriptor_sets_bound_to.insert(wrapper); + } + } } break; } @@ -840,6 +908,17 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w dst_view_ids[i] = vulkan_wrappers::GetWrappedId(src_info[i]); dst_info[i] = src_info[i]; + + vulkan_wrappers::BufferViewWrapper* buffer_view_wrapper = + vulkan_wrappers::GetWrapper(src_info[i]); + if (buffer_view_wrapper != nullptr) + { + buffer_view_wrapper->descriptor_sets_bound_to.insert(wrapper); + if (buffer_view_wrapper->buffer != nullptr) + { + buffer_view_wrapper->buffer->descriptor_sets_bound_to.insert(wrapper); + } + } } break; } @@ -858,8 +937,30 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w } break; case VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV: - // TODO - break; + { + VkWriteDescriptorSetAccelerationStructureNV* write_accel_struct = + graphics::GetPNextStruct( + write, VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV); + + if (write_accel_struct != nullptr) + { + const VkAccelerationStructureNV* src_accel_struct = + &write_accel_struct->pAccelerationStructures[current_src_array_element]; + + for (uint32_t i = 0; i < current_writes; ++i) + { + vulkan_wrappers::AccelerationStructureNVWrapper* accel_struct_wrapper = + vulkan_wrappers::GetWrapper( + src_accel_struct[i]); + if (accel_struct_wrapper != nullptr) + { + accel_struct_wrapper->descriptor_sets_bound_to.insert(wrapper); + } + } + } + } + break; + case VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR: { auto write_accel_struct = @@ -879,6 +980,14 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w vulkan_wrappers::GetWrappedId( src_accel_struct[i]); dst_accel_struct[i] = src_accel_struct[i]; + + vulkan_wrappers::AccelerationStructureKHRWrapper* accel_struct_wrapper = + vulkan_wrappers::GetWrapper( + src_accel_struct[i]); + if (accel_struct_wrapper != nullptr) + { + accel_struct_wrapper->descriptor_sets_bound_to.insert(wrapper); + } } } } @@ -1340,6 +1449,7 @@ void VulkanStateTracker::TrackResetDescriptorPool(VkDescriptorPool descriptor_po std::unique_lock lock(state_table_mutex_); for (const auto& set_entry : wrapper->child_sets) { + DestroyState(set_entry.second); state_table_.RemoveWrapper(set_entry.second); } } @@ -1643,6 +1753,7 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::DescriptorPoolWrapper* wr std::unique_lock lock(state_table_mutex_); for (const auto& entry : wrapper->child_sets) { + DestroyState(entry.second); state_table_.RemoveWrapper(entry.second); } } @@ -1683,6 +1794,25 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::AccelerationStructureKHRW { as_device_addresses_map.erase(entry); } + + for (auto entry : wrapper->descriptor_sets_bound_to) + { + entry->dirty = true; + } + + wrapper->descriptor_sets_bound_to.clear(); +} + +void VulkanStateTracker::DestroyState(vulkan_wrappers::AccelerationStructureNVWrapper* wrapper) +{ + assert(wrapper != nullptr); + + for (auto entry : wrapper->descriptor_sets_bound_to) + { + entry->dirty = true; + } + + wrapper->descriptor_sets_bound_to.clear(); } void VulkanStateTracker::DestroyState(vulkan_wrappers::ImageWrapper* wrapper) @@ -1703,6 +1833,25 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::ImageWrapper* wrapper) mem_wrapper->asset_map_lock.unlock(); } } + + for (auto entry : wrapper->descriptor_sets_bound_to) + { + entry->dirty = true; + } + + wrapper->descriptor_sets_bound_to.clear(); +} + +void VulkanStateTracker::DestroyState(vulkan_wrappers::ImageViewWrapper* wrapper) +{ + assert(wrapper != nullptr); + + for (auto entry : wrapper->descriptor_sets_bound_to) + { + entry->dirty = true; + } + + wrapper->descriptor_sets_bound_to.clear(); } void VulkanStateTracker::DestroyState(vulkan_wrappers::BufferWrapper* wrapper) @@ -1723,6 +1872,223 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::BufferWrapper* wrapper) mem_wrapper->asset_map_lock.unlock(); } } + + for (auto entry : wrapper->descriptor_sets_bound_to) + { + entry->dirty = true; + } + + wrapper->descriptor_sets_bound_to.clear(); +} + +void VulkanStateTracker::DestroyState(vulkan_wrappers::BufferViewWrapper* wrapper) +{ + assert(wrapper != nullptr); + + for (auto entry : wrapper->descriptor_sets_bound_to) + { + entry->dirty = true; + } + + wrapper->descriptor_sets_bound_to.clear(); +} + +void VulkanStateTracker::DestroyState(vulkan_wrappers::SamplerWrapper* wrapper) +{ + assert(wrapper != nullptr); + + for (auto entry : wrapper->descriptor_sets_bound_to) + { + entry->dirty = true; + } + + wrapper->descriptor_sets_bound_to.clear(); +} + +void VulkanStateTracker::DestroyState(vulkan_wrappers::DescriptorSetWrapper* wrapper) +{ + for (auto& entry : wrapper->bindings) + { + vulkan_state_info::DescriptorInfo& binding = entry.second; + switch (binding.type) + { + case VK_DESCRIPTOR_TYPE_SAMPLER: + case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE: + case VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER: + case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT: + { + assert(binding.count); + assert(binding.images); + + if (binding.type == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE || + binding.type == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER || + binding.type == VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT) + { + for (uint32_t i = 0; i < binding.count; ++i) + { + vulkan_wrappers::ImageViewWrapper* image_view_wrapper = + vulkan_wrappers::GetWrapper(binding.images[i].imageView); + if (image_view_wrapper != nullptr) + { + auto img_view_desc_entry = image_view_wrapper->descriptor_sets_bound_to.find(wrapper); + if (img_view_desc_entry != image_view_wrapper->descriptor_sets_bound_to.end()) + { + image_view_wrapper->descriptor_sets_bound_to.erase(img_view_desc_entry); + } + + if (image_view_wrapper->image != nullptr) + { + auto img_desc_entry = image_view_wrapper->image->descriptor_sets_bound_to.find(wrapper); + if (img_desc_entry != image_view_wrapper->image->descriptor_sets_bound_to.end()) + { + image_view_wrapper->image->descriptor_sets_bound_to.erase(img_desc_entry); + } + } + } + } + + if (binding.type == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER || + binding.type == VK_DESCRIPTOR_TYPE_SAMPLER) + { + for (uint32_t i = 0; i < binding.count; ++i) + { + vulkan_wrappers::SamplerWrapper* sampler_wrapper = + vulkan_wrappers::GetWrapper(binding.images[i].sampler); + if (sampler_wrapper != nullptr) + { + auto desc_entry = sampler_wrapper->descriptor_sets_bound_to.find(wrapper); + if (desc_entry != sampler_wrapper->descriptor_sets_bound_to.end()) + { + sampler_wrapper->descriptor_sets_bound_to.erase(desc_entry); + } + } + } + } + } + } + break; + + case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE: + { + assert(binding.count); + assert(binding.storage_images); + + for (uint32_t i = 0; i < binding.count; ++i) + { + vulkan_wrappers::ImageViewWrapper* image_view_wrapper = + vulkan_wrappers::GetWrapper( + binding.storage_images[i].imageView); + if (image_view_wrapper != nullptr) + { + auto img_view_desc_entry = image_view_wrapper->descriptor_sets_bound_to.find(wrapper); + if (img_view_desc_entry != image_view_wrapper->descriptor_sets_bound_to.end()) + { + image_view_wrapper->descriptor_sets_bound_to.erase(img_view_desc_entry); + } + + if (image_view_wrapper->image != nullptr) + { + auto img_desc_entry = image_view_wrapper->image->descriptor_sets_bound_to.find(wrapper); + if (img_desc_entry != image_view_wrapper->image->descriptor_sets_bound_to.end()) + { + image_view_wrapper->image->descriptor_sets_bound_to.erase(img_desc_entry); + } + } + } + } + } + break; + + case VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER: + case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER: + { + const bool is_storage = binding.type == VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER; + + assert(binding.count); + assert((is_storage && binding.storage_texel_buffer_views) || + (!is_storage && binding.uniform_texel_buffer_views)); + + for (uint32_t i = 0; i < binding.count; ++i) + { + vulkan_wrappers::BufferViewWrapper* buf_view_wrapper = + vulkan_wrappers::GetWrapper( + is_storage ? binding.storage_texel_buffer_views[i] : binding.uniform_texel_buffer_views[i]); + if (buf_view_wrapper != nullptr) + { + auto view_entry = buf_view_wrapper->descriptor_sets_bound_to.find(wrapper); + if (view_entry != buf_view_wrapper->descriptor_sets_bound_to.end()) + { + buf_view_wrapper->descriptor_sets_bound_to.erase(view_entry); + } + + if (buf_view_wrapper->buffer != nullptr) + { + auto buf_entry = buf_view_wrapper->buffer->descriptor_sets_bound_to.find(wrapper); + if (buf_entry != buf_view_wrapper->buffer->descriptor_sets_bound_to.end()) + { + buf_view_wrapper->buffer->descriptor_sets_bound_to.erase(buf_entry); + } + } + } + } + } + break; + + case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER: + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: + case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC: + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: + { + const bool is_storage = (binding.type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER) || + (binding.type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC); + + assert(binding.count); + assert((is_storage && binding.storage_buffers) || (!is_storage && binding.buffers)); + + for (uint32_t i = 0; i < binding.count; ++i) + { + vulkan_wrappers::BufferWrapper* buf_wrapper = + vulkan_wrappers::GetWrapper( + is_storage ? binding.storage_buffers[i].buffer : binding.buffers[i].buffer); + if (buf_wrapper != nullptr) + { + auto entry = buf_wrapper->descriptor_sets_bound_to.find(wrapper); + if (entry != buf_wrapper->descriptor_sets_bound_to.end()) + { + buf_wrapper->descriptor_sets_bound_to.erase(entry); + } + } + } + } + break; + + case VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR: + { + assert(binding.count); + assert(binding.acceleration_structures); + + for (uint32_t i = 0; i < binding.count; ++i) + { + vulkan_wrappers::AccelerationStructureKHRWrapper* accel_wrapper = + vulkan_wrappers::GetWrapper( + binding.acceleration_structures[i]); + if (accel_wrapper != nullptr) + { + auto entry = accel_wrapper->descriptor_sets_bound_to.find(wrapper); + if (entry != accel_wrapper->descriptor_sets_bound_to.end()) + { + accel_wrapper->descriptor_sets_bound_to.erase(entry); + } + } + } + } + break; + + default: + GFXRECON_LOG_WARNING("%s() Descriptor type %u not handled", __func__, binding.type); + break; + } + } } void VulkanStateTracker::TrackTlasToBlasDependencies(uint32_t command_buffer_count, diff --git a/framework/encode/vulkan_state_tracker.h b/framework/encode/vulkan_state_tracker.h index 99532fdfc0..d799f7fb67 100644 --- a/framework/encode/vulkan_state_tracker.h +++ b/framework/encode/vulkan_state_tracker.h @@ -744,10 +744,20 @@ class VulkanStateTracker void DestroyState(vulkan_wrappers::AccelerationStructureKHRWrapper* wrapper); + void DestroyState(vulkan_wrappers::AccelerationStructureNVWrapper* wrapper); + void DestroyState(vulkan_wrappers::ImageWrapper* wrapper); + void DestroyState(vulkan_wrappers::ImageViewWrapper* wrapper); + void DestroyState(vulkan_wrappers::BufferWrapper* wrapper); + void DestroyState(vulkan_wrappers::BufferViewWrapper* wrapper); + + void DestroyState(vulkan_wrappers::SamplerWrapper* wrapper); + + void DestroyState(vulkan_wrappers::DescriptorSetWrapper* wrapper); + void TrackQuerySubmissions(vulkan_wrappers::CommandBufferWrapper* command_wrapper); void TrackPipelineDescriptors(vulkan_wrappers::CommandBufferWrapper* command_wrapper, From 2262c34e96d2d515b6241b32796ee91a1d60c819 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Tue, 20 Aug 2024 13:22:14 +0300 Subject: [PATCH 66/99] Small cleanup in CommonCaptureManager --- framework/encode/capture_manager.cpp | 26 +++++++++++++++++--------- framework/encode/capture_manager.h | 1 + 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/framework/encode/capture_manager.cpp b/framework/encode/capture_manager.cpp index 100279cf65..e8da947984 100644 --- a/framework/encode/capture_manager.cpp +++ b/framework/encode/capture_manager.cpp @@ -1165,18 +1165,16 @@ void CommonCaptureManager::ActivateTrimming() } } -bool CommonCaptureManager::WriteFrameStateFile() +std::string CommonCaptureManager::CreateFrameStateFilename(const std::string& base_filename) const { - assert(write_state_files_); - - std::string state_filename = capture_filename_; + std::string state_filename = base_filename; const std::string state_filename_post = std::string("_state_frame_") + std::to_string(current_frame_); - size_t dot_pos = capture_filename_.rfind('.'); + size_t dot_pos = base_filename.rfind('.'); if (dot_pos != std::string::npos) { - if (capture_filename_.substr(dot_pos) == ".gfxr") + if (base_filename.substr(dot_pos) == ".gfxr") { state_filename.insert(dot_pos, state_filename_post); } @@ -1186,6 +1184,15 @@ bool CommonCaptureManager::WriteFrameStateFile() state_filename += state_filename_post; } + return state_filename; +} + +bool CommonCaptureManager::WriteFrameStateFile() +{ + assert(write_state_files_); + + std::string state_filename = CreateFrameStateFilename(capture_filename_); + util::FileOutputStream state_file_stream(state_filename, kFileStreamBufferSize); if (!state_file_stream.IsValid()) { @@ -1204,7 +1211,8 @@ bool CommonCaptureManager::WriteFrameStateFile() &state_file_stream, thread_data->thread_id_, use_asset_file_ ? asset_file_stream_.get() : nullptr); } - const size_t filename_length = file_stream_->GetFilename().length(); + const std::string& filename = file_stream_->GetFilename(); + const size_t filename_length = filename.length(); format::ExecuteBlocksFromFile execute_from_file; execute_from_file.meta_header.block_header.size = @@ -1213,12 +1221,12 @@ bool CommonCaptureManager::WriteFrameStateFile() execute_from_file.meta_header.meta_data_id = format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kExecuteBlocksFromFile); execute_from_file.thread_id = thread_data->thread_id_; - execute_from_file.n_blocks = 0; + execute_from_file.n_blocks = 0; // 0 n_blocks means execute till eof execute_from_file.offset = file_stream_->GetOffset(); execute_from_file.filename_length = filename_length; state_file_stream.Write(&execute_from_file, sizeof(execute_from_file)); - state_file_stream.Write(file_stream_->GetFilename().c_str(), filename_length); + state_file_stream.Write(filename.c_str(), filename_length); state_file_stream.Flush(); return true; diff --git a/framework/encode/capture_manager.h b/framework/encode/capture_manager.h index b129566d7f..c12bd3753f 100644 --- a/framework/encode/capture_manager.h +++ b/framework/encode/capture_manager.h @@ -266,6 +266,7 @@ class CommonCaptureManager std::string CreateTrimFilename(const std::string& base_filename, const util::UintRange& trim_range); std::string CreateAssetFile(); std::string CreateAssetFilename(const std::string& base_filename) const; + std::string CreateFrameStateFilename(const std::string& base_filename) const; bool CreateCaptureFile(format::ApiFamilyId api_family, const std::string& base_filename); void WriteCaptureOptions(std::string& operation_annotation); void ActivateTrimming(); From bc1db1d0f8637b26e0b2c8c46ca3fbef324c2c0e Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Tue, 20 Aug 2024 15:08:19 +0300 Subject: [PATCH 67/99] Correct some mess ups after rebasing with dev --- framework/format/format.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/framework/format/format.h b/framework/format/format.h index d3ae0169af..5b30b525b6 100644 --- a/framework/format/format.h +++ b/framework/format/format.h @@ -154,9 +154,7 @@ enum class MetaDataType : uint16_t kReserved30 = 30, kReserved31 = 31, kSetEnvironmentVariablesCommand = 32, - kAssetFilename = 33, - kLoadAssetFromFile = 34, - kExecuteBlocksFromFile = 35 + kExecuteBlocksFromFile = 33 }; // MetaDataId is stored in the capture file and its type must be uint32_t to avoid breaking capture file compatibility. @@ -664,13 +662,6 @@ struct SetEnvironmentVariablesCommand // containing a list of environment variables and their values }; -struct AssetFilame -{ - MetaDataHeader meta_header; - format::ThreadId thread_id; - uint32_t length; -}; - struct ExecuteBlocksFromFile { MetaDataHeader meta_header; From f34065a410cd3cf4e0d1b108b3e21817e8f85bda Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Wed, 21 Aug 2024 08:23:36 +0300 Subject: [PATCH 68/99] Typo fix --- USAGE_android.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/USAGE_android.md b/USAGE_android.md index 0f817a8f10..f5626feb3f 100644 --- a/USAGE_android.md +++ b/USAGE_android.md @@ -307,7 +307,7 @@ option values. | Quit after capturing frame ranges | debug.gfxrecon.quit_after_capture_frames | BOOL | Setting it to `true` will force the application to terminate once all frame ranges specified by `debug.gfxrecon.capture_frames` have been captured. Default is: `false` | | Capture trigger for Android | debug.gfxrecon.capture_android_trigger | BOOL | Set during runtime to `true` to start capturing and to `false` to stop. If not set at all then it is disabled (non-trimmed capture). Default is not set. | | Use asset file | debug.gfxrecon.capture_use_asset_file | BOOL | When set to `true` assets (images, buffers and descriptors) will be stored separately into an asset file instead of the capture file. | -| Use asset file | debug.gfxrecon.capture_android_dump_assets | BOOL | Setting this triggers a dump of all assets into the asset file. Since android options cannot be set by the layer, dumping is done whenever this option switches between from `false` to `true` or from `true` to `false`. Default is: `false` | +| Dump assets | debug.gfxrecon.capture_android_dump_assets | BOOL | Setting this triggers a dump of all assets into the asset file. Since android options cannot be set by the layer, dumping is done whenever this option switches between from `false` to `true` or from `true` to `false`. Default is: `false` | | Write state files | debug.gfxrecon.capture_write_state_files | BOOL | When set to `true` for each frame captured its corresponding state will be stored in a separate capture file. Specifying a specific state file can start replaying from the corresponding frame. Default is: `false` | | Capture File Compression Type | debug.gfxrecon.capture_compression_type | STRING | Compression format to use with the capture file. Valid values are: `LZ4`, `ZLIB`, `ZSTD`, and `NONE`. Default is: `LZ4` | | Capture File Timestamp | debug.gfxrecon.capture_file_timestamp | BOOL | Add a timestamp to the capture file as described by [Timestamps](#timestamps). Default is: `true` | From 3319b3030ad6d8ed361d5a9832b80209775b50ab Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Wed, 21 Aug 2024 08:55:56 +0300 Subject: [PATCH 69/99] Changed incosistent function name --- framework/encode/custom_layer_func_table.h | 2 +- framework/encode/custom_vulkan_api_call_encoders.cpp | 2 +- framework/encode/custom_vulkan_api_call_encoders.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/encode/custom_layer_func_table.h b/framework/encode/custom_layer_func_table.h index 1faa2291db..ebfd3467b5 100644 --- a/framework/encode/custom_layer_func_table.h +++ b/framework/encode/custom_layer_func_table.h @@ -33,7 +33,7 @@ GFXRECON_BEGIN_NAMESPACE(gfxrecon) const std::unordered_map custom_func_table = { { "GetBlockIndexGFXR", reinterpret_cast(encode::GetBlockIndexGFXR) }, - { "DumpDirtyAssetsGFXR", reinterpret_cast(encode::WriteAssetsGFXR) } + { "DumpAssetsGFXR", reinterpret_cast(encode::DumpAssetsGFXR) } }; GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/custom_vulkan_api_call_encoders.cpp b/framework/encode/custom_vulkan_api_call_encoders.cpp index 12a2ecbd2a..1153afd667 100644 --- a/framework/encode/custom_vulkan_api_call_encoders.cpp +++ b/framework/encode/custom_vulkan_api_call_encoders.cpp @@ -403,7 +403,7 @@ VKAPI_ATTR uint64_t VKAPI_CALL GetBlockIndexGFXR() return manager->GetBlockIndex(); } -VKAPI_ATTR void VKAPI_CALL WriteAssetsGFXR() +VKAPI_ATTR void VKAPI_CALL DumpAssetsGFXR() { VulkanCaptureManager* manager = VulkanCaptureManager::Get(); manager->SetWriteAssets(); diff --git a/framework/encode/custom_vulkan_api_call_encoders.h b/framework/encode/custom_vulkan_api_call_encoders.h index edf23ce24d..a09cd30765 100644 --- a/framework/encode/custom_vulkan_api_call_encoders.h +++ b/framework/encode/custom_vulkan_api_call_encoders.h @@ -64,7 +64,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyAccelerationStructureKHR(VkDevice VKAPI_ATTR uint64_t VKAPI_CALL GetBlockIndexGFXR(); -VKAPI_ATTR void VKAPI_CALL WriteAssetsGFXR(); +VKAPI_ATTR void VKAPI_CALL DumpAssetsGFXR(); VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, From aa096808ac3dac17f822395592572c2e698db269 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Thu, 22 Aug 2024 16:50:28 +0300 Subject: [PATCH 70/99] Missing error check in file processor --- framework/decode/file_processor.cpp | 31 ++++++++++++++++------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/framework/decode/file_processor.cpp b/framework/decode/file_processor.cpp index 29a29df77b..f7904119a8 100644 --- a/framework/decode/file_processor.cpp +++ b/framework/decode/file_processor.cpp @@ -1983,26 +1983,29 @@ bool FileProcessor::ProcessMetaData(const format::BlockHeader& block_header, for success = success && ReadBytes(&exec_from_file.offset, sizeof(exec_from_file.offset)); success = success && ReadBytes(&exec_from_file.filename_length, sizeof(exec_from_file.filename_length)); - std::vector filename_c_str(exec_from_file.filename_length + 1); - success = success && ReadBytes(filename_c_str.data(), exec_from_file.filename_length); if (success) { - filename_c_str[exec_from_file.filename_length] = '\0'; - - std::string filename = ApplyOverrideFilePath(std::string(filename_c_str.data())); - success = OpenFile(filename); + std::vector filename_c_str(exec_from_file.filename_length + 1); + success = success && ReadBytes(filename_c_str.data(), exec_from_file.filename_length); if (success) { - for (auto decoder : decoders_) + filename_c_str[exec_from_file.filename_length] = '\0'; + + std::string filename = ApplyOverrideFilePath(std::string(filename_c_str.data())); + success = OpenFile(filename); + if (success) { - decoder->DispatchExecuteBlocksFromFile( - exec_from_file.thread_id, exec_from_file.n_blocks, exec_from_file.offset, filename); - } + for (auto decoder : decoders_) + { + decoder->DispatchExecuteBlocksFromFile( + exec_from_file.thread_id, exec_from_file.n_blocks, exec_from_file.offset, filename); + } - SetActiveFile( - filename, exec_from_file.offset, util::platform::FileSeekSet, exec_from_file.n_blocks == 0); - // We need to add 1 because it will be decremented right after this function returns - file_stack_.top().remaining_commands = exec_from_file.n_blocks + 1; + SetActiveFile( + filename, exec_from_file.offset, util::platform::FileSeekSet, exec_from_file.n_blocks == 0); + // We need to add 1 because it will be decremented right after this function returns + file_stack_.top().remaining_commands = exec_from_file.n_blocks + 1; + } } } From ded80f1808a51ea2336f4520c79554ef81e4dd64 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Thu, 22 Aug 2024 16:51:54 +0300 Subject: [PATCH 71/99] An attempt to standarize block indices --- framework/decode/file_processor.cpp | 15 +++++ framework/encode/capture_manager.cpp | 62 +++++++++++++++------ framework/encode/capture_manager.h | 9 +++ framework/encode/vulkan_capture_manager.cpp | 3 +- framework/encode/vulkan_state_writer.cpp | 20 +++---- framework/encode/vulkan_state_writer.h | 2 +- framework/format/format.h | 11 +++- 7 files changed, 92 insertions(+), 30 deletions(-) diff --git a/framework/decode/file_processor.cpp b/framework/decode/file_processor.cpp index f7904119a8..cab7add9ae 100644 --- a/framework/decode/file_processor.cpp +++ b/framework/decode/file_processor.cpp @@ -2014,6 +2014,21 @@ bool FileProcessor::ProcessMetaData(const format::BlockHeader& block_header, for HandleBlockReadError(kErrorReadingBlockData, "Failed to read runtime info meta-data block"); } } + else if (meta_data_type == format::MetaDataType::kSetBlockIndexCommand) + { + format::SetBlockIndexCommand set_block_index; + success = ReadBytes(&set_block_index.thread_id, sizeof(set_block_index.thread_id)); + success = success && ReadBytes(&set_block_index.block_index, sizeof(set_block_index.block_index)); + + if (success) + { + for (auto decoder : decoders_) + { + block_index_ = set_block_index.block_index; + decoder->SetCurrentBlockIndex(block_index_); + } + } + } else { if ((meta_data_type == format::MetaDataType::kReserved23) || diff --git a/framework/encode/capture_manager.cpp b/framework/encode/capture_manager.cpp index e8da947984..f8c9fc8c86 100644 --- a/framework/encode/capture_manager.cpp +++ b/framework/encode/capture_manager.cpp @@ -23,6 +23,7 @@ */ #include "encode/capture_settings.h" +#include "format/format.h" #include #include PROJECT_VERSION_HEADER_FILE @@ -1187,6 +1188,44 @@ std::string CommonCaptureManager::CreateFrameStateFilename(const std::string& ba return state_filename; } +void CommonCaptureManager::WriteExecuteFromFile(util::FileOutputStream& out_stream, + const std::string& filename, + format::ThreadId thread_id, + uint32_t n_blocks, + int64_t offset) +{ + const size_t asset_filename_length = filename.length(); + + format::ExecuteBlocksFromFile execute_from_file; + execute_from_file.meta_header.block_header.size = + format::GetMetaDataBlockBaseSize(execute_from_file) + asset_filename_length; + execute_from_file.meta_header.block_header.type = format::kMetaDataBlock; + execute_from_file.meta_header.meta_data_id = + format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kExecuteBlocksFromFile); + execute_from_file.thread_id = thread_id; + execute_from_file.n_blocks = n_blocks; + execute_from_file.offset = offset; + execute_from_file.filename_length = asset_filename_length; + + out_stream.Write(&execute_from_file, sizeof(execute_from_file)); + out_stream.Write(filename.c_str(), asset_filename_length); +} + +void CommonCaptureManager::WriteSetBlockIndex(util::FileOutputStream& out_stream, + format::ThreadId thread_id, + uint64_t block_index) +{ + format::SetBlockIndexCommand set_block_index; + set_block_index.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(set_block_index); + set_block_index.meta_header.block_header.type = format::kMetaDataBlock; + set_block_index.meta_header.meta_data_id = + format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kSetBlockIndexCommand); + set_block_index.thread_id = thread_id; + set_block_index.block_index = block_index; + + out_stream.Write(&set_block_index, sizeof(set_block_index)); +} + bool CommonCaptureManager::WriteFrameStateFile() { assert(write_state_files_); @@ -1200,33 +1239,22 @@ bool CommonCaptureManager::WriteFrameStateFile() return false; } - WriteFileHeader(&state_file_stream); - auto thread_data = GetThreadData(); assert(thread_data != nullptr); + WriteFileHeader(&state_file_stream); + + WriteSetBlockIndex(state_file_stream, thread_data->thread_id_, block_index_); + for (auto& manager : api_capture_managers_) { manager.first->WriteTrackedState( &state_file_stream, thread_data->thread_id_, use_asset_file_ ? asset_file_stream_.get() : nullptr); } - const std::string& filename = file_stream_->GetFilename(); - const size_t filename_length = filename.length(); - - format::ExecuteBlocksFromFile execute_from_file; - execute_from_file.meta_header.block_header.size = - format::GetMetaDataBlockBaseSize(execute_from_file) + filename_length; - execute_from_file.meta_header.block_header.type = format::kMetaDataBlock; - execute_from_file.meta_header.meta_data_id = - format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kExecuteBlocksFromFile); - execute_from_file.thread_id = thread_data->thread_id_; - execute_from_file.n_blocks = 0; // 0 n_blocks means execute till eof - execute_from_file.offset = file_stream_->GetOffset(); - execute_from_file.filename_length = filename_length; + WriteExecuteFromFile( + state_file_stream, file_stream_->GetFilename(), thread_data->thread_id_, 0, file_stream_->GetOffset()); - state_file_stream.Write(&execute_from_file, sizeof(execute_from_file)); - state_file_stream.Write(filename.c_str(), filename_length); state_file_stream.Flush(); return true; diff --git a/framework/encode/capture_manager.h b/framework/encode/capture_manager.h index c12bd3753f..2612eab7f3 100644 --- a/framework/encode/capture_manager.h +++ b/framework/encode/capture_manager.h @@ -321,6 +321,15 @@ class CommonCaptureManager bool WriteFrameStateFile(); + private: + void WriteExecuteFromFile(util::FileOutputStream& out_stream, + const std::string& filename, + format::ThreadId thread_id, + uint32_t n_blocks, + int64_t offset); + + void WriteSetBlockIndex(util::FileOutputStream& out_stream, format::ThreadId thread_id, uint64_t block_index); + protected: std::unique_ptr compressor_; std::mutex mapped_memory_lock_; diff --git a/framework/encode/vulkan_capture_manager.cpp b/framework/encode/vulkan_capture_manager.cpp index 7f27a3cf2c..21bcee43ff 100644 --- a/framework/encode/vulkan_capture_manager.cpp +++ b/framework/encode/vulkan_capture_manager.cpp @@ -112,7 +112,8 @@ void VulkanCaptureManager::WriteTrackedState(util::FileOutputStream* file_stream void VulkanCaptureManager::WriteAssets(util::FileOutputStream* asset_file_stream, format::ThreadId thread_id) { assert(state_tracker_ != nullptr); - state_tracker_->WriteAssets(asset_file_stream, thread_id, GetCompressor()); + uint64_t n_blocks = state_tracker_->WriteAssets(asset_file_stream, thread_id, GetCompressor()); + common_manager_->IncrementBlockIndex(n_blocks); } void VulkanCaptureManager::SetLayerFuncs(PFN_vkCreateInstance create_instance, PFN_vkCreateDevice create_device) diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index 359a0826fa..7c41428edb 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -982,7 +982,7 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa wrapper->set_layout_dependency.create_call_id, dep_create_parameters, asset_file_stream_); if (output_stream_ != nullptr) { - WriteExecuteFromFile(1, offset); + WriteExecuteFromFile(asset_file_stream_->GetFilename(), 1, offset); } } else @@ -991,7 +991,7 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa { assert((*asset_file_offsets_).find(wrapper->handle_id) != (*asset_file_offsets_).end()); const int64_t offset = (*asset_file_offsets_)[wrapper->handle_id]; - WriteExecuteFromFile(1, offset); + WriteExecuteFromFile(asset_file_stream_->GetFilename(), 1, offset); } } } @@ -1098,7 +1098,7 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa // as execute till the end of file if (output_stream_ != nullptr && n_blocks) { - WriteExecuteFromFile(n_blocks, offset); + WriteExecuteFromFile(asset_file_stream_->GetFilename(), n_blocks, offset); } if (wrapper->dirty) @@ -1713,7 +1713,7 @@ void VulkanStateWriter::ProcessBufferMemoryWithAssetFile(const vulkan_wrappers:: if (output_stream_ != nullptr) { - WriteExecuteFromFile(1, offset); + WriteExecuteFromFile(asset_file_stream_->GetFilename(), 1, offset); } ++blocks_written_; @@ -1735,7 +1735,7 @@ void VulkanStateWriter::ProcessBufferMemoryWithAssetFile(const vulkan_wrappers:: { assert((*asset_file_offsets_).find(buffer_wrapper->handle_id) != (*asset_file_offsets_).end()); const int64_t offset = (*asset_file_offsets_)[buffer_wrapper->handle_id]; - WriteExecuteFromFile(1, offset); + WriteExecuteFromFile(asset_file_stream_->GetFilename(), 1, offset); } } } @@ -2033,7 +2033,7 @@ void VulkanStateWriter::ProcessImageMemoryWithAssetFile(const vulkan_wrappers::D if (output_stream_ != nullptr) { - WriteExecuteFromFile(1, offset); + WriteExecuteFromFile(asset_file_stream_->GetFilename(), 1, offset); } if (!snapshot_entry.need_staging_copy && memory_wrapper->mapped_data == nullptr) @@ -2063,7 +2063,7 @@ void VulkanStateWriter::ProcessImageMemoryWithAssetFile(const vulkan_wrappers::D { assert((*asset_file_offsets_).find(image_wrapper->handle_id) != (*asset_file_offsets_).end()); const int64_t offset = (*asset_file_offsets_)[image_wrapper->handle_id]; - WriteExecuteFromFile(1, offset); + WriteExecuteFromFile(asset_file_stream_->GetFilename(), 1, offset); } } } @@ -3879,9 +3879,9 @@ bool VulkanStateWriter::IsFramebufferValid(const vulkan_wrappers::FramebufferWra return valid; } -void VulkanStateWriter::WriteExecuteFromFile(uint32_t n_blocks, int64_t offset) +void VulkanStateWriter::WriteExecuteFromFile(const std::string& filename, uint32_t n_blocks, int64_t offset) { - const size_t asset_filename_length = asset_file_stream_->GetFilename().length(); + const size_t asset_filename_length = filename.length(); format::ExecuteBlocksFromFile execute_from_file; execute_from_file.meta_header.block_header.size = @@ -3895,7 +3895,7 @@ void VulkanStateWriter::WriteExecuteFromFile(uint32_t n_blocks, int64_t offset) execute_from_file.filename_length = asset_filename_length; output_stream_->Write(&execute_from_file, sizeof(execute_from_file)); - output_stream_->Write(asset_file_stream_->GetFilename().c_str(), asset_filename_length); + output_stream_->Write(filename.c_str(), asset_filename_length); } GFXRECON_END_NAMESPACE(encode) diff --git a/framework/encode/vulkan_state_writer.h b/framework/encode/vulkan_state_writer.h index 9992342ac9..d41851fde9 100644 --- a/framework/encode/vulkan_state_writer.h +++ b/framework/encode/vulkan_state_writer.h @@ -369,7 +369,7 @@ class VulkanStateWriter void WriteTlasToBlasDependenciesMetadata(const VulkanStateTable& state_table); - void WriteExecuteFromFile(uint32_t n_blocks, int64_t offset); + void WriteExecuteFromFile(const std::string& filename, uint32_t n_blocks, int64_t offset); private: util::FileOutputStream* output_stream_; diff --git a/framework/format/format.h b/framework/format/format.h index 5b30b525b6..79adb80c3f 100644 --- a/framework/format/format.h +++ b/framework/format/format.h @@ -154,7 +154,8 @@ enum class MetaDataType : uint16_t kReserved30 = 30, kReserved31 = 31, kSetEnvironmentVariablesCommand = 32, - kExecuteBlocksFromFile = 33 + kExecuteBlocksFromFile = 33, + kSetBlockIndexCommand = 34 }; // MetaDataId is stored in the capture file and its type must be uint32_t to avoid breaking capture file compatibility. @@ -678,6 +679,14 @@ struct ExecuteBlocksFromFile uint32_t filename_length; }; +struct SetBlockIndexCommand +{ + MetaDataHeader meta_header; + format::ThreadId thread_id; + + uint64_t block_index; +}; + // Restore size_t to normal behavior. #undef size_t From 9bb958ef445fb5fe8680e3619ff17475cf6508f6 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sat, 24 Aug 2024 17:32:58 +0300 Subject: [PATCH 72/99] Got rid of --override-path --- framework/decode/file_processor.cpp | 49 ++++++++++-------------- framework/decode/file_processor.h | 6 +-- framework/encode/capture_manager.cpp | 20 ++++++++-- framework/encode/vulkan_state_writer.cpp | 20 ++++++++-- tools/convert/main.cpp | 12 +----- tools/replay/android_main.cpp | 9 +---- tools/replay/desktop_main.cpp | 9 +---- tools/replay/replay_settings.h | 4 +- 8 files changed, 61 insertions(+), 68 deletions(-) diff --git a/framework/decode/file_processor.cpp b/framework/decode/file_processor.cpp index cab7add9ae..b869627763 100644 --- a/framework/decode/file_processor.cpp +++ b/framework/decode/file_processor.cpp @@ -78,13 +78,8 @@ void FileProcessor::WaitDecodersIdle() } }; -bool FileProcessor::Initialize(const std::string& filename, const std::string* override_path) +bool FileProcessor::Initialize(const std::string& filename) { - if (override_path != nullptr) - { - override_path_ = *override_path; - } - bool success = OpenFile(filename); if (success) @@ -98,45 +93,44 @@ bool FileProcessor::Initialize(const std::string& filename, const std::string* o error_state_ = kErrorOpeningFile; } + // Find absolute path of capture file + if (success) + { + size_t last_slash_pos = filename.find_last_of("\\/"); + if (last_slash_pos != std::string::npos) + { + absolute_path_ = filename.substr(0, last_slash_pos + 1); + } + } + return success; } -std::string FileProcessor::ApplyOverrideFilePath(const std::string& file) +std::string FileProcessor::ApplyAbsolutePath(const std::string& file) { - if (override_path_.empty()) + if (absolute_path_.empty()) { return file; } - std::string new_file = file; - const size_t slash_last_pos = new_file.find_last_of('/'); - if (slash_last_pos != std::string::npos) - { - new_file = new_file.substr(slash_last_pos); - new_file = override_path_ + new_file; - } - - return new_file; + return absolute_path_ + file; } bool FileProcessor::OpenFile(const std::string& filename) { - std::string new_filename = ApplyOverrideFilePath(filename); - - if (active_files_.find(new_filename) == active_files_.end()) + if (active_files_.find(filename) == active_files_.end()) { FILE* fd; - int result = util::platform::FileOpen(&fd, new_filename.c_str(), "rb"); + int result = util::platform::FileOpen(&fd, filename.c_str(), "rb"); if (result || fd == nullptr) { - GFXRECON_LOG_ERROR("Failed to open file %s", new_filename.c_str()); + GFXRECON_LOG_ERROR("Failed to open file %s", filename.c_str()); error_state_ = kErrorOpeningFile; return false; } else { - active_files_.emplace( - std::piecewise_construct, std::forward_as_tuple(new_filename), std::forward_as_tuple(fd)); + active_files_.emplace(std::piecewise_construct, std::forward_as_tuple(filename), std::forward_as_tuple(fd)); error_state_ = kErrorNone; } } @@ -1985,14 +1979,13 @@ bool FileProcessor::ProcessMetaData(const format::BlockHeader& block_header, for if (success) { - std::vector filename_c_str(exec_from_file.filename_length + 1); + std::string filename_c_str(exec_from_file.filename_length, '\0'); success = success && ReadBytes(filename_c_str.data(), exec_from_file.filename_length); if (success) { - filename_c_str[exec_from_file.filename_length] = '\0'; + std::string filename = ApplyAbsolutePath(filename_c_str); - std::string filename = ApplyOverrideFilePath(std::string(filename_c_str.data())); - success = OpenFile(filename); + success = OpenFile(filename); if (success) { for (auto decoder : decoders_) diff --git a/framework/decode/file_processor.h b/framework/decode/file_processor.h index 227c337b1b..25a91d2f18 100644 --- a/framework/decode/file_processor.h +++ b/framework/decode/file_processor.h @@ -86,7 +86,7 @@ class FileProcessor decoders_.erase(std::remove(decoders_.begin(), decoders_.end(), decoder), decoders_.end()); } - bool Initialize(const std::string& filename, const std::string* override_path = nullptr); + bool Initialize(const std::string& filename); // Returns true if there are more frames to process, false if all frames have been processed or an error has // occurred. Use GetErrorState() to determine error condition. @@ -267,7 +267,7 @@ class FileProcessor void DecrementRemainingCommands(); - std::string ApplyOverrideFilePath(const std::string& file); + std::string ApplyAbsolutePath(const std::string& file); private: format::EnabledOptions enabled_options_; @@ -307,7 +307,7 @@ class FileProcessor }; std::stack file_stack_; - std::string override_path_; + std::string absolute_path_; private: ActiveFileContext& GetCurrentFile() diff --git a/framework/encode/capture_manager.cpp b/framework/encode/capture_manager.cpp index f8c9fc8c86..e2a8784deb 100644 --- a/framework/encode/capture_manager.cpp +++ b/framework/encode/capture_manager.cpp @@ -1194,21 +1194,33 @@ void CommonCaptureManager::WriteExecuteFromFile(util::FileOutputStream& out_stre uint32_t n_blocks, int64_t offset) { - const size_t asset_filename_length = filename.length(); + // Remove path from filename + std::string absolute_file; + const size_t last_slash_pos = filename.find_last_of("\\/"); + if (last_slash_pos != std::string::npos) + { + absolute_file = filename.substr(last_slash_pos + 1); + } + else + { + absolute_file = filename; + } + + const size_t filename_length = absolute_file.length(); format::ExecuteBlocksFromFile execute_from_file; execute_from_file.meta_header.block_header.size = - format::GetMetaDataBlockBaseSize(execute_from_file) + asset_filename_length; + format::GetMetaDataBlockBaseSize(execute_from_file) + filename_length; execute_from_file.meta_header.block_header.type = format::kMetaDataBlock; execute_from_file.meta_header.meta_data_id = format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kExecuteBlocksFromFile); execute_from_file.thread_id = thread_id; execute_from_file.n_blocks = n_blocks; execute_from_file.offset = offset; - execute_from_file.filename_length = asset_filename_length; + execute_from_file.filename_length = filename_length; out_stream.Write(&execute_from_file, sizeof(execute_from_file)); - out_stream.Write(filename.c_str(), asset_filename_length); + out_stream.Write(absolute_file.c_str(), filename_length); } void CommonCaptureManager::WriteSetBlockIndex(util::FileOutputStream& out_stream, diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index 7c41428edb..b2222034ff 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -3881,21 +3881,33 @@ bool VulkanStateWriter::IsFramebufferValid(const vulkan_wrappers::FramebufferWra void VulkanStateWriter::WriteExecuteFromFile(const std::string& filename, uint32_t n_blocks, int64_t offset) { - const size_t asset_filename_length = filename.length(); + // Remove path from filename + std::string absolute_file; + const size_t last_slash_pos = filename.find_last_of("\\/"); + if (last_slash_pos != std::string::npos) + { + absolute_file = filename.substr(last_slash_pos + 1); + } + else + { + absolute_file = filename; + } + + const size_t filename_length = absolute_file.length(); format::ExecuteBlocksFromFile execute_from_file; execute_from_file.meta_header.block_header.size = - format::GetMetaDataBlockBaseSize(execute_from_file) + asset_filename_length; + format::GetMetaDataBlockBaseSize(execute_from_file) + filename_length; execute_from_file.meta_header.block_header.type = format::kMetaDataBlock; execute_from_file.meta_header.meta_data_id = format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_Vulkan, format::MetaDataType::kExecuteBlocksFromFile); execute_from_file.thread_id = thread_id_; execute_from_file.n_blocks = n_blocks; execute_from_file.offset = offset; - execute_from_file.filename_length = asset_filename_length; + execute_from_file.filename_length = filename_length; output_stream_->Write(&execute_from_file, sizeof(execute_from_file)); - output_stream_->Write(filename.c_str(), asset_filename_length); + output_stream_->Write(absolute_file.c_str(), filename_length); } GFXRECON_END_NAMESPACE(encode) diff --git a/tools/convert/main.cpp b/tools/convert/main.cpp index 1abf41921f..b7528d0836 100644 --- a/tools/convert/main.cpp +++ b/tools/convert/main.cpp @@ -46,7 +46,7 @@ using Dx12JsonConsumer = #endif const char kOptions[] = "-h|--help,--version,--no-debug-popup,--file-per-frame,--include-binaries,--expand-flags"; -const char kArguments[] = "--output,--format,--override-path"; +const char kArguments[] = "--output,--format"; static void PrintUsage(const char* exe_name) { @@ -81,7 +81,6 @@ static void PrintUsage(const char* exe_name) GFXRECON_WRITE_CONSOLE( " --file-per-frame\tCreates a new file for every frame processed. Frame number is added as a suffix"); GFXRECON_WRITE_CONSOLE(" \tto the output file name."); - GFXRECON_WRITE_CONSOLE(" --override-path\tProvide an alternative path for capture files"); #if defined(WIN32) && defined(_DEBUG) GFXRECON_WRITE_CONSOLE(" --no-debug-popup\tDisable the 'Abort, Retry, Ignore' message box"); @@ -172,15 +171,8 @@ int main(int argc, const char** argv) bool dump_binaries = arg_parser.IsOptionSet(kIncludeBinariesOption); bool expand_flags = arg_parser.IsOptionSet(kExpandFlagsOption); bool file_per_frame = arg_parser.IsOptionSet(kFilePerFrameOption); - bool use_override_path = arg_parser.IsArgumentSet(kOverridePathArgument); bool output_to_stdout = output_filename == "stdout"; - std::string override_path; - if (use_override_path) - { - override_path = arg_parser.GetArgumentValue(kOverridePathArgument); - } - gfxrecon::decode::FileProcessor file_processor; #ifndef D3D12_SUPPORT @@ -206,7 +198,7 @@ int main(int argc, const char** argv) gfxrecon::util::filepath::MakeDirectory(data_dir); } - if (file_processor.Initialize(input_filename, use_override_path ? &override_path : nullptr)) + if (file_processor.Initialize(input_filename)) { std::string json_filename; FILE* out_file_handle = nullptr; diff --git a/tools/replay/android_main.cpp b/tools/replay/android_main.cpp index fd33cc0564..c30abb08ca 100644 --- a/tools/replay/android_main.cpp +++ b/tools/replay/android_main.cpp @@ -107,14 +107,7 @@ void android_main(struct android_app* app) ? std::make_unique() : std::make_unique(); - const bool use_path_override = arg_parser.IsArgumentSet(kOverridePathArgument); - std::string override_path; - if (use_path_override) - { - override_path = arg_parser.GetArgumentValue(kOverridePathArgument); - } - - if (!file_processor->Initialize(filename, use_path_override ? &override_path : nullptr)) + if (!file_processor->Initialize(filename)) { GFXRECON_WRITE_CONSOLE("Failed to load file %s.", filename.c_str()); } diff --git a/tools/replay/desktop_main.cpp b/tools/replay/desktop_main.cpp index 59e6010af8..958382026c 100644 --- a/tools/replay/desktop_main.cpp +++ b/tools/replay/desktop_main.cpp @@ -161,14 +161,7 @@ int main(int argc, const char** argv) file_processor = std::make_unique(); } - const bool use_path_override = arg_parser.IsArgumentSet(kOverridePathArgument); - std::string override_path; - if (use_path_override) - { - override_path = arg_parser.GetArgumentValue(kOverridePathArgument); - } - - if (!file_processor->Initialize(filename, use_path_override ? &override_path : nullptr)) + if (!file_processor->Initialize(filename)) { return_code = -1; } diff --git a/tools/replay/replay_settings.h b/tools/replay/replay_settings.h index d65e613c05..645fa2bb5a 100644 --- a/tools/replay/replay_settings.h +++ b/tools/replay/replay_settings.h @@ -43,7 +43,7 @@ const char kArguments[] = "force-windowed,--fwo|--force-windowed-origin,--batching-memory-usage,--measurement-file,--swapchain,--sgfs|--skip-" "get-fence-status,--sgfr|--" "skip-get-fence-ranges,--dump-resources,--dump-resources-scale,--dump-resources-image-format,--dump-resources-dir," - "--dump-resources-dump-color-attachment-index,--pbis,--pcj|--pipeline-creation-jobs,--override-path,--state-file"; + "--dump-resources-dump-color-attachment-index,--pbis,--pcj|--pipeline-creation-jobs"; static void PrintUsage(const char* exe_name) { @@ -164,8 +164,6 @@ static void PrintUsage(const char* exe_name) GFXRECON_WRITE_CONSOLE(" \t\tReplay may fail if the specified device is not compatible with the"); GFXRECON_WRITE_CONSOLE(" \t\toriginal capture devices."); GFXRECON_WRITE_CONSOLE(" --pbi-all\t\tPrint all block information."); - GFXRECON_WRITE_CONSOLE(" --asset-file-path\t\tProvide an alternative path for the asset file."); - GFXRECON_WRITE_CONSOLE(" --state-file\t\tPath to state file"); GFXRECON_WRITE_CONSOLE( " --pbis \t\tPrint block information between block index1 and block index2."); #if defined(WIN32) From 329a5cbf7633a96819801ce9fab26543d5afe80c Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 26 Aug 2024 12:01:19 +0300 Subject: [PATCH 73/99] Handles are pointers. Print hex values --- framework/encode/vulkan_handle_wrapper_util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/encode/vulkan_handle_wrapper_util.h b/framework/encode/vulkan_handle_wrapper_util.h index 4dfb973b29..492a15265e 100644 --- a/framework/encode/vulkan_handle_wrapper_util.h +++ b/framework/encode/vulkan_handle_wrapper_util.h @@ -90,7 +90,7 @@ format::HandleId GetWrappedId(const typename Wrapper::HandleType& handle) auto wrapper = state_handle_table_.GetWrapper(handle); if (wrapper == nullptr) { - GFXRECON_LOG_WARNING("vulkan_wrappers::GetWrappedId() couldn't find Handle: %" PRIu64 + GFXRECON_LOG_WARNING("vulkan_wrappers::GetWrappedId() couldn't find Handle: 0x%" PRIx64 "'s wrapper. It might have been destroyed", handle); return format::kNullHandleId; @@ -108,7 +108,7 @@ Wrapper* GetWrapper(const typename Wrapper::HandleType& handle) auto wrapper = state_handle_table_.GetWrapper(handle); if (wrapper == nullptr) { - GFXRECON_LOG_WARNING("vulkan_wrappers::GetWrapper() couldn't find Handle: %" PRIu64 + GFXRECON_LOG_WARNING("vulkan_wrappers::GetWrapper() couldn't find Handle: 0x%" PRIx64 "'s wrapper. It might have been destroyed", handle); } From 71903fb2362811f2729306eecd397b6b0b2efd97 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 26 Aug 2024 13:39:44 +0300 Subject: [PATCH 74/99] Hush some warnings when we know it's ok --- framework/encode/vulkan_handle_wrapper_util.h | 22 ++++++++++++------- framework/encode/vulkan_state_tracker.cpp | 15 ++++++++----- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/framework/encode/vulkan_handle_wrapper_util.h b/framework/encode/vulkan_handle_wrapper_util.h index 492a15265e..9b314043b7 100644 --- a/framework/encode/vulkan_handle_wrapper_util.h +++ b/framework/encode/vulkan_handle_wrapper_util.h @@ -75,7 +75,7 @@ inline format::HandleId GetTempWrapperId(const VkCommandPool } template -format::HandleId GetWrappedId(const typename Wrapper::HandleType& handle) +format::HandleId GetWrappedId(const typename Wrapper::HandleType& handle, bool log_warning = true) { if (handle == VK_NULL_HANDLE) { @@ -90,16 +90,19 @@ format::HandleId GetWrappedId(const typename Wrapper::HandleType& handle) auto wrapper = state_handle_table_.GetWrapper(handle); if (wrapper == nullptr) { - GFXRECON_LOG_WARNING("vulkan_wrappers::GetWrappedId() couldn't find Handle: 0x%" PRIx64 - "'s wrapper. It might have been destroyed", - handle); + if (log_warning) + { + GFXRECON_LOG_WARNING("vulkan_wrappers::GetWrappedId() couldn't find Handle: 0x%" PRIx64 + "'s wrapper. It might have been destroyed", + handle); + } return format::kNullHandleId; } return wrapper->handle_id; } template -Wrapper* GetWrapper(const typename Wrapper::HandleType& handle) +Wrapper* GetWrapper(const typename Wrapper::HandleType& handle, bool log_warning = true) { if (handle == VK_NULL_HANDLE) { @@ -108,9 +111,12 @@ Wrapper* GetWrapper(const typename Wrapper::HandleType& handle) auto wrapper = state_handle_table_.GetWrapper(handle); if (wrapper == nullptr) { - GFXRECON_LOG_WARNING("vulkan_wrappers::GetWrapper() couldn't find Handle: 0x%" PRIx64 - "'s wrapper. It might have been destroyed", - handle); + if (log_warning) + { + GFXRECON_LOG_WARNING("vulkan_wrappers::GetWrapper() couldn't find Handle: 0x%" PRIx64 + "'s wrapper. It might have been destroyed", + handle); + } } return wrapper; } diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index af570e7f6e..812cf65372 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -1927,7 +1927,8 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::DescriptorSetWrapper* wra for (uint32_t i = 0; i < binding.count; ++i) { vulkan_wrappers::ImageViewWrapper* image_view_wrapper = - vulkan_wrappers::GetWrapper(binding.images[i].imageView); + vulkan_wrappers::GetWrapper(binding.images[i].imageView, + false); if (image_view_wrapper != nullptr) { auto img_view_desc_entry = image_view_wrapper->descriptor_sets_bound_to.find(wrapper); @@ -1953,7 +1954,8 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::DescriptorSetWrapper* wra for (uint32_t i = 0; i < binding.count; ++i) { vulkan_wrappers::SamplerWrapper* sampler_wrapper = - vulkan_wrappers::GetWrapper(binding.images[i].sampler); + vulkan_wrappers::GetWrapper(binding.images[i].sampler, + false); if (sampler_wrapper != nullptr) { auto desc_entry = sampler_wrapper->descriptor_sets_bound_to.find(wrapper); @@ -1977,7 +1979,7 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::DescriptorSetWrapper* wra { vulkan_wrappers::ImageViewWrapper* image_view_wrapper = vulkan_wrappers::GetWrapper( - binding.storage_images[i].imageView); + binding.storage_images[i].imageView, false); if (image_view_wrapper != nullptr) { auto img_view_desc_entry = image_view_wrapper->descriptor_sets_bound_to.find(wrapper); @@ -2012,7 +2014,8 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::DescriptorSetWrapper* wra { vulkan_wrappers::BufferViewWrapper* buf_view_wrapper = vulkan_wrappers::GetWrapper( - is_storage ? binding.storage_texel_buffer_views[i] : binding.uniform_texel_buffer_views[i]); + is_storage ? binding.storage_texel_buffer_views[i] : binding.uniform_texel_buffer_views[i], + false); if (buf_view_wrapper != nullptr) { auto view_entry = buf_view_wrapper->descriptor_sets_bound_to.find(wrapper); @@ -2049,7 +2052,7 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::DescriptorSetWrapper* wra { vulkan_wrappers::BufferWrapper* buf_wrapper = vulkan_wrappers::GetWrapper( - is_storage ? binding.storage_buffers[i].buffer : binding.buffers[i].buffer); + is_storage ? binding.storage_buffers[i].buffer : binding.buffers[i].buffer, false); if (buf_wrapper != nullptr) { auto entry = buf_wrapper->descriptor_sets_bound_to.find(wrapper); @@ -2071,7 +2074,7 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::DescriptorSetWrapper* wra { vulkan_wrappers::AccelerationStructureKHRWrapper* accel_wrapper = vulkan_wrappers::GetWrapper( - binding.acceleration_structures[i]); + binding.acceleration_structures[i], false); if (accel_wrapper != nullptr) { auto entry = accel_wrapper->descriptor_sets_bound_to.find(wrapper); From 6ce6882a9268519bae6ee38bd0c25b478608d658 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 26 Aug 2024 18:12:55 +0300 Subject: [PATCH 75/99] Removed forgotten references to asset and override path --- android/scripts/gfxrecon.py | 5 ----- framework/decode/replay_options.h | 1 - tools/replay/replay_settings.h | 1 - tools/tool_settings.h | 6 ------ 4 files changed, 13 deletions(-) diff --git a/android/scripts/gfxrecon.py b/android/scripts/gfxrecon.py index 1f90c0cd0d..6b2084f3dc 100644 --- a/android/scripts/gfxrecon.py +++ b/android/scripts/gfxrecon.py @@ -114,7 +114,6 @@ def CreateReplayParser(): parser.add_argument('--pbi-all', action='store_true', default=False, help='Print all block information.') parser.add_argument('--pbis', metavar='RANGES', default=False, help='Print block information between block index1 and block index2') parser.add_argument('--pcj', '--pipeline-creation-jobs', action='store_true', default=False, help='Specify the number of pipeline-creation-jobs or background-threads.') - parser.add_argument('--override-path', metavar='RANGES', default=False, help='Provide an alternative path for the capture file(s)') return parser def MakeExtrasString(args): @@ -283,10 +282,6 @@ def MakeExtrasString(args): arg_list.append('--pcj') arg_list.append('{}'.format(args.pcj)) - if args.override_path: - arg_list.append('--override-path') - arg_list.append('{}'.format(args.override_path)) - if args.file: arg_list.append(args.file) elif not args.version: diff --git a/framework/decode/replay_options.h b/framework/decode/replay_options.h index c1198b4376..fa741af611 100644 --- a/framework/decode/replay_options.h +++ b/framework/decode/replay_options.h @@ -61,7 +61,6 @@ struct ReplayOptions int64_t block_index_from{ -1 }; int64_t block_index_to{ -1 }; int32_t num_pipeline_creation_jobs{ 0 }; - std::string override_path; }; GFXRECON_END_NAMESPACE(decode) diff --git a/tools/replay/replay_settings.h b/tools/replay/replay_settings.h index 645fa2bb5a..aa40615c48 100644 --- a/tools/replay/replay_settings.h +++ b/tools/replay/replay_settings.h @@ -81,7 +81,6 @@ static void PrintUsage(const char* exe_name) GFXRECON_WRITE_CONSOLE("\t\t\t[--sgfs | --skip-get-fence-status ]"); GFXRECON_WRITE_CONSOLE("\t\t\t[--sgfr | --skip-get-fence-ranges ]"); GFXRECON_WRITE_CONSOLE("\t\t\t[--pbi-all] [--pbis ]"); - GFXRECON_WRITE_CONSOLE("\t\t\t[--asset-file-path]"); #if defined(WIN32) GFXRECON_WRITE_CONSOLE("\t\t\t[--dump-resources ]"); #endif diff --git a/tools/tool_settings.h b/tools/tool_settings.h index 8010c3e853..4a4a51612e 100644 --- a/tools/tool_settings.h +++ b/tools/tool_settings.h @@ -129,7 +129,6 @@ const char kDxTwoPassReplay[] = "--dx12-two-pass-replay"; const char kDxOverrideObjectNames[] = "--dx12-override-object-names"; const char kBatchingMemoryUsageArgument[] = "--batching-memory-usage"; #endif -const char kOverridePathArgument[] = "--override-path"; const char kDumpResourcesArgument[] = "--dump-resources"; const char kDumpResourcesBeforeDrawOption[] = "--dump-resources-before-draw"; @@ -924,11 +923,6 @@ static void GetReplayOptions(gfxrecon::decode::ReplayOptions& options, options.num_pipeline_creation_jobs = std::stoi(arg_parser.GetArgumentValue(kNumPipelineCreationJobs)); } - if (arg_parser.IsArgumentSet(kOverridePathArgument)) - { - options.override_path = arg_parser.GetArgumentValue(kOverridePathArgument); - } - const auto& override_gpu = arg_parser.GetArgumentValue(kOverrideGpuArgument); if (!override_gpu.empty()) { From b172897ac2d37752e8eb210ace6ff84c41c3010c Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Wed, 28 Aug 2024 10:05:13 +0300 Subject: [PATCH 76/99] Detect self referencing ExecuteBlocksFromFile commands --- framework/decode/file_processor.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/framework/decode/file_processor.cpp b/framework/decode/file_processor.cpp index b869627763..8e039cde91 100644 --- a/framework/decode/file_processor.cpp +++ b/framework/decode/file_processor.cpp @@ -1985,6 +1985,13 @@ bool FileProcessor::ProcessMetaData(const format::BlockHeader& block_header, for { std::string filename = ApplyAbsolutePath(filename_c_str); + // Check for self references + if (!filename.compare(file_stack_.top().filename)) + { + GFXRECON_LOG_WARNING( + "ExecuteBlocksFromFile is referencing itself. Probably this is not intentional."); + } + success = OpenFile(filename); if (success) { From fc2fe1f1576eba56de39f299a25a02c1a83049be Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Fri, 30 Aug 2024 11:52:10 +0300 Subject: [PATCH 77/99] Minor var renames and optimization --- framework/encode/capture_manager.cpp | 10 +++++----- framework/encode/vulkan_state_writer.cpp | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/framework/encode/capture_manager.cpp b/framework/encode/capture_manager.cpp index e2a8784deb..3ea5da40fd 100644 --- a/framework/encode/capture_manager.cpp +++ b/framework/encode/capture_manager.cpp @@ -1195,18 +1195,18 @@ void CommonCaptureManager::WriteExecuteFromFile(util::FileOutputStream& out_stre int64_t offset) { // Remove path from filename - std::string absolute_file; + std::string relative_file; const size_t last_slash_pos = filename.find_last_of("\\/"); if (last_slash_pos != std::string::npos) { - absolute_file = filename.substr(last_slash_pos + 1); + relative_file = filename.substr(last_slash_pos + 1); } else { - absolute_file = filename; + relative_file = filename; } - const size_t filename_length = absolute_file.length(); + const size_t filename_length = relative_file.length(); format::ExecuteBlocksFromFile execute_from_file; execute_from_file.meta_header.block_header.size = @@ -1220,7 +1220,7 @@ void CommonCaptureManager::WriteExecuteFromFile(util::FileOutputStream& out_stre execute_from_file.filename_length = filename_length; out_stream.Write(&execute_from_file, sizeof(execute_from_file)); - out_stream.Write(absolute_file.c_str(), filename_length); + out_stream.Write(relative_file.c_str(), filename_length); } void CommonCaptureManager::WriteSetBlockIndex(util::FileOutputStream& out_stream, diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index b2222034ff..1b4f9af86e 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -1015,9 +1015,9 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa // Filter duplicate calls to vkAllocateDescriptorSets for descriptor sets that were allocated by the same // API call and reference the same parameter buffer. - if (processed.find(wrapper->create_parameters.get()) == processed.end()) + const auto new_entry = processed.insert(wrapper->create_parameters.get()); + if (new_entry.second) { - processed.insert(wrapper->create_parameters.get()); if (wrapper->dirty) { // Write descriptor set creation call and add the parameter buffer to the processed set. @@ -3882,18 +3882,18 @@ bool VulkanStateWriter::IsFramebufferValid(const vulkan_wrappers::FramebufferWra void VulkanStateWriter::WriteExecuteFromFile(const std::string& filename, uint32_t n_blocks, int64_t offset) { // Remove path from filename - std::string absolute_file; + std::string relative_file; const size_t last_slash_pos = filename.find_last_of("\\/"); if (last_slash_pos != std::string::npos) { - absolute_file = filename.substr(last_slash_pos + 1); + relative_file = filename.substr(last_slash_pos + 1); } else { - absolute_file = filename; + relative_file = filename; } - const size_t filename_length = absolute_file.length(); + const size_t filename_length = relative_file.length(); format::ExecuteBlocksFromFile execute_from_file; execute_from_file.meta_header.block_header.size = @@ -3907,7 +3907,7 @@ void VulkanStateWriter::WriteExecuteFromFile(const std::string& filename, uint32 execute_from_file.filename_length = filename_length; output_stream_->Write(&execute_from_file, sizeof(execute_from_file)); - output_stream_->Write(absolute_file.c_str(), filename_length); + output_stream_->Write(relative_file.c_str(), filename_length); } GFXRECON_END_NAMESPACE(encode) From d8cc332fcdc14762bc0539a47d33b86dce940573 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sat, 31 Aug 2024 09:58:09 +0300 Subject: [PATCH 78/99] Copy paste mistake enabled state files along with asset --- framework/encode/capture_settings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/encode/capture_settings.cpp b/framework/encode/capture_settings.cpp index 9c5cf638a9..29197e818f 100644 --- a/framework/encode/capture_settings.cpp +++ b/framework/encode/capture_settings.cpp @@ -575,7 +575,7 @@ void CaptureSettings::ProcessOptions(OptionsMap* options, CaptureSettings* setti ParseBoolString(FindOption(options, kOptionKeyCaptureUseAssetFile), settings->trace_settings_.use_asset_file); settings->trace_settings_.write_state_files = ParseBoolString(FindOption(options, kOptionKeyCaptureWriteStateFiles), - settings->trace_settings_.use_asset_file); + settings->trace_settings_.write_state_files); // Page guard environment variables settings->trace_settings_.page_guard_copy_on_map = ParseBoolString( From ad4a2c64cbe22aeb76d01b5bee5c6c2395917e83 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sat, 31 Aug 2024 10:31:23 +0300 Subject: [PATCH 79/99] Asset files type changed to .gfxa --- framework/encode/capture_manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/encode/capture_manager.cpp b/framework/encode/capture_manager.cpp index 3ea5da40fd..45adae0fce 100644 --- a/framework/encode/capture_manager.cpp +++ b/framework/encode/capture_manager.cpp @@ -1001,12 +1001,12 @@ std::string CommonCaptureManager::CreateAssetFilename(const std::string& base_fi { if (base_filename.substr(dot_pos) == ".gfxr") { - asset_filename.insert(dot_pos, "_asset_file"); + asset_filename.replace(dot_pos, 16, "_asset_file.gfxa"); } } else { - asset_filename += std::string("_asset_file"); + asset_filename += std::string("_asset_file.gfxa"); } return asset_filename; From 2b13f13bfa5acfdbc98fa47369b1482df3930b7c Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sat, 31 Aug 2024 10:32:34 +0300 Subject: [PATCH 80/99] Convert now recognizes asset files --- tools/convert/main.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tools/convert/main.cpp b/tools/convert/main.cpp index b7528d0836..d6281030ea 100644 --- a/tools/convert/main.cpp +++ b/tools/convert/main.cpp @@ -21,6 +21,7 @@ ** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER ** DEALINGS IN THE SOFTWARE. */ +#include #include PROJECT_VERSION_HEADER_FILE #include "tool_settings.h" #include "decode/json_writer.h" /// @todo move to util? @@ -173,6 +174,16 @@ int main(int argc, const char** argv) bool file_per_frame = arg_parser.IsOptionSet(kFilePerFrameOption); bool output_to_stdout = output_filename == "stdout"; + bool is_asset_file = false; + size_t last_dot_pos = input_filename.find_last_of("."); + if (last_dot_pos != std::string::npos) + { + if (!input_filename.compare(last_dot_pos, 5, ".gfxa")) + { + is_asset_file = true; + } + } + gfxrecon::decode::FileProcessor file_processor; #ifndef D3D12_SUPPORT @@ -180,7 +191,7 @@ int main(int argc, const char** argv) bool detected_vulkan = false; gfxrecon::decode::DetectAPIs(input_filename, detected_d3d12, detected_vulkan); - if (!detected_vulkan) + if (!detected_vulkan && !is_asset_file) { GFXRECON_LOG_INFO("Capture file does not contain Vulkan content. D3D12 content may be present but " "gfxrecon-convert is not compiled with D3D12 support."); From 92e1804e4bf0cd42076d97384b1db8e2ef0106a0 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sat, 31 Aug 2024 10:34:52 +0300 Subject: [PATCH 81/99] Frame number is now written in asset file --- framework/decode/api_decoder.h | 2 ++ framework/decode/file_processor.cpp | 4 ++++ framework/decode/marker_consumer_base.h | 2 ++ framework/decode/marker_json_consumer.h | 5 ++++ framework/decode/vulkan_decoder_base.cpp | 8 +++++++ framework/decode/vulkan_decoder_base.h | 2 ++ framework/encode/vulkan_capture_manager.cpp | 2 +- framework/encode/vulkan_state_tracker.h | 8 ++++--- framework/encode/vulkan_state_writer.cpp | 26 ++++++++++++++++++++- framework/encode/vulkan_state_writer.h | 2 +- 10 files changed, 55 insertions(+), 6 deletions(-) diff --git a/framework/decode/api_decoder.h b/framework/decode/api_decoder.h index 9a35cb3462..7797de6961 100644 --- a/framework/decode/api_decoder.h +++ b/framework/decode/api_decoder.h @@ -78,6 +78,8 @@ class ApiDecoder virtual void DispatchStateEndMarker(uint64_t frame_number) = 0; + virtual void DispatchFrameBeginMarker(uint64_t frame_number) {}; + virtual void DispatchFrameEndMarker(uint64_t frame_number) = 0; virtual void DispatchDisplayMessageCommand(format::ThreadId thread_id, const std::string& message) = 0; diff --git a/framework/decode/file_processor.cpp b/framework/decode/file_processor.cpp index 8e039cde91..271b57ec83 100644 --- a/framework/decode/file_processor.cpp +++ b/framework/decode/file_processor.cpp @@ -2071,6 +2071,10 @@ bool FileProcessor::ProcessFrameMarker(const format::BlockHeader& block_header, { decoder->DispatchFrameEndMarker(frame_number); } + else if (marker_type == format::kBeginMarker) + { + decoder->DispatchFrameBeginMarker(frame_number); + } else { GFXRECON_LOG_WARNING("Skipping unrecognized frame marker with type %u", marker_type); diff --git a/framework/decode/marker_consumer_base.h b/framework/decode/marker_consumer_base.h index d76dd05212..73607356e3 100644 --- a/framework/decode/marker_consumer_base.h +++ b/framework/decode/marker_consumer_base.h @@ -40,6 +40,8 @@ class MarkerConsumerBase virtual void ProcessStateEndMarker(uint64_t frame_number) {} + virtual void ProcessFrameBeginMarker(uint64_t frame_number) {} + virtual void ProcessFrameEndMarker(uint64_t frame_number) {} }; diff --git a/framework/decode/marker_json_consumer.h b/framework/decode/marker_json_consumer.h index 45592c8a6d..6721e7c17d 100644 --- a/framework/decode/marker_json_consumer.h +++ b/framework/decode/marker_json_consumer.h @@ -45,6 +45,11 @@ class MarkerJsonConsumer : public Base this->writer_->WriteMarker(format::kNameState, "EndMarker", frame_number); } + virtual void ProcessFrameBeginMarker(uint64_t frame_number) + { + this->writer_->WriteMarker(format::kNameFrame, "BeginMarker", frame_number); + } + virtual void ProcessFrameEndMarker(uint64_t frame_number) { this->writer_->WriteMarker(format::kNameFrame, "EndMarker", frame_number); diff --git a/framework/decode/vulkan_decoder_base.cpp b/framework/decode/vulkan_decoder_base.cpp index 269c95021d..e489c77d6c 100644 --- a/framework/decode/vulkan_decoder_base.cpp +++ b/framework/decode/vulkan_decoder_base.cpp @@ -62,6 +62,14 @@ void VulkanDecoderBase::DispatchFrameEndMarker(uint64_t frame_number) } } +void VulkanDecoderBase::DispatchFrameBeginMarker(uint64_t frame_number) +{ + for (auto consumer : consumers_) + { + consumer->ProcessFrameBeginMarker(frame_number); + } +} + void VulkanDecoderBase::DispatchDisplayMessageCommand(format::ThreadId thread_id, const std::string& message) { GFXRECON_UNREFERENCED_PARAMETER(thread_id); diff --git a/framework/decode/vulkan_decoder_base.h b/framework/decode/vulkan_decoder_base.h index 0e348d8d5d..41524098b3 100644 --- a/framework/decode/vulkan_decoder_base.h +++ b/framework/decode/vulkan_decoder_base.h @@ -83,6 +83,8 @@ class VulkanDecoderBase : public ApiDecoder virtual void DispatchStateEndMarker(uint64_t frame_number) override; + virtual void DispatchFrameBeginMarker(uint64_t frame_number) override; + virtual void DispatchFrameEndMarker(uint64_t frame_number) override; virtual void DispatchDisplayMessageCommand(format::ThreadId thread_id, const std::string& message) override; diff --git a/framework/encode/vulkan_capture_manager.cpp b/framework/encode/vulkan_capture_manager.cpp index 21bcee43ff..17897b3c33 100644 --- a/framework/encode/vulkan_capture_manager.cpp +++ b/framework/encode/vulkan_capture_manager.cpp @@ -112,7 +112,7 @@ void VulkanCaptureManager::WriteTrackedState(util::FileOutputStream* file_stream void VulkanCaptureManager::WriteAssets(util::FileOutputStream* asset_file_stream, format::ThreadId thread_id) { assert(state_tracker_ != nullptr); - uint64_t n_blocks = state_tracker_->WriteAssets(asset_file_stream, thread_id, GetCompressor()); + uint64_t n_blocks = state_tracker_->WriteAssets(asset_file_stream, thread_id, GetCompressor(), GetCurrentFrame()); common_manager_->IncrementBlockIndex(n_blocks); } diff --git a/framework/encode/vulkan_state_tracker.h b/framework/encode/vulkan_state_tracker.h index d799f7fb67..f8e0827968 100644 --- a/framework/encode/vulkan_state_tracker.h +++ b/framework/encode/vulkan_state_tracker.h @@ -70,15 +70,17 @@ class VulkanStateTracker return state_writer.WriteState(state_table_, frame_number); } - uint64_t - WriteAssets(util::FileOutputStream* asset_file_stream, format::ThreadId thread_id, util::Compressor* compressor) + uint64_t WriteAssets(util::FileOutputStream* asset_file_stream, + format::ThreadId thread_id, + util::Compressor* compressor, + uint64_t frame_number) { assert(asset_file_stream != nullptr); VulkanStateWriter state_writer(nullptr, compressor, thread_id, asset_file_stream, &asset_file_offsets_); std::unique_lock lock(state_table_mutex_); - return state_writer.WriteAssets(state_table_); + return state_writer.WriteAssets(state_table_, frame_number); } template diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index 1b4f9af86e..d34ffdacb1 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -95,10 +95,29 @@ VulkanStateWriter::VulkanStateWriter(util::FileOutputStream* outp VulkanStateWriter::~VulkanStateWriter() {} -uint64_t VulkanStateWriter::WriteAssets(const VulkanStateTable& state_table) +static void +WriteFrameMarker(format::MarkerType marker_type, uint64_t frame_number, util::FileOutputStream* output_stream) { + assert(output_stream != nullptr); + + format::Marker marker_cmd; + uint64_t header_size = sizeof(format::Marker); + marker_cmd.header.size = sizeof(marker_cmd.marker_type) + sizeof(marker_cmd.frame_number); + marker_cmd.header.type = format::BlockType::kFrameMarkerBlock; + marker_cmd.marker_type = marker_type; + marker_cmd.frame_number = frame_number; + + output_stream->Write(&marker_cmd, sizeof(marker_cmd)); +} + +uint64_t VulkanStateWriter::WriteAssets(const VulkanStateTable& state_table, uint64_t frame_number) +{ + assert(asset_file_stream_ != nullptr); + blocks_written_ = 0; + WriteFrameMarker(format::MarkerType::kBeginMarker, frame_number, asset_file_stream_); + WriteResourceMemoryState(state_table, false); WriteDescriptorSetStateWithAssetFile(state_table); @@ -122,6 +141,11 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint // For the Begin Marker meta command ++blocks_written_; + if (asset_file_stream_ != nullptr) + { + WriteFrameMarker(format::MarkerType::kBeginMarker, frame_number, asset_file_stream_); + } + // Instance, device, and queue creation. StandardCreateWrite(state_table); WritePhysicalDeviceState(state_table); diff --git a/framework/encode/vulkan_state_writer.h b/framework/encode/vulkan_state_writer.h index d41851fde9..05086cdc52 100644 --- a/framework/encode/vulkan_state_writer.h +++ b/framework/encode/vulkan_state_writer.h @@ -60,7 +60,7 @@ class VulkanStateWriter // Returns number of blocks written to the output_stream. uint64_t WriteState(const VulkanStateTable& state_table, uint64_t frame_number); - uint64_t WriteAssets(const VulkanStateTable& state_table); + uint64_t WriteAssets(const VulkanStateTable& state_table, uint64_t frame_number); private: // Data structures for processing resource memory snapshots. From 0bb32919c88b83029da33da79adbf15700ed965e Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sat, 31 Aug 2024 18:40:17 +0300 Subject: [PATCH 82/99] Asset file consumer --- android/framework/decode/CMakeLists.txt | 2 + framework/decode/CMakeLists.txt | 2 + framework/decode/api_decoder.h | 4 +- framework/decode/asset_file_consumer.cpp | 132 ++++++++++++++++++ framework/decode/asset_file_consumer.h | 96 +++++++++++++ framework/decode/common_consumer_base.h | 2 + framework/decode/file_processor.cpp | 5 + framework/decode/metadata_consumer_base.h | 13 +- framework/decode/vulkan_decoder_base.cpp | 8 ++ framework/decode/vulkan_decoder_base.h | 2 + .../decode/vulkan_replay_consumer_base.cpp | 5 + .../decode/vulkan_replay_consumer_base.h | 2 + 12 files changed, 268 insertions(+), 5 deletions(-) create mode 100644 framework/decode/asset_file_consumer.cpp create mode 100644 framework/decode/asset_file_consumer.h diff --git a/android/framework/decode/CMakeLists.txt b/android/framework/decode/CMakeLists.txt index 3889eab031..1acff513cd 100644 --- a/android/framework/decode/CMakeLists.txt +++ b/android/framework/decode/CMakeLists.txt @@ -4,6 +4,8 @@ target_sources(gfxrecon_decode PRIVATE ${GFXRECON_SOURCE_DIR}/framework/decode/annotation_handler.h ${GFXRECON_SOURCE_DIR}/framework/decode/api_decoder.h + ${GFXRECON_SOURCE_DIR}/framework/decode/asset_file_consumer.h + ${GFXRECON_SOURCE_DIR}/framework/decode/asset_file_consumer.cpp ${GFXRECON_SOURCE_DIR}/framework/decode/common_consumer_base.h ${GFXRECON_SOURCE_DIR}/framework/decode/copy_shaders.h ${GFXRECON_SOURCE_DIR}/framework/decode/custom_vulkan_struct_decoders.h diff --git a/framework/decode/CMakeLists.txt b/framework/decode/CMakeLists.txt index 00840de1e4..e452df8b65 100644 --- a/framework/decode/CMakeLists.txt +++ b/framework/decode/CMakeLists.txt @@ -32,6 +32,8 @@ target_sources(gfxrecon_decode PRIVATE ${CMAKE_CURRENT_LIST_DIR}/annotation_handler.h ${CMAKE_CURRENT_LIST_DIR}/api_decoder.h + ${CMAKE_CURRENT_LIST_DIR}/asset_file_consumer.h + ${CMAKE_CURRENT_LIST_DIR}/asset_file_consumer.cpp ${CMAKE_CURRENT_LIST_DIR}/common_consumer_base.h ${CMAKE_CURRENT_LIST_DIR}/copy_shaders.h ${CMAKE_CURRENT_LIST_DIR}/custom_vulkan_struct_decoders.h diff --git a/framework/decode/api_decoder.h b/framework/decode/api_decoder.h index 7797de6961..dbdaae3886 100644 --- a/framework/decode/api_decoder.h +++ b/framework/decode/api_decoder.h @@ -78,7 +78,7 @@ class ApiDecoder virtual void DispatchStateEndMarker(uint64_t frame_number) = 0; - virtual void DispatchFrameBeginMarker(uint64_t frame_number) {}; + virtual void DispatchFrameBeginMarker(uint64_t frame_number){}; virtual void DispatchFrameEndMarker(uint64_t frame_number) = 0; @@ -199,6 +199,8 @@ class ApiDecoder virtual void SetCurrentBlockIndex(uint64_t block_index){}; + virtual void SetCurrentFileOffset(int64_t offset){}; + virtual void SetCurrentApiCallId(format::ApiCallId api_call_id){}; virtual void DispatchSetTlasToBlasDependencyCommand(format::HandleId tlas, diff --git a/framework/decode/asset_file_consumer.cpp b/framework/decode/asset_file_consumer.cpp new file mode 100644 index 0000000000..b70d191d35 --- /dev/null +++ b/framework/decode/asset_file_consumer.cpp @@ -0,0 +1,132 @@ +/* +** Copyright (c) 2024 Valve Corporation +** Copyright (c) 2024 LunarG, Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and associated documentation files (the "Software"), +** to deal in the Software without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Software, and to permit persons to whom the +** Software is furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Software. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +*/ + +#include "decode/custom_vulkan_struct_decoders.h" +#include "format/format.h" +#include "util/defines.h" +#include "util/logging.h" +#include +#include "asset_file_consumer.h" + +#include +#include +#include + +GFXRECON_BEGIN_NAMESPACE(gfxrecon) +GFXRECON_BEGIN_NAMESPACE(decode) + +void AssetFileConsumer::ProcessFrameBeginMarker(uint64_t frame_number) +{ + current_frame_ = frame_number; + fprintf(debug_, "%s() %" PRId64 "\n", __func__, frame_number); + fsync(fileno(debug_)); +} + +void AssetFileConsumer::ProcessInitBufferCommand(format::HandleId device_id, + format::HandleId buffer_id, + uint64_t data_size, + const uint8_t* data) +{ + GFXRECON_UNREFERENCED_PARAMETER(device_id); + GFXRECON_UNREFERENCED_PARAMETER(data_size); + GFXRECON_UNREFERENCED_PARAMETER(data); + + FrameAssetFileOffsets& frame_offsets = asset_file_offsets_[current_frame_]; + frame_offsets[buffer_id] = block_header_file_offset_; + fprintf(debug_, "buffer %" PRIu64 " -> %" PRId64 "\n", buffer_id, block_header_file_offset_); + fsync(fileno(debug_)); +} + +void AssetFileConsumer::ProcessInitImageCommand(format::HandleId device_id, + format::HandleId image_id, + uint64_t data_size, + uint32_t aspect, + uint32_t layout, + const std::vector& level_sizes, + const uint8_t* data) +{ + GFXRECON_UNREFERENCED_PARAMETER(device_id); + GFXRECON_UNREFERENCED_PARAMETER(data_size); + GFXRECON_UNREFERENCED_PARAMETER(aspect); + GFXRECON_UNREFERENCED_PARAMETER(layout); + GFXRECON_UNREFERENCED_PARAMETER(level_sizes); + GFXRECON_UNREFERENCED_PARAMETER(data); + + FrameAssetFileOffsets& frame_offsets = asset_file_offsets_[current_frame_]; + frame_offsets[image_id] = block_header_file_offset_; + fprintf(debug_, "image %" PRIu64 " -> %" PRId64 "\n", image_id, block_header_file_offset_); + fsync(fileno(debug_)); +} + +void AssetFileConsumer::Process_vkAllocateDescriptorSets( + const ApiCallInfo& call_info, + VkResult returnValue, + format::HandleId device, + StructPointerDecoder* pAllocateInfo, + HandlePointerDecoder* pDescriptorSets) +{ + GFXRECON_UNREFERENCED_PARAMETER(call_info); + GFXRECON_UNREFERENCED_PARAMETER(returnValue); + GFXRECON_UNREFERENCED_PARAMETER(device); + GFXRECON_UNREFERENCED_PARAMETER(pAllocateInfo); + + if (pDescriptorSets != nullptr && pDescriptorSets->GetPointer() != nullptr) + { + // Get only the first one + const format::HandleId desc_id = pDescriptorSets->GetPointer()[0]; + + FrameAssetFileOffsets& frame_offsets = asset_file_offsets_[current_frame_]; + frame_offsets[desc_id] = block_header_file_offset_; + fprintf(debug_, "AllocateDescSet %" PRIu64 " -> %" PRId64 "\n", desc_id, block_header_file_offset_); + fsync(fileno(debug_)); + } +} + +void AssetFileConsumer::Process_vkUpdateDescriptorSets( + const ApiCallInfo& call_info, + format::HandleId device, + uint32_t descriptorWriteCount, + StructPointerDecoder* pDescriptorWrites, + uint32_t descriptorCopyCount, + StructPointerDecoder* pDescriptorCopies) +{ + if (descriptorWriteCount && pDescriptorWrites != nullptr) + { + Decoded_VkWriteDescriptorSet* writes_meta = pDescriptorWrites->GetMetaStructPointer(); + if (writes_meta != nullptr) + { + const format::HandleId desc_id = writes_meta->dstSet; + + FrameAssetFileOffsets& frame_offsets = asset_file_offsets_[current_frame_]; + const auto new_entry = frame_offsets.insert({ desc_id, block_header_file_offset_ }); + if (new_entry.second) + { + fprintf(debug_, "Update %" PRIu64 " -> %" PRId64 "\n", desc_id, block_header_file_offset_); + fsync(fileno(debug_)); + } + } + } +} + +GFXRECON_END_NAMESPACE(gfxrecon) +GFXRECON_END_NAMESPACE(decode) diff --git a/framework/decode/asset_file_consumer.h b/framework/decode/asset_file_consumer.h new file mode 100644 index 0000000000..62540ccee5 --- /dev/null +++ b/framework/decode/asset_file_consumer.h @@ -0,0 +1,96 @@ +/* +** Copyright (c) 2024 Valve Corporation +** Copyright (c) 2024 LunarG, Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and associated documentation files (the "Software"), +** to deal in the Software without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Software, and to permit persons to whom the +** Software is furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Software. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +*/ + +#ifndef GFXRECON_DECODE_ASSET_FILE_CONSUMER_BASE_H +#define GFXRECON_DECODE_ASSET_FILE_CONSUMER_BASE_H + +#include "format/format.h" +#include "generated/generated_vulkan_consumer.h" +#include "util/defines.h" + +#include "util/platform.h" + +#include +#include +#include + +GFXRECON_BEGIN_NAMESPACE(gfxrecon) +GFXRECON_BEGIN_NAMESPACE(decode) + +class AssetFileConsumer : public VulkanConsumer +{ + using FrameNumber = uint64_t; + using FrameAssetFileOffsets = std::unordered_map; + using AssetFileOffsets = std::map; + + public: + AssetFileConsumer() : current_frame_(0) + { + if (util::platform::FileOpen(&debug_, "AssetFileConsumer.txt", "a")) + { + assert(0); + } + } + + virtual void ProcessFrameBeginMarker(uint64_t frame_number) override; + + virtual void ProcessInitBufferCommand(format::HandleId device_id, + format::HandleId buffer_id, + uint64_t data_size, + const uint8_t* data) override; + + virtual void ProcessInitImageCommand(format::HandleId device_id, + format::HandleId image_id, + uint64_t data_size, + uint32_t aspect, + uint32_t layout, + const std::vector& level_sizes, + const uint8_t* data) override; + + virtual void + Process_vkAllocateDescriptorSets(const ApiCallInfo& call_info, + VkResult returnValue, + format::HandleId device, + StructPointerDecoder* pAllocateInfo, + HandlePointerDecoder* pDescriptorSets) override; + + virtual void + Process_vkUpdateDescriptorSets(const ApiCallInfo& call_info, + format::HandleId device, + uint32_t descriptorWriteCount, + StructPointerDecoder* pDescriptorWrites, + uint32_t descriptorCopyCount, + StructPointerDecoder* pDescriptorCopies) override; + + void GetFrameAssetFileOffsets(FrameNumber frame_number, FrameAssetFileOffsets& frame_asset_file_offsets); + + private: + AssetFileOffsets asset_file_offsets_; + FrameNumber current_frame_; + FILE* debug_; +}; + +GFXRECON_END_NAMESPACE(gfxrecon) +GFXRECON_END_NAMESPACE(decode) + +#endif // GFXRECON_DECODE_ASSET_FILE_CONSUMER_BASE_H diff --git a/framework/decode/common_consumer_base.h b/framework/decode/common_consumer_base.h index 96c0a7f5b9..1b5da92edd 100644 --- a/framework/decode/common_consumer_base.h +++ b/framework/decode/common_consumer_base.h @@ -52,6 +52,8 @@ class CommonConsumerBase : public MetadataConsumerBase, public MarkerConsumerBas virtual void SetCurrentBlockIndex(uint64_t block_index) override { block_index_ = block_index; } + virtual void SetCurrentFileOffset(int64_t offset) override { block_header_file_offset_ = offset; } + virtual void ProcessSetEnvironmentVariablesCommand(format::SetEnvironmentVariablesCommand& header, const char* env_string) {} diff --git a/framework/decode/file_processor.cpp b/framework/decode/file_processor.cpp index 271b57ec83..d6bfd86eba 100644 --- a/framework/decode/file_processor.cpp +++ b/framework/decode/file_processor.cpp @@ -303,6 +303,11 @@ bool FileProcessor::ProcessBlocks() if (success) { + for (auto decoder : decoders_) + { + decoder->SetCurrentFileOffset(util::platform::FileTell(GetFileDescriptor())); + } + success = ReadBlockHeader(&block_header); for (auto decoder : decoders_) diff --git a/framework/decode/metadata_consumer_base.h b/framework/decode/metadata_consumer_base.h index 0e2eff9174..4ace352c19 100644 --- a/framework/decode/metadata_consumer_base.h +++ b/framework/decode/metadata_consumer_base.h @@ -26,6 +26,7 @@ #include "util/defines.h" #include "format/format.h" +#include GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(decode) @@ -35,6 +36,8 @@ GFXRECON_BEGIN_NAMESPACE(decode) class MetadataConsumerBase { public: + MetadataConsumerBase() : block_index_(0), block_header_file_offset_(0) {} + virtual void Process_ExeFileInfo(util::filepath::FileInfo& info_record) {} virtual void ProcessDisplayMessageCommand(const std::string& message) {} virtual void ProcessFillMemoryCommand(uint64_t memory_id, uint64_t offset, uint64_t size, const uint8_t* data) {} @@ -104,15 +107,17 @@ class MetadataConsumerBase virtual void ProcessInitSubresourceCommand(const format::InitSubresourceCommandHeader& command_header, const uint8_t* data) {} - virtual void ProcessExecuteBlocksFromFile(uint32_t n_blocks, - int64_t offset, - const std::string& filename) - {} + virtual void ProcessExecuteBlocksFromFile(uint32_t n_blocks, int64_t offset, const std::string& filename) {} virtual void SetCurrentBlockIndex(uint64_t block_index) {} + virtual void SetCurrentFileOffset(int64_t offset) {} + protected: uint64_t block_index_; + + // Stores the file offset of the last block header + int64_t block_header_file_offset_; }; GFXRECON_END_NAMESPACE(decode) diff --git a/framework/decode/vulkan_decoder_base.cpp b/framework/decode/vulkan_decoder_base.cpp index e489c77d6c..154c44e970 100644 --- a/framework/decode/vulkan_decoder_base.cpp +++ b/framework/decode/vulkan_decoder_base.cpp @@ -576,6 +576,14 @@ void VulkanDecoderBase::SetCurrentBlockIndex(uint64_t block_index) } } +void VulkanDecoderBase::SetCurrentFileOffset(int64_t offset) +{ + for (auto consumer : consumers_) + { + consumer->SetCurrentFileOffset(offset); + } +} + void VulkanDecoderBase::DispatchExecuteBlocksFromFile(format::ThreadId thread_id, uint32_t n_blocks, int64_t offset, diff --git a/framework/decode/vulkan_decoder_base.h b/framework/decode/vulkan_decoder_base.h index 41524098b3..ee42765da9 100644 --- a/framework/decode/vulkan_decoder_base.h +++ b/framework/decode/vulkan_decoder_base.h @@ -202,6 +202,8 @@ class VulkanDecoderBase : public ApiDecoder virtual void SetCurrentBlockIndex(uint64_t block_index) override; + virtual void SetCurrentFileOffset(int64_t offset) override; + virtual void DispatchExecuteBlocksFromFile(format::ThreadId thread_id, uint32_t n_blocks, int64_t offset, diff --git a/framework/decode/vulkan_replay_consumer_base.cpp b/framework/decode/vulkan_replay_consumer_base.cpp index ddb6856a23..a15a43b795 100644 --- a/framework/decode/vulkan_replay_consumer_base.cpp +++ b/framework/decode/vulkan_replay_consumer_base.cpp @@ -9632,5 +9632,10 @@ void VulkanReplayConsumerBase::SetCurrentBlockIndex(uint64_t block_index) main_thread_queue_.poll(); } +void VulkanReplayConsumerBase::SetCurrentFileOffset(int64_t offset) +{ + VulkanConsumer::SetCurrentFileOffset(offset); +} + GFXRECON_END_NAMESPACE(decode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/decode/vulkan_replay_consumer_base.h b/framework/decode/vulkan_replay_consumer_base.h index 572c237450..7cefaa6bc7 100644 --- a/framework/decode/vulkan_replay_consumer_base.h +++ b/framework/decode/vulkan_replay_consumer_base.h @@ -77,6 +77,8 @@ class VulkanReplayConsumerBase : public VulkanConsumer void SetCurrentBlockIndex(uint64_t block_index) override; + virtual void SetCurrentFileOffset(int64_t offset) override; + void Process_ExeFileInfo(util::filepath::FileInfo& info_record) override { gfxrecon::util::filepath::CheckReplayerName(info_record.AppName); From b07309126817de0bf7b9c55184c2b3dd14392e01 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 2 Sep 2024 12:20:47 +0300 Subject: [PATCH 83/99] Keep asset file information per frame --- framework/decode/asset_file_consumer.cpp | 34 +++++++++++++++++------- framework/decode/asset_file_consumer.h | 12 +++------ framework/encode/vulkan_state_tracker.h | 29 +++++++++++++++++--- framework/encode/vulkan_state_writer.h | 10 +++---- framework/format/format.h | 7 +++++ 5 files changed, 66 insertions(+), 26 deletions(-) diff --git a/framework/decode/asset_file_consumer.cpp b/framework/decode/asset_file_consumer.cpp index b70d191d35..c9dd74564b 100644 --- a/framework/decode/asset_file_consumer.cpp +++ b/framework/decode/asset_file_consumer.cpp @@ -38,6 +38,20 @@ GFXRECON_BEGIN_NAMESPACE(decode) void AssetFileConsumer::ProcessFrameBeginMarker(uint64_t frame_number) { current_frame_ = frame_number; + + if (!asset_file_offsets_.empty()) + { + auto entry = asset_file_offsets_.find(frame_number); + if (entry != asset_file_offsets_.end()) + { + GFXRECON_LOG_ERROR("Dublicate asset file entries for frame %" PRIu64 "?", frame_number); + } + + // Copy all entries from previous frame + auto last_frame_entry = asset_file_offsets_.rbegin(); + asset_file_offsets_[frame_number] = last_frame_entry->second; + } + fprintf(debug_, "%s() %" PRId64 "\n", __func__, frame_number); fsync(fileno(debug_)); } @@ -51,8 +65,8 @@ void AssetFileConsumer::ProcessInitBufferCommand(format::HandleId device_id, GFXRECON_UNREFERENCED_PARAMETER(data_size); GFXRECON_UNREFERENCED_PARAMETER(data); - FrameAssetFileOffsets& frame_offsets = asset_file_offsets_[current_frame_]; - frame_offsets[buffer_id] = block_header_file_offset_; + format::FrameAssetFileOffsets& frame_offsets = asset_file_offsets_[current_frame_]; + frame_offsets[buffer_id] = block_header_file_offset_; fprintf(debug_, "buffer %" PRIu64 " -> %" PRId64 "\n", buffer_id, block_header_file_offset_); fsync(fileno(debug_)); } @@ -72,8 +86,8 @@ void AssetFileConsumer::ProcessInitImageCommand(format::HandleId dev GFXRECON_UNREFERENCED_PARAMETER(level_sizes); GFXRECON_UNREFERENCED_PARAMETER(data); - FrameAssetFileOffsets& frame_offsets = asset_file_offsets_[current_frame_]; - frame_offsets[image_id] = block_header_file_offset_; + format::FrameAssetFileOffsets& frame_offsets = asset_file_offsets_[current_frame_]; + frame_offsets[image_id] = block_header_file_offset_; fprintf(debug_, "image %" PRIu64 " -> %" PRId64 "\n", image_id, block_header_file_offset_); fsync(fileno(debug_)); } @@ -95,9 +109,9 @@ void AssetFileConsumer::Process_vkAllocateDescriptorSets( // Get only the first one const format::HandleId desc_id = pDescriptorSets->GetPointer()[0]; - FrameAssetFileOffsets& frame_offsets = asset_file_offsets_[current_frame_]; - frame_offsets[desc_id] = block_header_file_offset_; - fprintf(debug_, "AllocateDescSet %" PRIu64 " -> %" PRId64 "\n", desc_id, block_header_file_offset_); + format::FrameAssetFileOffsets& frame_offsets = asset_file_offsets_[current_frame_]; + frame_offsets[desc_id] = block_header_file_offset_; + fprintf(debug_, "%" PRIu64 " -> %" PRId64 "\n", desc_id, block_header_file_offset_); fsync(fileno(debug_)); } } @@ -117,11 +131,11 @@ void AssetFileConsumer::Process_vkUpdateDescriptorSets( { const format::HandleId desc_id = writes_meta->dstSet; - FrameAssetFileOffsets& frame_offsets = asset_file_offsets_[current_frame_]; - const auto new_entry = frame_offsets.insert({ desc_id, block_header_file_offset_ }); + format::FrameAssetFileOffsets& frame_offsets = asset_file_offsets_[current_frame_]; + const auto new_entry = frame_offsets.insert({ desc_id, block_header_file_offset_ }); if (new_entry.second) { - fprintf(debug_, "Update %" PRIu64 " -> %" PRId64 "\n", desc_id, block_header_file_offset_); + fprintf(debug_, "%" PRIu64 " -> %" PRId64 "\n", desc_id, block_header_file_offset_); fsync(fileno(debug_)); } } diff --git a/framework/decode/asset_file_consumer.h b/framework/decode/asset_file_consumer.h index 62540ccee5..2eecc5e6eb 100644 --- a/framework/decode/asset_file_consumer.h +++ b/framework/decode/asset_file_consumer.h @@ -39,10 +39,6 @@ GFXRECON_BEGIN_NAMESPACE(decode) class AssetFileConsumer : public VulkanConsumer { - using FrameNumber = uint64_t; - using FrameAssetFileOffsets = std::unordered_map; - using AssetFileOffsets = std::map; - public: AssetFileConsumer() : current_frame_(0) { @@ -82,12 +78,12 @@ class AssetFileConsumer : public VulkanConsumer uint32_t descriptorCopyCount, StructPointerDecoder* pDescriptorCopies) override; - void GetFrameAssetFileOffsets(FrameNumber frame_number, FrameAssetFileOffsets& frame_asset_file_offsets); + const format::AssetFileOffsets* GetFrameAssetFileOffsets() { return &asset_file_offsets_; } private: - AssetFileOffsets asset_file_offsets_; - FrameNumber current_frame_; - FILE* debug_; + format::AssetFileOffsets asset_file_offsets_; + format::FrameNumber current_frame_; + FILE* debug_; }; GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/vulkan_state_tracker.h b/framework/encode/vulkan_state_tracker.h index f8e0827968..d341242579 100644 --- a/framework/encode/vulkan_state_tracker.h +++ b/framework/encode/vulkan_state_tracker.h @@ -60,11 +60,13 @@ class VulkanStateTracker util::Compressor* compressor, uint64_t frame_number) { + CopyAssetFileOffsetsFromLastFrame(frame_number); + VulkanStateWriter state_writer(file_stream, compressor, thread_id, asset_file_stream, - asset_file_stream != nullptr ? &asset_file_offsets_ : nullptr); + asset_file_stream != nullptr ? &asset_file_offsets_[frame_number] : nullptr); std::unique_lock lock(state_table_mutex_); return state_writer.WriteState(state_table_, frame_number); @@ -77,7 +79,10 @@ class VulkanStateTracker { assert(asset_file_stream != nullptr); - VulkanStateWriter state_writer(nullptr, compressor, thread_id, asset_file_stream, &asset_file_offsets_); + CopyAssetFileOffsetsFromLastFrame(frame_number); + + VulkanStateWriter state_writer( + nullptr, compressor, thread_id, asset_file_stream, &asset_file_offsets_[frame_number]); std::unique_lock lock(state_table_mutex_); return state_writer.WriteAssets(state_table_, frame_number); @@ -681,6 +686,8 @@ class VulkanStateTracker void TrackBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo); + void LoadAssetFileOffsets(const format::AssetFileOffsets& offsets); + private: template void AddGroupHandles(ParentHandle parent_handle, @@ -773,6 +780,22 @@ class VulkanStateTracker void MarkReferencedAssetsAsDirty(vulkan_wrappers::CommandBufferWrapper* cmd_buf_wrapper); + void CopyAssetFileOffsetsFromLastFrame(format::FrameNumber frame_number) + { + if (!asset_file_offsets_.empty()) + { + auto entry = asset_file_offsets_.find(frame_number); + if (entry != asset_file_offsets_.end()) + { + GFXRECON_LOG_ERROR("Dublicate asset file entries for frame %" PRIu64 "?", frame_number); + } + + // Copy all entries from previous frame + auto last_frame_entry = asset_file_offsets_.rbegin(); + asset_file_offsets_[frame_number] = last_frame_entry->second; + } + } + std::mutex state_table_mutex_; VulkanStateTable state_table_; @@ -782,7 +805,7 @@ class VulkanStateTracker // Keeps track of acceleration structures' device addresses std::unordered_map as_device_addresses_map; - std::unordered_map asset_file_offsets_; + format::AssetFileOffsets asset_file_offsets_; }; GFXRECON_END_NAMESPACE(encode) diff --git a/framework/encode/vulkan_state_writer.h b/framework/encode/vulkan_state_writer.h index 05086cdc52..a821378cf6 100644 --- a/framework/encode/vulkan_state_writer.h +++ b/framework/encode/vulkan_state_writer.h @@ -49,11 +49,11 @@ GFXRECON_BEGIN_NAMESPACE(encode) class VulkanStateWriter { public: - VulkanStateWriter(util::FileOutputStream* output_stream, - util::Compressor* compressor, - format::ThreadId thread_id, - util::FileOutputStream* asset_file_stream = nullptr, - std::unordered_map* asset_file_offsets = nullptr); + VulkanStateWriter(util::FileOutputStream* output_stream, + util::Compressor* compressor, + format::ThreadId thread_id, + util::FileOutputStream* asset_file_stream = nullptr, + format::FrameAssetFileOffsets* frame_asset_file_offsets = nullptr); ~VulkanStateWriter(); diff --git a/framework/format/format.h b/framework/format/format.h index 79adb80c3f..b40788a781 100644 --- a/framework/format/format.h +++ b/framework/format/format.h @@ -33,7 +33,9 @@ #include "util/driver_info.h" #include +#include #include +#include #define GFXRECON_FOURCC GFXRECON_MAKE_FOURCC('G', 'F', 'X', 'R') #define GFXRECON_FILE_EXTENSION ".gfxr" @@ -57,6 +59,11 @@ typedef uint32_t FormatEncodeType; typedef HandleEncodeType HandleId; typedef uint64_t ThreadId; +typedef uint64_t FrameNumber; + +typedef std::unordered_map FrameAssetFileOffsets; +// This must be an ordered map +typedef std::map AssetFileOffsets; const uint32_t kCompressedBlockTypeBit = 0x80000000; const size_t kUuidSize = 16; From dcfce01c588aaa3edc0ffff09bf20e6c7fe5d136 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Tue, 3 Sep 2024 11:11:43 +0300 Subject: [PATCH 84/99] Asset consumer tracks greatest detect id --- framework/decode/asset_file_consumer.cpp | 20 ++++++++++++++++++++ framework/decode/asset_file_consumer.h | 5 ++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/framework/decode/asset_file_consumer.cpp b/framework/decode/asset_file_consumer.cpp index c9dd74564b..31479d4250 100644 --- a/framework/decode/asset_file_consumer.cpp +++ b/framework/decode/asset_file_consumer.cpp @@ -69,6 +69,11 @@ void AssetFileConsumer::ProcessInitBufferCommand(format::HandleId device_id, frame_offsets[buffer_id] = block_header_file_offset_; fprintf(debug_, "buffer %" PRIu64 " -> %" PRId64 "\n", buffer_id, block_header_file_offset_); fsync(fileno(debug_)); + + if (buffer_id > greatest_id_) + { + greatest_id_ = buffer_id; + } } void AssetFileConsumer::ProcessInitImageCommand(format::HandleId device_id, @@ -90,6 +95,11 @@ void AssetFileConsumer::ProcessInitImageCommand(format::HandleId dev frame_offsets[image_id] = block_header_file_offset_; fprintf(debug_, "image %" PRIu64 " -> %" PRId64 "\n", image_id, block_header_file_offset_); fsync(fileno(debug_)); + + if (image_id > greatest_id_) + { + greatest_id_ = image_id; + } } void AssetFileConsumer::Process_vkAllocateDescriptorSets( @@ -113,6 +123,11 @@ void AssetFileConsumer::Process_vkAllocateDescriptorSets( frame_offsets[desc_id] = block_header_file_offset_; fprintf(debug_, "%" PRIu64 " -> %" PRId64 "\n", desc_id, block_header_file_offset_); fsync(fileno(debug_)); + + if (desc_id > greatest_id_) + { + greatest_id_ = desc_id; + } } } @@ -138,6 +153,11 @@ void AssetFileConsumer::Process_vkUpdateDescriptorSets( fprintf(debug_, "%" PRIu64 " -> %" PRId64 "\n", desc_id, block_header_file_offset_); fsync(fileno(debug_)); } + + if (desc_id > greatest_id_) + { + greatest_id_ = desc_id; + } } } } diff --git a/framework/decode/asset_file_consumer.h b/framework/decode/asset_file_consumer.h index 2eecc5e6eb..9bf8e5531c 100644 --- a/framework/decode/asset_file_consumer.h +++ b/framework/decode/asset_file_consumer.h @@ -40,7 +40,7 @@ GFXRECON_BEGIN_NAMESPACE(decode) class AssetFileConsumer : public VulkanConsumer { public: - AssetFileConsumer() : current_frame_(0) + AssetFileConsumer() : current_frame_(0), greatest_id_(0) { if (util::platform::FileOpen(&debug_, "AssetFileConsumer.txt", "a")) { @@ -80,9 +80,12 @@ class AssetFileConsumer : public VulkanConsumer const format::AssetFileOffsets* GetFrameAssetFileOffsets() { return &asset_file_offsets_; } + format::HandleId GetGreatestId() const { return greatest_id_; } + private: format::AssetFileOffsets asset_file_offsets_; format::FrameNumber current_frame_; + format::HandleId greatest_id_; FILE* debug_; }; From 0a79e38625937ef75efac2eef9a021687b332dc2 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Fri, 6 Sep 2024 16:07:33 +0300 Subject: [PATCH 85/99] Something is starting to work --- android/scripts/gfxrecon.py | 5 + framework/decode/asset_file_consumer.cpp | 10 +- framework/decode/asset_file_consumer.h | 24 +- framework/decode/replay_options.h | 1 + framework/decode/vulkan_handle_mapping_util.h | 33 +- framework/decode/vulkan_object_info.h | 170 ++++- .../decode/vulkan_replay_consumer_base.cpp | 112 ++- .../decode/vulkan_replay_consumer_base.h | 116 ++- framework/decode/vulkan_replay_options.h | 2 + framework/encode/api_capture_manager.h | 16 +- framework/encode/capture_manager.cpp | 228 +++++- framework/encode/capture_manager.h | 29 +- framework/encode/capture_settings.cpp | 15 + framework/encode/capture_settings.h | 1 + framework/encode/custom_layer_func_table.h | 5 +- .../custom_vulkan_api_call_encoders.cpp | 19 + .../encode/custom_vulkan_api_call_encoders.h | 6 +- framework/encode/vulkan_capture_manager.cpp | 27 +- framework/encode/vulkan_capture_manager.h | 17 +- framework/encode/vulkan_handle_wrapper_util.h | 35 +- framework/encode/vulkan_handle_wrappers.h | 147 +++- framework/encode/vulkan_state_tracker.cpp | 12 + framework/encode/vulkan_state_writer.cpp | 22 + .../generated_vulkan_api_call_encoders.cpp | 621 ++++++++++++++++ .../generated_vulkan_replay_consumer.cpp | 701 ++++++++++++++++++ .../generated_vulkan_replay_consumer.h | 2 +- ...vulkan_api_call_encoders_body_generator.py | 4 +- .../vulkan_replay_consumer_body_generator.py | 72 +- layer/trace_layer.cpp | 1 + tools/convert/main.cpp | 69 +- tools/replay/android_main.cpp | 48 +- tools/replay/replay_settings.h | 2 +- tools/tool_settings.h | 4 + 33 files changed, 2385 insertions(+), 191 deletions(-) diff --git a/android/scripts/gfxrecon.py b/android/scripts/gfxrecon.py index 6b2084f3dc..82b4cec3e4 100644 --- a/android/scripts/gfxrecon.py +++ b/android/scripts/gfxrecon.py @@ -114,6 +114,7 @@ def CreateReplayParser(): parser.add_argument('--pbi-all', action='store_true', default=False, help='Print all block information.') parser.add_argument('--pbis', metavar='RANGES', default=False, help='Print block information between block index1 and block index2') parser.add_argument('--pcj', '--pipeline-creation-jobs', action='store_true', default=False, help='Specify the number of pipeline-creation-jobs or background-threads.') + parser.add_argument('--reuse-asset-file', metavar='REUSE_ASSET_FILE', help='') return parser def MakeExtrasString(args): @@ -282,6 +283,10 @@ def MakeExtrasString(args): arg_list.append('--pcj') arg_list.append('{}'.format(args.pcj)) + if args.reuse_asset_file: + arg_list.append('--reuse-asset-file') + arg_list.append('{}'.format(args.reuse_asset_file)) + if args.file: arg_list.append(args.file) elif not args.version: diff --git a/framework/decode/asset_file_consumer.cpp b/framework/decode/asset_file_consumer.cpp index 31479d4250..9d7fb5b07f 100644 --- a/framework/decode/asset_file_consumer.cpp +++ b/framework/decode/asset_file_consumer.cpp @@ -68,7 +68,7 @@ void AssetFileConsumer::ProcessInitBufferCommand(format::HandleId device_id, format::FrameAssetFileOffsets& frame_offsets = asset_file_offsets_[current_frame_]; frame_offsets[buffer_id] = block_header_file_offset_; fprintf(debug_, "buffer %" PRIu64 " -> %" PRId64 "\n", buffer_id, block_header_file_offset_); - fsync(fileno(debug_)); + // fsync(fileno(debug_)); if (buffer_id > greatest_id_) { @@ -94,7 +94,7 @@ void AssetFileConsumer::ProcessInitImageCommand(format::HandleId dev format::FrameAssetFileOffsets& frame_offsets = asset_file_offsets_[current_frame_]; frame_offsets[image_id] = block_header_file_offset_; fprintf(debug_, "image %" PRIu64 " -> %" PRId64 "\n", image_id, block_header_file_offset_); - fsync(fileno(debug_)); + // fsync(fileno(debug_)); if (image_id > greatest_id_) { @@ -120,9 +120,9 @@ void AssetFileConsumer::Process_vkAllocateDescriptorSets( const format::HandleId desc_id = pDescriptorSets->GetPointer()[0]; format::FrameAssetFileOffsets& frame_offsets = asset_file_offsets_[current_frame_]; - frame_offsets[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_)); + // fsync(fileno(debug_)); if (desc_id > greatest_id_) { @@ -151,7 +151,7 @@ void AssetFileConsumer::Process_vkUpdateDescriptorSets( if (new_entry.second) { fprintf(debug_, "%" PRIu64 " -> %" PRId64 "\n", desc_id, block_header_file_offset_); - fsync(fileno(debug_)); + // fsync(fileno(debug_)); } if (desc_id > greatest_id_) diff --git a/framework/decode/asset_file_consumer.h b/framework/decode/asset_file_consumer.h index 9bf8e5531c..d54342acdb 100644 --- a/framework/decode/asset_file_consumer.h +++ b/framework/decode/asset_file_consumer.h @@ -42,12 +42,24 @@ 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); } } + ~AssetFileConsumer() + { + if (debug_) + { + util::platform::FileClose(debug_); + } + } + virtual void ProcessFrameBeginMarker(uint64_t frame_number) override; virtual void ProcessInitBufferCommand(format::HandleId device_id, @@ -78,7 +90,17 @@ class AssetFileConsumer : public VulkanConsumer uint32_t descriptorCopyCount, StructPointerDecoder* pDescriptorCopies) override; - const format::AssetFileOffsets* GetFrameAssetFileOffsets() { return &asset_file_offsets_; } + format::AssetFileOffsets GetFrameAssetFileOffsets() const + { + GFXRECON_WRITE_CONSOLE("%s()", __func__) + GFXRECON_WRITE_CONSOLE(" exporting %zu", asset_file_offsets_.size()) + for (const auto frame : asset_file_offsets_) + { + GFXRECON_WRITE_CONSOLE(" ... %zu", frame.second.size()) + } + + return asset_file_offsets_; + } format::HandleId GetGreatestId() const { return greatest_id_; } diff --git a/framework/decode/replay_options.h b/framework/decode/replay_options.h index fa741af611..c0f08a89e1 100644 --- a/framework/decode/replay_options.h +++ b/framework/decode/replay_options.h @@ -61,6 +61,7 @@ struct ReplayOptions int64_t block_index_from{ -1 }; int64_t block_index_to{ -1 }; int32_t num_pipeline_creation_jobs{ 0 }; + bool reuse_asset_file{ true }; }; GFXRECON_END_NAMESPACE(decode) diff --git a/framework/decode/vulkan_handle_mapping_util.h b/framework/decode/vulkan_handle_mapping_util.h index ff9429fdad..aaacf55127 100644 --- a/framework/decode/vulkan_handle_mapping_util.h +++ b/framework/decode/vulkan_handle_mapping_util.h @@ -29,7 +29,10 @@ #include "util/defines.h" #include "util/logging.h" +#include + #include "vulkan/vulkan.h" +#include "vulkan/vulkan_core.h" #include @@ -128,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); @@ -143,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); @@ -162,7 +165,7 @@ static void AddHandleArray(format::HandleId parent_id, size_t handles_len, std::vector&& initial_infos, VulkanObjectInfoTable* object_info_table, - void (VulkanObjectInfoTable::*AddFunc)(T&&)) + void (VulkanObjectInfoTable::*AddFunc)(T&&)) { assert(object_info_table != nullptr); @@ -190,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); @@ -213,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> future) { static_assert(has_handle_future_v, "handle-type does not support asynchronous creation"); @@ -240,7 +243,7 @@ static void AddHandleArrayAsync(format::HandleId parent_id, size_t ids_len, VulkanObjectInfoTable* object_info_table, std::vector&& initial_infos, - void (VulkanObjectInfoTable::*AddFunc)(T&&), + void (VulkanObjectInfoTable::*AddFunc)(T&&), std::shared_future> future) { static_assert(has_handle_future_v, "handle-type does not support asynchronous creation"); @@ -272,8 +275,8 @@ static void AddHandleArray(format::HandleId parent_id, size_t handles_len, std::vector&& 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); @@ -315,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); @@ -349,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); @@ -363,9 +366,9 @@ inline void RemoveHandle(format::HandleId id, template 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); @@ -386,7 +389,7 @@ template void RemoveHandleArray(format::HandleId pool_id, const HandlePointerDecoder* 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)); diff --git a/framework/decode/vulkan_object_info.h b/framework/decode/vulkan_object_info.h index f434945fd9..eeb2431413 100644 --- a/framework/decode/vulkan_object_info.h +++ b/framework/decode/vulkan_object_info.h @@ -34,6 +34,7 @@ #include "util/defines.h" #include "vulkan/vulkan.h" +#include "vulkan/vulkan_core.h" #include #include @@ -172,6 +173,10 @@ struct VulkanObjectInfo { typedef T HandleType; + VulkanObjectInfo(VkObjectType type) : vk_object_type(type) {} + + VkObjectType vk_object_type; + // Standard info stored for all Vulkan objects. HandleType handle{ VK_NULL_HANDLE }; // Handle created for the object during replay. format::HandleId capture_id{ format::kNullHandleId }; // ID assigned to the object at capture. @@ -188,6 +193,8 @@ struct handle_create_result_t template struct VulkanObjectInfoAsync : public VulkanObjectInfo { + VulkanObjectInfoAsync(VkObjectType type) : VulkanObjectInfo(type) {} + // track asynchronous compilation status std::shared_future> future; uint32_t future_handle_index = 0; @@ -197,6 +204,8 @@ struct VulkanObjectInfoAsync : public VulkanObjectInfo template struct VulkanPoolInfo : public VulkanObjectInfo { + VulkanPoolInfo(VkObjectType type) : VulkanObjectInfo(type) {} + std::unordered_set child_ids; // IDs of objects allocated from the pool. }; @@ -204,6 +213,8 @@ struct VulkanPoolInfo : public VulkanObjectInfo template struct VulkanPoolObjectInfo : public VulkanObjectInfo { + VulkanPoolObjectInfo(VkObjectType type) : VulkanObjectInfo(type) {} + format::HandleId pool_id{ format::kNullHandleId }; // ID of the pool that the object was allocated from. }; @@ -211,23 +222,90 @@ struct VulkanPoolObjectInfo : public VulkanObjectInfo // Declarations for Vulkan objects without additional replay state info. // -typedef VulkanObjectInfo EventInfo; -typedef VulkanObjectInfo QueryPoolInfo; -typedef VulkanObjectInfo PipelineLayoutInfo; -typedef VulkanObjectInfo PrivateDataSlotInfo; -typedef VulkanObjectInfo SamplerInfo; -typedef VulkanPoolInfo CommandPoolInfo; -typedef VulkanObjectInfo SamplerYcbcrConversionInfo; -typedef VulkanObjectInfo DisplayModeKHRInfo; -typedef VulkanObjectInfo DebugReportCallbackEXTInfo; -typedef VulkanObjectInfo IndirectCommandsLayoutNVInfo; -typedef VulkanObjectInfo DebugUtilsMessengerEXTInfo; -typedef VulkanObjectInfo AccelerationStructureKHRInfo; -typedef VulkanObjectInfo AccelerationStructureNVInfo; -typedef VulkanObjectInfo PerformanceConfigurationINTELInfo; -typedef VulkanObjectInfo MicromapEXTInfo; -typedef VulkanObjectInfo OpticalFlowSessionNVInfo; -typedef VulkanObjectInfo VideoSessionParametersKHRInfo; +struct EventInfo : public VulkanObjectInfo +{ + EventInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_EVENT) {} +}; + +struct QueryPoolInfo : public VulkanObjectInfo +{ + QueryPoolInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_QUERY_POOL) {} +}; + +struct PipelineLayoutInfo : public VulkanObjectInfo +{ + PipelineLayoutInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_PIPELINE_LAYOUT) {} +}; + +struct PrivateDataSlotInfo : public VulkanObjectInfo +{ + PrivateDataSlotInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_PRIVATE_DATA_SLOT) {} +}; + +struct SamplerInfo : public VulkanObjectInfo +{ + SamplerInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_SAMPLER) {} +}; + +struct CommandPoolInfo : public VulkanPoolInfo +{ + CommandPoolInfo() : VulkanPoolInfo(VK_OBJECT_TYPE_COMMAND_POOL) {} +}; + +struct SamplerYcbcrConversionInfo : public VulkanObjectInfo +{ + SamplerYcbcrConversionInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION) {} +}; + +struct DisplayModeKHRInfo : public VulkanObjectInfo +{ + DisplayModeKHRInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_DISPLAY_MODE_KHR) {} +}; + +struct DebugReportCallbackEXTInfo : public VulkanObjectInfo +{ + DebugReportCallbackEXTInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT) {} +}; + +struct IndirectCommandsLayoutNVInfo : public VulkanObjectInfo +{ + IndirectCommandsLayoutNVInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV) {} +}; + +struct DebugUtilsMessengerEXTInfo : public VulkanObjectInfo +{ + DebugUtilsMessengerEXTInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT) {} +}; + +struct AccelerationStructureKHRInfo : public VulkanObjectInfo +{ + AccelerationStructureKHRInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR) {} +}; + +struct AccelerationStructureNVInfo : public VulkanObjectInfo +{ + AccelerationStructureNVInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV) {} +}; + +struct PerformanceConfigurationINTELInfo : public VulkanObjectInfo +{ + PerformanceConfigurationINTELInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL) {} +}; + +struct MicromapEXTInfo : public VulkanObjectInfo +{ + MicromapEXTInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_MICROMAP_EXT) {} +}; + +struct OpticalFlowSessionNVInfo : public VulkanObjectInfo +{ + OpticalFlowSessionNVInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_OPTICAL_FLOW_SESSION_NV) {} +}; + +struct VideoSessionParametersKHRInfo : public VulkanObjectInfo +{ + VideoSessionParametersKHRInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_VIDEO_SESSION_PARAMETERS_KHR) {} +}; // // Declarations for Vulkan objects with additional replay state info. @@ -235,6 +313,8 @@ typedef VulkanObjectInfo VideoSessionParameters struct InstanceInfo : public VulkanObjectInfo { + InstanceInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_INSTANCE) {} + uint32_t api_version{ VK_MAKE_VERSION(1, 0, 0) }; std::vector enabled_extensions; std::unordered_map array_counts; @@ -249,6 +329,8 @@ struct InstanceInfo : public VulkanObjectInfo struct PhysicalDeviceInfo : public VulkanObjectInfo { + PhysicalDeviceInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_PHYSICAL_DEVICE) {} + VkInstance parent{ VK_NULL_HANDLE }; uint32_t parent_api_version{ 0 }; std::vector parent_enabled_extensions; @@ -276,6 +358,8 @@ struct PhysicalDeviceInfo : public VulkanObjectInfo struct DeviceInfo : public VulkanObjectInfo { + DeviceInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_DEVICE) {} + VkPhysicalDevice parent{ VK_NULL_HANDLE }; std::unique_ptr allocator; std::unordered_map array_counts; @@ -300,6 +384,8 @@ struct DeviceInfo : public VulkanObjectInfo struct QueueInfo : public VulkanObjectInfo { + QueueInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_QUEUE) {} + std::unordered_map array_counts; uint32_t family_index; uint32_t queue_index; @@ -307,6 +393,8 @@ struct QueueInfo : public VulkanObjectInfo struct SemaphoreInfo : public VulkanObjectInfo { + SemaphoreInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_SEMAPHORE) {} + bool is_external{ false }; // If a null-swapchain/surface interacts with a semaphore, replay needs to shadow signal it until a future call @@ -322,6 +410,8 @@ struct SemaphoreInfo : public VulkanObjectInfo struct FenceInfo : public VulkanObjectInfo { + FenceInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_FENCE) {} + // If a null-swapchain/surface interacts with a fence, replay needs to to shadow signal it until a future call waits // on it. bool shadow_signaled{ false }; @@ -329,12 +419,16 @@ struct FenceInfo : public VulkanObjectInfo struct DeviceMemoryInfo : public VulkanObjectInfo { + DeviceMemoryInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_DEVICE_MEMORY) {} + VulkanResourceAllocator* allocator{ nullptr }; VulkanResourceAllocator::MemoryData allocator_data{ 0 }; }; struct BufferInfo : public VulkanObjectInfo { + BufferInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_BUFFER) {} + // The following values are only used for memory portability. VulkanResourceAllocator::ResourceData allocator_data{ 0 }; @@ -348,11 +442,15 @@ struct BufferInfo : public VulkanObjectInfo struct BufferViewInfo : public VulkanObjectInfo { + BufferViewInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_BUFFER_VIEW) {} + format::HandleId buffer_id{ format::kNullHandleId }; }; struct ImageInfo : public VulkanObjectInfo { + ImageInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_IMAGE) {} + std::unordered_map array_counts; bool is_swapchain_image{ false }; @@ -389,6 +487,8 @@ typedef struct PipelineCacheData struct PipelineCacheInfo : public VulkanObjectInfo { + PipelineCacheInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_PIPELINE_CACHE) {} + std::unordered_map array_counts; // hash id of capture time pipeline cache data to capture and replay time pipeline cache data map; @@ -420,8 +520,8 @@ struct ShaderModuleInfo : public VulkanObjectInfo bool is_array; }; - ShaderModuleInfo() = default; - ShaderModuleInfo(const ShaderModuleInfo& other) + ShaderModuleInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_SHADER_MODULE) {} + ShaderModuleInfo(const ShaderModuleInfo& other) : VulkanObjectInfo(VK_OBJECT_TYPE_SHADER_MODULE) { handle = other.handle; parent_id = other.parent_id; @@ -440,6 +540,8 @@ struct ShaderModuleInfo : public VulkanObjectInfo struct PipelineInfo : public VulkanObjectInfoAsync { + PipelineInfo() : VulkanObjectInfoAsync(VK_OBJECT_TYPE_PIPELINE) {} + std::unordered_map array_counts; // The following information is populated and used only when the @@ -479,6 +581,8 @@ struct PipelineInfo : public VulkanObjectInfoAsync struct DescriptorPoolInfo : public VulkanPoolInfo { + DescriptorPoolInfo() : VulkanPoolInfo(VK_OBJECT_TYPE_DESCRIPTOR_POOL) {} + VkDescriptorPoolCreateFlags flags{}; uint32_t max_sets{ 0 }; uint32_t max_inline_uniform_block_bindings{ 0 }; // For VK_EXT_inline_uniform_block. @@ -488,17 +592,23 @@ struct DescriptorPoolInfo : public VulkanPoolInfo struct DescriptorUpdateTemplateInfo : public VulkanObjectInfo { + DescriptorUpdateTemplateInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE) {} + std::vector descriptor_image_types; std::vector entries; }; struct DisplayKHRInfo : public VulkanObjectInfo { + DisplayKHRInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_DISPLAY_KHR) {} + std::unordered_map array_counts; }; struct SurfaceKHRInfo : public VulkanObjectInfo { + SurfaceKHRInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_SURFACE_KHR) {} + Window* window{ nullptr }; std::unordered_map array_counts; bool surface_creation_skipped{ false }; @@ -508,6 +618,8 @@ struct SurfaceKHRInfo : public VulkanObjectInfo struct SwapchainKHRInfo : public VulkanObjectInfo { + SwapchainKHRInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_SWAPCHAIN_KHR) {} + VkSurfaceKHR surface{ VK_NULL_HANDLE }; format::HandleId surface_id{ format::kNullHandleId }; DeviceInfo* device_info{ nullptr }; @@ -545,16 +657,22 @@ struct SwapchainKHRInfo : public VulkanObjectInfo struct ValidationCacheEXTInfo : public VulkanObjectInfo { + ValidationCacheEXTInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_VALIDATION_CACHE_EXT) {} + std::unordered_map array_counts; }; struct ImageViewInfo : public VulkanObjectInfo { + ImageViewInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_IMAGE_VIEW) {} + format::HandleId image_id{ format::kNullHandleId }; }; struct FramebufferInfo : public VulkanObjectInfo { + FramebufferInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_FRAMEBUFFER) {} + VkFramebufferCreateFlags framebuffer_flags{ 0 }; std::unordered_map array_counts; std::vector attachment_image_view_ids; @@ -562,6 +680,8 @@ struct FramebufferInfo : public VulkanObjectInfo struct DeferredOperationKHRInfo : public VulkanObjectInfo { + DeferredOperationKHRInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR) {} + bool pending_state{ false }; // Record CreateRayTracingPipelinesKHR parameters for safety. @@ -573,6 +693,8 @@ struct DeferredOperationKHRInfo : public VulkanObjectInfo { + VideoSessionKHRInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_VIDEO_SESSION_KHR) {} + std::unordered_map array_counts; // The following values are only used for memory portability. @@ -586,11 +708,15 @@ struct VideoSessionKHRInfo : VulkanObjectInfo struct ShaderEXTInfo : VulkanObjectInfoAsync { + ShaderEXTInfo() : VulkanObjectInfoAsync(VK_OBJECT_TYPE_SHADER_EXT) {} + std::unordered_map array_counts; }; struct CommandBufferInfo : public VulkanPoolObjectInfo { + CommandBufferInfo() : VulkanPoolObjectInfo(VK_OBJECT_TYPE_COMMAND_BUFFER) {} + bool is_frame_boundary{ false }; std::vector frame_buffer_ids; std::unordered_map image_layout_barriers; @@ -598,6 +724,8 @@ struct CommandBufferInfo : public VulkanPoolObjectInfo struct RenderPassInfo : public VulkanObjectInfo { + RenderPassInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_RENDER_PASS) {} + std::vector attachment_description_final_layouts; std::vector attachment_descs; @@ -622,6 +750,8 @@ struct RenderPassInfo : public VulkanObjectInfo struct DescriptorSetLayoutInfo : public VulkanObjectInfo { + DescriptorSetLayoutInfo() : VulkanObjectInfo(VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT) {} + struct DescriptorBindingLayout { VkDescriptorType type; @@ -656,6 +786,8 @@ struct DescriptorSetBindingInfo struct DescriptorSetInfo : public VulkanPoolObjectInfo { + DescriptorSetInfo() : VulkanPoolObjectInfo(VK_OBJECT_TYPE_DESCRIPTOR_SET) {} + // One entry per binding using DescriptorBindingsInfo = std::unordered_map; DescriptorBindingsInfo descriptors; diff --git a/framework/decode/vulkan_replay_consumer_base.cpp b/framework/decode/vulkan_replay_consumer_base.cpp index a15a43b795..bcc60de2fa 100644 --- a/framework/decode/vulkan_replay_consumer_base.cpp +++ b/framework/decode/vulkan_replay_consumer_base.cpp @@ -22,6 +22,8 @@ ** DEALINGS IN THE SOFTWARE. */ +#include "decode/asset_file_consumer.h" +#include "generated/generated_vulkan_decoder.h" #include "decode/vulkan_replay_consumer_base.h" #include "decode/custom_vulkan_struct_handle_mappers.h" #include "decode/descriptor_update_template_decoder.h" @@ -169,12 +171,16 @@ static uint32_t GetHardwareBufferFormatBpp(uint32_t format) #endif VulkanReplayConsumerBase::VulkanReplayConsumerBase(std::shared_ptr application, - const VulkanReplayOptions& options) : + const VulkanReplayOptions& options, + const gfxrecon::format::AssetFileOffsets* asset_file_offsets) : resource_dumper(options, object_info_table_), loader_handle_(nullptr), get_instance_proc_addr_(nullptr), create_instance_proc_(nullptr), application_(application), options_(options), loading_trim_state_(false), replaying_trimmed_capture_(false), - have_imported_semaphores_(false), fps_info_(nullptr), omitted_pipeline_cache_data_(false) + have_imported_semaphores_(false), fps_info_(nullptr), omitted_pipeline_cache_data_(false), + asset_file_offsets_(asset_file_offsets) { + GFXRECON_WRITE_CONSOLE("%s()", __func__) + assert(application_ != nullptr); assert(options.create_resource_allocator != nullptr); @@ -280,6 +286,9 @@ void VulkanReplayConsumerBase::ProcessStateBeginMarker(uint64_t frame_number) // If a trace file has the state begin marker, it must be a trim trace file. replaying_trimmed_capture_ = true; + + GFXRECON_WRITE_CONSOLE("%s() current_frame_: %" PRIu64, __func__, current_frame_) + GFXRECON_WRITE_CONSOLE("%s() frame_number: %" PRIu64, __func__, frame_number) } void VulkanReplayConsumerBase::ProcessStateEndMarker(uint64_t frame_number) @@ -290,6 +299,9 @@ void VulkanReplayConsumerBase::ProcessStateEndMarker(uint64_t frame_number) { fps_info_->ProcessStateEndMarker(frame_number); } + + current_frame_ = frame_number + 1; + GFXRECON_WRITE_CONSOLE("%s() current_frame_: %" PRIu64, __func__, current_frame_) } void VulkanReplayConsumerBase::ProcessDisplayMessageCommand(const std::string& message) @@ -1050,6 +1062,35 @@ void VulkanReplayConsumerBase::InitializeLoader() } } +// void VulkanReplayConsumerBase::InitializeCaptureLayerCustomFuncs() +// { +// const std::vector capture_layer_filename = { +// #if defined(WIN32) +// "libVkLayer_gfxreconstruct.dll" +// #elif defined(__APPLE__) +// "libVkLayer_gfxreconstruct.dylib" +// #else +// "libVkLayer_gfxreconstruct.so" +// #endif +// }; + +// util::platform::LibraryHandle capture_layer_handle = util::platform::OpenLibrary(capture_layer_filename); + +// if (capture_layer_handle == nullptr) +// { +// GFXRECON_LOG_WARNING("Failed to load GFXR capture layer. Layer's custom functions will not be available"); +// return; +// } + +// override_capture_obj_id_fp = reinterpret_cast( +// util::platform::GetProcAddress(capture_layer_handle, "OverrideIdForNextVulkanObjectGFXR")); + +// if (override_capture_obj_id_fp != nullptr) +// { +// GFXRECON_LOG_WARNING("Failed getting address of \"OverrideIdForNextVulkanObjectGFXR\" from capture layer"); +// } +// } + void VulkanReplayConsumerBase::AddInstanceTable(VkInstance instance) { encode::VulkanDispatchKey dispatch_key = encode::GetVulkanDispatchKey(instance); @@ -2307,6 +2348,23 @@ VulkanReplayConsumerBase::OverrideCreateInstance(VkResult original_result, InitializeLoader(); } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + if (replay_create_info->pApplicationInfo->pApplicationName) + { + GFXRECON_WRITE_CONSOLE(" replay_create_info->pApplicationInfo->pApplicationName: %s", + replay_create_info->pApplicationInfo->pApplicationName) + } + if (replay_create_info->pApplicationInfo->pEngineName) + { + GFXRECON_WRITE_CONSOLE(" replay_create_info->pApplicationInfo->pEngineName: %s", + replay_create_info->pApplicationInfo->pEngineName) + } + + // if (override_capture_obj_id_fp == nullptr) + // { + // InitializeCaptureLayerCustomFuncs(); + // } + std::vector modified_layers; std::vector modified_extensions; VkInstanceCreateInfo modified_create_info = (*replay_create_info); @@ -2504,6 +2562,50 @@ VulkanReplayConsumerBase::OverrideCreateInstance(VkResult original_result, modified_create_info.ppEnabledExtensionNames + modified_create_info.enabledExtensionCount); } + + // Reuse asset file + if (!options_.reuse_asset_file.empty()) + { + auto instance_table = GetInstanceTable(*replay_instance); + override_capture_obj_id_fp_ = reinterpret_cast( + instance_table->GetInstanceProcAddr(*replay_instance, "OverrideIdForNextVulkanObjectGFXR")); + + if (override_capture_obj_id_fp_ == nullptr) + { + GFXRECON_LOG_WARNING("Failed to discover OverrideIdForNextVulkanObjectGFXR()"); + } + else + { + GFXRECON_WRITE_CONSOLE("override_capture_obj_id_fp: %p: ", override_capture_obj_id_fp_) + } + + load_asset_file_offsets_fp_ = reinterpret_cast( + instance_table->GetInstanceProcAddr(*replay_instance, "LoadAssetFileOffsetsGFXR")); + if (load_asset_file_offsets_fp_ == nullptr) + { + GFXRECON_LOG_WARNING("Failed to discover LoadAssetFileOffsetsGFXR()"); + } + else + { + GFXRECON_WRITE_CONSOLE("load_asset_file_offsets_fp: %p: ", override_capture_obj_id_fp_) + } + + set_unique_id_offset_fp_ = reinterpret_cast( + instance_table->GetInstanceProcAddr(*replay_instance, "SetUniqueIdOffsetGFXR")); + if (set_unique_id_offset_fp_ == nullptr) + { + GFXRECON_LOG_WARNING("Failed to discover SetUniqueIdOffsetGFXR()"); + } + else + { + GFXRECON_WRITE_CONSOLE("set_unique_id_offset_fp: %p: ", override_capture_obj_id_fp_) + } + + if (load_asset_file_offsets_fp_ != nullptr && asset_file_offsets_ != nullptr) + { + load_asset_file_offsets_fp_(*asset_file_offsets_); + } + } } return result; @@ -4230,9 +4332,9 @@ VkResult VulkanReplayConsumerBase::OverrideAllocateMemory( VkMemoryAllocateInfo modified_allocate_info = (*replay_allocate_info); VkMemoryOpaqueCaptureAddressAllocateInfo address_info = { - VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO, - modified_allocate_info.pNext, - opaque_address + VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO, + modified_allocate_info.pNext, + opaque_address }; modified_allocate_info.pNext = &address_info; diff --git a/framework/decode/vulkan_replay_consumer_base.h b/framework/decode/vulkan_replay_consumer_base.h index 7cefaa6bc7..a4af0cd39f 100644 --- a/framework/decode/vulkan_replay_consumer_base.h +++ b/framework/decode/vulkan_replay_consumer_base.h @@ -38,6 +38,7 @@ #include "decode/vulkan_resource_initializer.h" #include "decode/vulkan_swapchain.h" #include "format/api_call_id.h" +#include "format/format.h" #include "format/platform_types.h" #include "generated/generated_vulkan_dispatch_table.h" #include "generated/generated_vulkan_consumer.h" @@ -47,9 +48,13 @@ #include "util/logging.h" #include "util/threadpool.h" +#include +#include + #include "application/application.h" #include "vulkan/vulkan.h" +#include "vulkan/vulkan_core.h" #include #include @@ -71,7 +76,9 @@ GFXRECON_BEGIN_NAMESPACE(decode) class VulkanReplayConsumerBase : public VulkanConsumer { public: - VulkanReplayConsumerBase(std::shared_ptr application, const VulkanReplayOptions& options); + VulkanReplayConsumerBase(std::shared_ptr application, + const VulkanReplayOptions& options, + const gfxrecon::format::AssetFileOffsets* asset_file_offsets = nullptr); ~VulkanReplayConsumerBase() override; @@ -235,7 +242,7 @@ class VulkanReplayConsumerBase : public VulkanConsumer template 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); } @@ -276,7 +283,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)) { @@ -289,7 +296,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)) { @@ -297,6 +304,14 @@ class VulkanReplayConsumerBase : public VulkanConsumer } } + void ForwardIdToCaptureLayer(const format::HandleId* id, VkObjectType type) + { + if (override_capture_obj_id_fp_ != nullptr && id != nullptr) + { + override_capture_obj_id_fp_(*id, type); + } + } + template void AddHandles(format::HandleId parent_id, const format::HandleId* ids, @@ -304,7 +319,7 @@ class VulkanReplayConsumerBase : public VulkanConsumer const typename T::HandleType* handles, size_t handles_len, std::vector&& 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); @@ -316,16 +331,52 @@ 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); } + template + void ForwardIdsToCaptureLayer(const format::HandleId* ids, + size_t ids_len, + const typename T::HandleType* handles, + size_t handles_len, + VkObjectType type) + { + // GFXRECON_WRITE_CONSOLE("%s()", __func__) + + // GFXRECON_WRITE_CONSOLE("GFXRECON_WRITE_CONSOLE: %p", ids); + // GFXRECON_WRITE_CONSOLE("GFXRECON_WRITE_CONSOLE: %zu", ids_len); + // GFXRECON_WRITE_CONSOLE("GFXRECON_WRITE_CONSOLE: %p", handles); + // GFXRECON_WRITE_CONSOLE("GFXRECON_WRITE_CONSOLE: %zu", handles_len); + // GFXRECON_WRITE_CONSOLE("GFXRECON_WRITE_CONSOLE: %u", type); + + if (override_capture_obj_id_fp_ != nullptr && ids != nullptr && handles != nullptr) + { + size_t len = std::min(ids_len, handles_len); + for (size_t i = 0; i < len; ++i) + { + override_capture_obj_id_fp_(ids[i], type); + } + } + } + + void ForwardIdsToCaptureLayer(const format::HandleId* ids, size_t ids_len, VkObjectType type) + { + if (override_capture_obj_id_fp_ != nullptr && ids != nullptr) + { + for (size_t i = 0; i < ids_len; ++i) + { + override_capture_obj_id_fp_(ids[i], type); + } + } + } + template void AddHandlesAsync(format::HandleId parent_id, const format::HandleId* ids, size_t ids_len, - void (VulkanObjectInfoTable::*AddFunc)(T&&), + void (VulkanObjectInfoTable::*AddFunc)(T&&), std::function()> create_function) { if (create_function) @@ -346,7 +397,7 @@ class VulkanReplayConsumerBase : public VulkanConsumer const format::HandleId* ids, size_t ids_len, std::vector&& initial_infos, - void (VulkanObjectInfoTable::*AddFunc)(T&&), + void (VulkanObjectInfoTable::*AddFunc)(T&&), std::function()> create_function) { if (create_function) @@ -367,6 +418,17 @@ class VulkanReplayConsumerBase : public VulkanConsumer } } + void ForwardAsyncIdsToCaptureLayer(const format::HandleId* ids, size_t ids_len, VkObjectType type) + { + if (override_capture_obj_id_fp_ != nullptr && ids != nullptr) + { + for (size_t i = 0; i < ids_len; ++i) + { + override_capture_obj_id_fp_(ids[i], type); + } + } + } + //! track arbitrary handles that are currently used by asynchronous operations void TrackAsyncHandles(const std::unordered_set& async_handles, const std::function& sync_fn); @@ -395,8 +457,8 @@ class VulkanReplayConsumerBase : public VulkanConsumer const typename T::HandleType* handles, size_t handles_len, std::vector&& 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, @@ -417,11 +479,19 @@ 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, ids, ids_len, handles, handles_len, &object_info_table_, GetPoolInfoFunc, AddFunc); + handle_mapping::AddHandleArray(parent_id, + pool_id, + ids, + ids_len, + handles, + handles_len, + &object_info_table_, + GetPoolInfoFunc, + AddFunc, + override_capture_obj_id_fp_); } void RemoveHandle(format::HandleId id, void (VulkanObjectInfoTable::*RemoveFunc)(format::HandleId)) @@ -431,9 +501,9 @@ class VulkanReplayConsumerBase : public VulkanConsumer template 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); } @@ -442,7 +512,7 @@ class VulkanReplayConsumerBase : public VulkanConsumer void RemovePoolHandles(format::HandleId pool_id, const HandlePointerDecoder* 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. @@ -461,7 +531,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) @@ -1274,6 +1344,8 @@ class VulkanReplayConsumerBase : public VulkanConsumer void InitializeLoader(); + // void InitializeCaptureLayerCustomFuncs(); + void AddInstanceTable(VkInstance instance); void AddDeviceTable(VkDevice device, PFN_vkGetDeviceProcAddr gpa); @@ -1502,6 +1574,12 @@ class VulkanReplayConsumerBase : public VulkanConsumer void* capture_pipeline_cache_data_; bool matched_replay_cache_data_exist_ = false; std::vector matched_replay_cache_data_; + format::FrameNumber current_frame_ = 1; + + const gfxrecon::format::AssetFileOffsets* asset_file_offsets_ = nullptr; + encode::OverrideCaptureObjectIdFuncPtr override_capture_obj_id_fp_ = nullptr; + encode::LoadAssetFileOffsetsGFXRPtr load_asset_file_offsets_fp_ = nullptr; + encode::SetUniqueIdOffsetGFXRPtr set_unique_id_offset_fp_ = nullptr; }; GFXRECON_END_NAMESPACE(decode) diff --git a/framework/decode/vulkan_replay_options.h b/framework/decode/vulkan_replay_options.h index 93a281e0ab..ce151c05ee 100644 --- a/framework/decode/vulkan_replay_options.h +++ b/framework/decode/vulkan_replay_options.h @@ -101,6 +101,8 @@ struct VulkanReplayOptions : public ReplayOptions bool dump_resources_dump_all_image_subresources{ false }; bool preload_measurement_range{ false }; + + std::string reuse_asset_file; }; GFXRECON_END_NAMESPACE(decode) diff --git a/framework/encode/api_capture_manager.h b/framework/encode/api_capture_manager.h index 8bdd0a002a..ccf8b1e8a2 100644 --- a/framework/encode/api_capture_manager.h +++ b/framework/encode/api_capture_manager.h @@ -26,6 +26,8 @@ #define GFXRECON_ENCODE_API_CAPTURE_MANAGER_H #include "encode/capture_manager.h" +#include "format/format.h" +#include "vulkan/vulkan_core.h" GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(encode) @@ -37,7 +39,7 @@ class ApiCaptureManager void SetCommonManager(CommonCaptureManager* common_manager) { common_manager_ = common_manager; } // Forwarded Statics - static format::HandleId GetUniqueId() { return CommonCaptureManager::GetUniqueId(); } + static format::HandleId GetUniqueId(VkObjectType type) { return CommonCaptureManager::GetUniqueId(type); } static auto AcquireSharedApiCallLock() { return std::move(CommonCaptureManager::AcquireSharedApiCallLock()); } static auto AcquireExclusiveApiCallLock() { return std::move(CommonCaptureManager::AcquireExclusiveApiCallLock()); } @@ -197,6 +199,18 @@ class ApiCaptureManager common_manager_->CombineAndWriteToFile(buffers); } + void SetUniqueIdOffset(format::HandleId id) + { + assert(common_manager_ != nullptr); + common_manager_->SetUniqueIdOffset(id); + } + + void OverrideIdForNextVulkanObject(format::HandleId id, VkObjectType type) + { + assert(common_manager_ != nullptr); + common_manager_->OverrideIdForNextVulkanObject(id, type); + } + CommonCaptureManager::ThreadData* GetThreadData() { return common_manager_->GetThreadData(); } util::Compressor* GetCompressor() { return common_manager_->GetCompressor(); } std::mutex& GetMappedMemoryLock() { return common_manager_->GetMappedMemoryLock(); } diff --git a/framework/encode/capture_manager.cpp b/framework/encode/capture_manager.cpp index 45adae0fce..b1dc4ed33e 100644 --- a/framework/encode/capture_manager.cpp +++ b/framework/encode/capture_manager.cpp @@ -24,6 +24,9 @@ #include "encode/capture_settings.h" #include "format/format.h" +#include "vulkan/vulkan_core.h" +#include +#include #include #include PROJECT_VERSION_HEADER_FILE @@ -41,6 +44,10 @@ #include "util/page_guard_manager.h" #include "util/platform.h" +#include "decode/file_processor.h" +#include "decode/asset_file_consumer.h" +#include "generated/generated_vulkan_decoder.h" + #include #include #include @@ -65,7 +72,8 @@ std::mutex CommonCaptureMana thread_local std::unique_ptr CommonCaptureManager::thread_data_; CommonCaptureManager::ApiCallMutexT CommonCaptureManager::api_call_mutex_; -std::atomic CommonCaptureManager::unique_id_counter_{ format::kNullHandleId }; +std::atomic CommonCaptureManager::unique_id_counter_{ static_cast(0) }; +std::stack> CommonCaptureManager::handle_ids_override; CommonCaptureManager::ThreadData::ThreadData() : thread_id_(GetThreadId()), object_id_(format::kNullHandleId), call_id_(format::ApiCallId::ApiCall_Unknown), @@ -315,6 +323,11 @@ bool CommonCaptureManager::Initialize(format::ApiFamilyId api_ use_asset_file_ = trace_settings.use_asset_file; write_state_files_ = trace_settings.write_state_files; + if (trace_settings.recapture) + { + SetUniqueIdOffset(UINT64_MAX - static_cast(5000)); + } + rv_annotation_info_.gpuva_mask = trace_settings.rv_anotation_info.gpuva_mask; rv_annotation_info_.descriptor_mask = trace_settings.rv_anotation_info.descriptor_mask; @@ -992,24 +1005,29 @@ std::string CommonCaptureManager::CreateAssetFile() return asset_file_name; } -std::string CommonCaptureManager::CreateAssetFilename(const std::string& base_filename) const +std::string CommonCaptureManager::CreateAssetFilename(const std::string& base_filename) { - std::string asset_filename = base_filename; + if (!asset_file_name_.empty()) + { + return asset_file_name_; + } + + asset_file_name_ = base_filename; size_t dot_pos = base_filename.rfind('.'); if (dot_pos != std::string::npos) { if (base_filename.substr(dot_pos) == ".gfxr") { - asset_filename.replace(dot_pos, 16, "_asset_file.gfxa"); + asset_file_name_.replace(dot_pos, 16, "_asset_file.gfxa"); } } else { - asset_filename += std::string("_asset_file.gfxa"); + asset_file_name_ += std::string("_asset_file.gfxa"); } - return asset_filename; + return asset_file_name_; } bool CommonCaptureManager::CreateCaptureFile(format::ApiFamilyId api_family, const std::string& base_filename) @@ -1652,5 +1670,203 @@ void CommonCaptureManager::WriteCaptureOptions(std::string& operation_annotation operation_annotation += "\n }"; } +static const char* VkObjectTypeToStr(VkObjectType type) +{ + switch (type) + { + case VK_OBJECT_TYPE_UNKNOWN: + return GFXRECON_STR(VK_OBJECT_TYPE_UNKNOWN); + break; + case VK_OBJECT_TYPE_INSTANCE: + return GFXRECON_STR(VK_OBJECT_TYPE_INSTANCE); + break; + case VK_OBJECT_TYPE_PHYSICAL_DEVICE: + return GFXRECON_STR(VK_OBJECT_TYPE_PHYSICAL_DEVICE); + break; + case VK_OBJECT_TYPE_DEVICE: + return GFXRECON_STR(VK_OBJECT_TYPE_DEVICE); + break; + case VK_OBJECT_TYPE_QUEUE: + return GFXRECON_STR(VK_OBJECT_TYPE_QUEUE); + break; + case VK_OBJECT_TYPE_SEMAPHORE: + return GFXRECON_STR(VK_OBJECT_TYPE_SEMAPHORE); + break; + case VK_OBJECT_TYPE_COMMAND_BUFFER: + return GFXRECON_STR(VK_OBJECT_TYPE_COMMAND_BUFFER); + break; + case VK_OBJECT_TYPE_FENCE: + return GFXRECON_STR(VK_OBJECT_TYPE_FENCE); + break; + case VK_OBJECT_TYPE_DEVICE_MEMORY: + return GFXRECON_STR(VK_OBJECT_TYPE_DEVICE_MEMORY); + break; + case VK_OBJECT_TYPE_BUFFER: + return GFXRECON_STR(VK_OBJECT_TYPE_BUFFER); + break; + case VK_OBJECT_TYPE_IMAGE: + return GFXRECON_STR(VK_OBJECT_TYPE_IMAGE); + break; + case VK_OBJECT_TYPE_EVENT: + return GFXRECON_STR(VK_OBJECT_TYPE_EVENT); + break; + case VK_OBJECT_TYPE_QUERY_POOL: + return GFXRECON_STR(VK_OBJECT_TYPE_QUERY_POOL); + break; + case VK_OBJECT_TYPE_BUFFER_VIEW: + return GFXRECON_STR(VK_OBJECT_TYPE_BUFFER_VIEW); + break; + case VK_OBJECT_TYPE_IMAGE_VIEW: + return GFXRECON_STR(VK_OBJECT_TYPE_IMAGE_VIEW); + break; + case VK_OBJECT_TYPE_SHADER_MODULE: + return GFXRECON_STR(VK_OBJECT_TYPE_SHADER_MODULE); + break; + case VK_OBJECT_TYPE_PIPELINE_CACHE: + return GFXRECON_STR(VK_OBJECT_TYPE_PIPELINE_CACHE); + break; + case VK_OBJECT_TYPE_PIPELINE_LAYOUT: + return GFXRECON_STR(VK_OBJECT_TYPE_PIPELINE_LAYOUT); + break; + case VK_OBJECT_TYPE_RENDER_PASS: + return GFXRECON_STR(VK_OBJECT_TYPE_RENDER_PASS); + break; + case VK_OBJECT_TYPE_PIPELINE: + return GFXRECON_STR(VK_OBJECT_TYPE_PIPELINE); + break; + case VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT: + return GFXRECON_STR(VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT); + break; + case VK_OBJECT_TYPE_SAMPLER: + return GFXRECON_STR(VK_OBJECT_TYPE_SAMPLER); + break; + case VK_OBJECT_TYPE_DESCRIPTOR_POOL: + return GFXRECON_STR(VK_OBJECT_TYPE_DESCRIPTOR_POOL); + break; + case VK_OBJECT_TYPE_DESCRIPTOR_SET: + return GFXRECON_STR(VK_OBJECT_TYPE_DESCRIPTOR_SET); + break; + case VK_OBJECT_TYPE_FRAMEBUFFER: + return GFXRECON_STR(VK_OBJECT_TYPE_FRAMEBUFFER); + break; + case VK_OBJECT_TYPE_COMMAND_POOL: + return GFXRECON_STR(VK_OBJECT_TYPE_COMMAND_POOL); + break; + case VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION: + return GFXRECON_STR(VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION); + break; + case VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE: + return GFXRECON_STR(VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE); + break; + case VK_OBJECT_TYPE_PRIVATE_DATA_SLOT: + return GFXRECON_STR(VK_OBJECT_TYPE_PRIVATE_DATA_SLOT); + break; + case VK_OBJECT_TYPE_SURFACE_KHR: + return GFXRECON_STR(VK_OBJECT_TYPE_SURFACE_KHR); + break; + case VK_OBJECT_TYPE_SWAPCHAIN_KHR: + return GFXRECON_STR(VK_OBJECT_TYPE_SWAPCHAIN_KHR); + break; + case VK_OBJECT_TYPE_DISPLAY_KHR: + return GFXRECON_STR(VK_OBJECT_TYPE_DISPLAY_KHR); + break; + case VK_OBJECT_TYPE_DISPLAY_MODE_KHR: + return GFXRECON_STR(VK_OBJECT_TYPE_DISPLAY_MODE_KHR); + break; + case VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT: + return GFXRECON_STR(VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT); + break; + case VK_OBJECT_TYPE_VIDEO_SESSION_KHR: + return GFXRECON_STR(VK_OBJECT_TYPE_VIDEO_SESSION_KHR); + break; + case VK_OBJECT_TYPE_VIDEO_SESSION_PARAMETERS_KHR: + return GFXRECON_STR(VK_OBJECT_TYPE_VIDEO_SESSION_PARAMETERS_KHR); + break; + case VK_OBJECT_TYPE_CU_MODULE_NVX: + return GFXRECON_STR(VK_OBJECT_TYPE_CU_MODULE_NVX); + break; + case VK_OBJECT_TYPE_CU_FUNCTION_NVX: + return GFXRECON_STR(VK_OBJECT_TYPE_CU_FUNCTION_NVX); + break; + case VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT: + return GFXRECON_STR(VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT); + break; + case VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR: + return GFXRECON_STR(VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR); + break; + case VK_OBJECT_TYPE_VALIDATION_CACHE_EXT: + return GFXRECON_STR(VK_OBJECT_TYPE_VALIDATION_CACHE_EXT); + break; + case VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV: + return GFXRECON_STR(VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV); + break; + case VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL: + return GFXRECON_STR(VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL); + break; + case VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR: + return GFXRECON_STR(VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR); + break; + case VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV: + return GFXRECON_STR(VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV); + break; + case VK_OBJECT_TYPE_CUDA_MODULE_NV: + return GFXRECON_STR(VK_OBJECT_TYPE_CUDA_MODULE_NV); + break; + case VK_OBJECT_TYPE_CUDA_FUNCTION_NV: + return GFXRECON_STR(VK_OBJECT_TYPE_CUDA_FUNCTION_NV); + break; + case VK_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA: + return GFXRECON_STR(VK_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA); + break; + case VK_OBJECT_TYPE_MICROMAP_EXT: + return GFXRECON_STR(VK_OBJECT_TYPE_MICROMAP_EXT); + break; + case VK_OBJECT_TYPE_OPTICAL_FLOW_SESSION_NV: + return GFXRECON_STR(VK_OBJECT_TYPE_OPTICAL_FLOW_SESSION_NV); + break; + case VK_OBJECT_TYPE_SHADER_EXT: + return GFXRECON_STR(VK_OBJECT_TYPE_SHADER_EXT); + break; + default: + assert(0); + return "XXX NULL XXX"; + } +} + +void CommonCaptureManager::OverrideIdForNextVulkanObject(format::HandleId id, VkObjectType type) +{ + handle_ids_override.push(std::make_pair(id, type)); + GFXRECON_WRITE_CONSOLE("[CAPTURE] %s() capture_id: %" PRIu64 " type: %s", __func__, id, VkObjectTypeToStr(type)); +} + +format::HandleId CommonCaptureManager::GetUniqueId(VkObjectType type) +{ + GFXRECON_WRITE_CONSOLE("%s(type: %s)", __func__, VkObjectTypeToStr(type)); + + if (!handle_ids_override.empty()) + { + assert(type != VK_OBJECT_TYPE_UNKNOWN); + + auto top = handle_ids_override.top(); + if (top.second != type) + { + GFXRECON_LOG_WARNING("%s() Type mismatch. Expected %s requested %s", + __func__, + VkObjectTypeToStr(top.second), + VkObjectTypeToStr(type)) + } + handle_ids_override.pop(); + + GFXRECON_WRITE_CONSOLE(" Removing from stack %" PRIu64 "(%zu)", top.first, handle_ids_override.size()); + + return top.first; + } + else + { + GFXRECON_WRITE_CONSOLE(" Incrementing %" PRIu64, unique_id_counter_ + 1); + return ++unique_id_counter_; + } +} + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/capture_manager.h b/framework/encode/capture_manager.h index 2612eab7f3..a743ecdaa4 100644 --- a/framework/encode/capture_manager.h +++ b/framework/encode/capture_manager.h @@ -40,11 +40,16 @@ #include #include #include +#include #include #include #include +#include #include #include "util/file_path.h" +#include "util/logging.h" +#include "util/to_string.h" +#include "vulkan/vulkan_core.h" GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(encode) @@ -57,7 +62,7 @@ class CommonCaptureManager public: typedef std::shared_mutex ApiCallMutexT; - static format::HandleId GetUniqueId() { return ++unique_id_counter_; } + static format::HandleId GetUniqueId(VkObjectType type); static auto AcquireSharedApiCallLock() { return std::move(std::shared_lock(api_call_mutex_)); } @@ -265,7 +270,7 @@ class CommonCaptureManager std::string CreateTrimFilename(const std::string& base_filename, const util::UintRange& trim_range); std::string CreateAssetFile(); - std::string CreateAssetFilename(const std::string& base_filename) const; + std::string CreateAssetFilename(const std::string& base_filename); std::string CreateFrameStateFilename(const std::string& base_filename) const; bool CreateCaptureFile(format::ApiFamilyId api_family, const std::string& base_filename); void WriteCaptureOptions(std::string& operation_annotation); @@ -321,6 +326,14 @@ class CommonCaptureManager bool WriteFrameStateFile(); + void SetUniqueIdOffset(format::HandleId id) + { + GFXRECON_WRITE_CONSOLE("%s(id: %" PRIu64 ")", __func__, id); + unique_id_counter_ = id + 1; + } + + void OverrideIdForNextVulkanObject(format::HandleId id, VkObjectType type); + private: void WriteExecuteFromFile(util::FileOutputStream& out_stream, const std::string& filename, @@ -342,11 +355,12 @@ class CommonCaptureManager static void AtExit(); private: - static std::mutex instance_lock_; - static CommonCaptureManager* singleton_; - static thread_local std::unique_ptr thread_data_; - static std::atomic unique_id_counter_; - static ApiCallMutexT api_call_mutex_; + static std::mutex instance_lock_; + static CommonCaptureManager* singleton_; + static thread_local std::unique_ptr thread_data_; + static std::atomic unique_id_counter_; + static std::stack> handle_ids_override; + static ApiCallMutexT api_call_mutex_; uint32_t instance_count_ = 0; struct ApiInstanceRecord @@ -405,6 +419,7 @@ class CommonCaptureManager bool write_assets_; bool previous_write_assets_; bool write_state_files_; + std::string asset_file_name_; struct { diff --git a/framework/encode/capture_settings.cpp b/framework/encode/capture_settings.cpp index 29197e818f..f0dbc9afd3 100644 --- a/framework/encode/capture_settings.cpp +++ b/framework/encode/capture_settings.cpp @@ -25,6 +25,7 @@ #include "encode/capture_settings.h" #include "util/file_path.h" +#include "util/logging.h" #include "util/strings.h" #include "util/options.h" #include "util/platform.h" @@ -101,6 +102,8 @@ GFXRECON_BEGIN_NAMESPACE(encode) #define CAPTURE_USE_ASSET_FILE_UPPER "CAPTURE_USE_ASSET_FILE" #define CAPTURE_WRITE_STATE_FILES_LOWER "capture_write_state_files" #define CAPTURE_WRITE_STATE_FILES_UPPER "CAPTURE_WRITE_STATE_FILES" +#define CAPTURE_RECAPTURE_LOWER "capture_recapture" +#define CAPTURE_RECAPTURE_UPPER "CAPTURE_RECAPTURE" #define PAGE_GUARD_COPY_ON_MAP_LOWER "page_guard_copy_on_map" #define PAGE_GUARD_COPY_ON_MAP_UPPER "PAGE_GUARD_COPY_ON_MAP" #define PAGE_GUARD_SEPARATE_READ_LOWER "page_guard_separate_read" @@ -175,6 +178,7 @@ const char kCaptureIUnknownWrappingEnvVar[] = GFXRECON_ENV_VAR_ const char kCaptureQueueSubmitsEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_QUEUE_SUBMITS_LOWER; const char kCaptureUseAssetFileEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_USE_ASSET_FILE_LOWER; const char kCaptureWriteStateFilesEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_WRITE_STATE_FILES_LOWER; +const char kCaptureRecaptureEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_RECAPTURE_LOWER; const char kPageGuardCopyOnMapEnvVar[] = GFXRECON_ENV_VAR_PREFIX PAGE_GUARD_COPY_ON_MAP_LOWER; const char kPageGuardSeparateReadEnvVar[] = GFXRECON_ENV_VAR_PREFIX PAGE_GUARD_SEPARATE_READ_LOWER; const char kPageGuardPersistentMemoryEnvVar[] = GFXRECON_ENV_VAR_PREFIX PAGE_GUARD_PERSISTENT_MEMORY_LOWER; @@ -210,6 +214,7 @@ const char kCaptureFileNameEnvVar[] = GFXRECON_ENV_VAR_ const char kCaptureFileUseTimestampEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_FILE_USE_TIMESTAMP_UPPER; const char kCaptureUseAssetFileEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_USE_ASSET_FILE_UPPER; const char kCaptureWriteStateFilesEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_WRITE_STATE_FILES_UPPER; +const char kCaptureRecaptureEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_RECAPTURE_UPPER; const char kLogAllowIndentsEnvVar[] = GFXRECON_ENV_VAR_PREFIX LOG_ALLOW_INDENTS_UPPER; const char kLogBreakOnErrorEnvVar[] = GFXRECON_ENV_VAR_PREFIX LOG_BREAK_ON_ERROR_UPPER; const char kLogDetailedEnvVar[] = GFXRECON_ENV_VAR_PREFIX LOG_DETAILED_UPPER; @@ -284,6 +289,7 @@ const std::string kOptionKeyCaptureIUnknownWrapping = std::stri const std::string kOptionKeyCaptureQueueSubmits = std::string(kSettingsFilter) + std::string(CAPTURE_QUEUE_SUBMITS_LOWER); const std::string kOptionKeyCaptureUseAssetFile = std::string(kSettingsFilter) + std::string(CAPTURE_USE_ASSET_FILE_LOWER); const std::string kOptionKeyCaptureWriteStateFiles = std::string(kSettingsFilter) + std::string(CAPTURE_WRITE_STATE_FILES_LOWER); +const std::string kOptionKeyCaptureRecapture = std::string(kSettingsFilter) + std::string(CAPTURE_RECAPTURE_LOWER); const std::string kOptionKeyPageGuardCopyOnMap = std::string(kSettingsFilter) + std::string(PAGE_GUARD_COPY_ON_MAP_LOWER); const std::string kOptionKeyPageGuardSeparateRead = std::string(kSettingsFilter) + std::string(PAGE_GUARD_SEPARATE_READ_LOWER); const std::string kOptionKeyPageGuardPersistentMemory = std::string(kSettingsFilter) + std::string(PAGE_GUARD_PERSISTENT_MEMORY_LOWER); @@ -434,6 +440,7 @@ void CaptureSettings::LoadOptionsEnvVar(OptionsMap* options) LoadSingleOptionEnvVar(options, kCaptureQueueSubmitsEnvVar, kOptionKeyCaptureQueueSubmits); LoadSingleOptionEnvVar(options, kCaptureUseAssetFileEnvVar, kOptionKeyCaptureUseAssetFile); LoadSingleOptionEnvVar(options, kCaptureWriteStateFilesEnvVar, kOptionKeyCaptureWriteStateFiles); + LoadSingleOptionEnvVar(options, kCaptureRecaptureEnvVar, kOptionKeyCaptureRecapture); // Page guard environment variables LoadSingleOptionEnvVar(options, kPageGuardCopyOnMapEnvVar, kOptionKeyPageGuardCopyOnMap); @@ -577,6 +584,14 @@ void CaptureSettings::ProcessOptions(OptionsMap* options, CaptureSettings* setti settings->trace_settings_.write_state_files = ParseBoolString(FindOption(options, kOptionKeyCaptureWriteStateFiles), settings->trace_settings_.write_state_files); + settings->trace_settings_.recapture = + ParseBoolString(FindOption(options, kOptionKeyCaptureRecapture), settings->trace_settings_.recapture); + + GFXRECON_WRITE_CONSOLE("%s()", __func__) + GFXRECON_WRITE_CONSOLE(" use_asset_file: %u", settings->trace_settings_.use_asset_file); + GFXRECON_WRITE_CONSOLE(" write_state_files: %u", settings->trace_settings_.write_state_files); + GFXRECON_WRITE_CONSOLE(" recapture: %u", settings->trace_settings_.recapture); + // Page guard environment variables settings->trace_settings_.page_guard_copy_on_map = ParseBoolString( FindOption(options, kOptionKeyPageGuardCopyOnMap), settings->trace_settings_.page_guard_copy_on_map); diff --git a/framework/encode/capture_settings.h b/framework/encode/capture_settings.h index 70d4be4b6e..a12f02af7c 100644 --- a/framework/encode/capture_settings.h +++ b/framework/encode/capture_settings.h @@ -121,6 +121,7 @@ class CaptureSettings bool quit_after_frame_ranges{ false }; bool use_asset_file{ false }; bool write_state_files{ false }; + bool recapture{ false }; // An optimization for the page_guard memory tracking mode that eliminates the need for shadow memory by // overriding vkAllocateMemory so that all host visible allocations use the external memory extension with a diff --git a/framework/encode/custom_layer_func_table.h b/framework/encode/custom_layer_func_table.h index ebfd3467b5..a11c6c849b 100644 --- a/framework/encode/custom_layer_func_table.h +++ b/framework/encode/custom_layer_func_table.h @@ -33,7 +33,10 @@ GFXRECON_BEGIN_NAMESPACE(gfxrecon) const std::unordered_map custom_func_table = { { "GetBlockIndexGFXR", reinterpret_cast(encode::GetBlockIndexGFXR) }, - { "DumpAssetsGFXR", reinterpret_cast(encode::DumpAssetsGFXR) } + { "DumpAssetsGFXR", reinterpret_cast(encode::DumpAssetsGFXR) }, + { "SetUniqueIdOffsetGFXR", reinterpret_cast(encode::SetUniqueIdOffsetGFXR) }, + { "LoadAssetFileOffsetsGFXR", reinterpret_cast(encode::LoadAssetFileOffsetsGFXR) }, + { "OverrideIdForNextVulkanObjectGFXR", reinterpret_cast(encode::OverrideIdForNextVulkanObjectGFXR) } }; GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/custom_vulkan_api_call_encoders.cpp b/framework/encode/custom_vulkan_api_call_encoders.cpp index 1153afd667..7062dde207 100644 --- a/framework/encode/custom_vulkan_api_call_encoders.cpp +++ b/framework/encode/custom_vulkan_api_call_encoders.cpp @@ -36,6 +36,7 @@ #include "generated/generated_vulkan_struct_encoders.h" #include "generated/generated_vulkan_struct_handle_wrappers.h" #include "util/defines.h" +#include "vulkan/vulkan_core.h" #include @@ -409,6 +410,24 @@ VKAPI_ATTR void VKAPI_CALL DumpAssetsGFXR() manager->SetWriteAssets(); } +VKAPI_ATTR void VKAPI_CALL LoadAssetFileOffsetsGFXR(const format::AssetFileOffsets& offsets) +{ + VulkanCaptureManager* manager = VulkanCaptureManager::Get(); + manager->LoadAssetFileOffsets(offsets); +} + +VKAPI_ATTR void VKAPI_CALL SetUniqueIdOffsetGFXR(format::HandleId offset) +{ + VulkanCaptureManager* manager = VulkanCaptureManager::Get(); + manager->SetUniqueIdOffset(offset); +} + +VKAPI_ATTR void VKAPI_CALL OverrideIdForNextVulkanObjectGFXR(format::HandleId id, VkObjectType type) +{ + VulkanCaptureManager* manager = VulkanCaptureManager::Get(); + manager->OverrideIdForNextVulkanObject(id, type); +} + VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, diff --git a/framework/encode/custom_vulkan_api_call_encoders.h b/framework/encode/custom_vulkan_api_call_encoders.h index a09cd30765..acf6753319 100644 --- a/framework/encode/custom_vulkan_api_call_encoders.h +++ b/framework/encode/custom_vulkan_api_call_encoders.h @@ -26,8 +26,10 @@ #include "util/defines.h" #include "format/format.h" +#include "custom_exported_layer_funcs.h" #include "vulkan/vulkan.h" +#include "vulkan/vulkan_core.h" GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(encode) @@ -62,10 +64,6 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyAccelerationStructureKHR(VkDevice VkDeferredOperationKHR deferredOperation, const VkCopyAccelerationStructureInfoKHR* pInfo); -VKAPI_ATTR uint64_t VKAPI_CALL GetBlockIndexGFXR(); - -VKAPI_ATTR void VKAPI_CALL DumpAssetsGFXR(); - VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, diff --git a/framework/encode/vulkan_capture_manager.cpp b/framework/encode/vulkan_capture_manager.cpp index 17897b3c33..042b3baf83 100644 --- a/framework/encode/vulkan_capture_manager.cpp +++ b/framework/encode/vulkan_capture_manager.cpp @@ -596,6 +596,18 @@ VkResult VulkanCaptureManager::OverrideCreateInstance(const VkInstanceCreateInfo { VkResult result = VK_ERROR_INITIALIZATION_FAILED; + GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) + if (pCreateInfo->pApplicationInfo->pApplicationName) + { + GFXRECON_WRITE_CONSOLE(" pCreateInfo->pApplicationInfo->pApplicationName: %s", + pCreateInfo->pApplicationInfo->pApplicationName) + } + if (pCreateInfo->pApplicationInfo->pEngineName) + { + GFXRECON_WRITE_CONSOLE(" pCreateInfo->pApplicationInfo->pEngineName: %s", + pCreateInfo->pApplicationInfo->pEngineName) + } + if (CreateInstance()) { if (singleton_->IsPageGuardMemoryModeExternal()) @@ -1729,7 +1741,7 @@ void VulkanCaptureManager::ProcessReferenceToAndroidHardwareBuffer(VkDevice devi #endif // Only store buffer IDs and reference count if a creation command is written to the capture file. - format::HandleId memory_id = GetUniqueId(); + format::HandleId memory_id = GetUniqueId(VK_OBJECT_TYPE_UNKNOWN); HardwareBufferInfo& ahb_info = hardware_buffers_[hardware_buffer]; ahb_info.memory_id = memory_id; @@ -1819,7 +1831,7 @@ void VulkanCaptureManager::ProcessReferenceToAndroidHardwareBuffer(VkDevice devi { // The AHB is not CPU-readable, so store only the creation command. // Only store buffer IDs and reference count if a creation command is written to the capture file. - format::HandleId memory_id = GetUniqueId(); + format::HandleId memory_id = GetUniqueId(VK_OBJECT_TYPE_UNKNOWN); HardwareBufferInfo& ahb_info = hardware_buffers_[hardware_buffer]; ahb_info.memory_id = memory_id; @@ -3535,5 +3547,16 @@ void VulkanCaptureManager::PostProcess_vkCmdBeginRendering(VkCommandBuffer } } +void VulkanCaptureManager::LoadAssetFileOffsets(const format::AssetFileOffsets& offsets) +{ + GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__); + + if (IsCaptureModeTrack()) + { + assert(state_tracker_ != nullptr); + state_tracker_->LoadAssetFileOffsets(offsets); + } +} + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/vulkan_capture_manager.h b/framework/encode/vulkan_capture_manager.h index a724fbbc24..55ba3ff0e7 100644 --- a/framework/encode/vulkan_capture_manager.h +++ b/framework/encode/vulkan_capture_manager.h @@ -1257,10 +1257,7 @@ class VulkanCaptureManager : public ApiCaptureManager void PostProcess_vkCmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); - void PostProcess_vkFrameBoundaryANDROID(VkDevice device, VkSemaphore semaphore, VkImage image) - { - EndFrame(); - } + void PostProcess_vkFrameBoundaryANDROID(VkDevice device, VkSemaphore semaphore, VkImage image) { EndFrame(); } void PostProcess_vkCmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo); @@ -1547,6 +1544,8 @@ class VulkanCaptureManager : public ApiCaptureManager void PostProcess_vkCmdBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo); + void LoadAssetFileOffsets(const format::AssetFileOffsets& offsets); + #if defined(__ANDROID__) void OverrideGetPhysicalDeviceSurfacePresentModesKHR(uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes); #endif @@ -1556,15 +1555,9 @@ class VulkanCaptureManager : public ApiCaptureManager virtual ~VulkanCaptureManager() {} - virtual void CreateStateTracker() override - { - state_tracker_ = std::make_unique(); - } + virtual void CreateStateTracker() override { state_tracker_ = std::make_unique(); } - virtual void DestroyStateTracker() override - { - state_tracker_ = nullptr; - } + virtual void DestroyStateTracker() override { state_tracker_ = nullptr; } virtual void WriteTrackedState(util::FileOutputStream* file_stream, format::ThreadId thread_id, diff --git a/framework/encode/vulkan_handle_wrapper_util.h b/framework/encode/vulkan_handle_wrapper_util.h index 9b314043b7..40d40a2042 100644 --- a/framework/encode/vulkan_handle_wrapper_util.h +++ b/framework/encode/vulkan_handle_wrapper_util.h @@ -32,6 +32,8 @@ #include "generated/generated_vulkan_dispatch_table.h" #include "generated/generated_vulkan_state_table.h" #include "util/defines.h" +#include "util/logging.h" +#include "vulkan/vulkan_core.h" #include #include @@ -54,7 +56,7 @@ static const VkCommandPool kTempCommandPool = UINT64_TO_VK_HANDLE(VkCommandPool, std::numeric_limits::max() - 2); static const format::HandleId kTempCommandPoolId = std::numeric_limits::max() - 2; static const format::HandleId kTempCommandBufferId = std::numeric_limits::max() - 3; -typedef format::HandleId (*PFN_GetHandleId)(); +typedef format::HandleId (*PFN_GetHandleId)(VkObjectType); extern VulkanStateHandleTable state_handle_table_; @@ -187,7 +189,7 @@ void CreateWrappedDispatchHandle(typename ParentWrapper::HandleType parent, Wrapper* wrapper = new Wrapper; wrapper->dispatch_key = *reinterpret_cast(*handle); wrapper->handle = (*handle); - wrapper->handle_id = get_id(); + wrapper->handle_id = get_id(wrapper->vk_object_type); if (parent != VK_NULL_HANDLE) { @@ -210,13 +212,17 @@ void CreateWrappedDispatchHandle(typename ParentWrapper::HandleType parent, template void CreateWrappedNonDispatchHandle(typename Wrapper::HandleType* handle, PFN_GetHandleId get_id) { + GFXRECON_WRITE_CONSOLE("%s()", __func__) + GFXRECON_WRITE_CONSOLE(" handle: %p", handle) + GFXRECON_WRITE_CONSOLE(" *handle: %p", *handle) + ScopedDestroyLock shared_scoped_lock(false); assert(handle != nullptr); if ((*handle) != VK_NULL_HANDLE) { Wrapper* wrapper = new Wrapper; wrapper->handle = (*handle); - wrapper->handle_id = get_id(); + wrapper->handle_id = get_id(wrapper->vk_object_type); if (!state_handle_table_.InsertWrapper(wrapper)) { GFXRECON_LOG_WARNING("Create a duplicated Handle: %" PRIu64 @@ -276,6 +282,10 @@ inline void CreateWrappedHandlelayer_table_ref = &parent_wrapper->layer_table; parent_wrapper->child_physical_devices.push_back(wrapper); } + else + { + get_id(wrapper->vk_object_type); + } } template <> @@ -323,6 +333,9 @@ inline void CreateWrappedHandle( } } + GFXRECON_WRITE_CONSOLE("%s()", __func__) + GFXRECON_WRITE_CONSOLE(" wrapper: %p", wrapper) + if (wrapper == nullptr) { CreateWrappedDispatchHandle(parent, handle, get_id); @@ -331,6 +344,10 @@ inline void CreateWrappedHandle( wrapper->layer_table_ref = &parent_wrapper->layer_table; parent_wrapper->child_queues.push_back(wrapper); } + else + { + get_id(wrapper->vk_object_type); + } } template <> @@ -412,6 +429,10 @@ inline void CreateWrappedHandle(*handle); parent_wrapper->child_displays.push_back(wrapper); } + else + { + get_id(wrapper->vk_object_type); + } } } @@ -449,6 +470,10 @@ inline void CreateWrappedHandleparent_swapchains.insert(co_parent); parent_wrapper->child_images.push_back(wrapper); } + else + { + get_id(wrapper->vk_object_type); + } } // Override for display mode creation/retrieval, which requires the handle wrapper to be owned by a parent to ensure @@ -483,6 +508,10 @@ inline void CreateWrappedHandle(*handle); parent_wrapper->child_display_modes.push_back(wrapper); } + else + { + get_id(wrapper->vk_object_type); + } } template diff --git a/framework/encode/vulkan_handle_wrappers.h b/framework/encode/vulkan_handle_wrappers.h index 997f909817..b01452fb83 100644 --- a/framework/encode/vulkan_handle_wrappers.h +++ b/framework/encode/vulkan_handle_wrappers.h @@ -59,6 +59,10 @@ struct HandleWrapper { typedef T HandleType; + HandleWrapper(VkObjectType type) : vk_object_type(type) {} + + const VkObjectType vk_object_type; + // Dispatch table key for dispatchable handles. Must be the first struct member to be compatible with the // loader defined handles. void* dispatch_key{ nullptr }; @@ -74,23 +78,67 @@ struct HandleWrapper // Type definitions for handle wrappers that do not require additional state info. // -// clang-format off -struct SamplerYcbcrConversionWrapper : public HandleWrapper {}; -struct DebugReportCallbackEXTWrapper : public HandleWrapper {}; -struct DebugUtilsMessengerEXTWrapper : public HandleWrapper {}; -struct ValidationCacheEXTWrapper : public HandleWrapper {}; -struct IndirectCommandsLayoutNVWrapper : public HandleWrapper {}; -struct PerformanceConfigurationINTELWrapper : public HandleWrapper {}; -struct MicromapEXTWrapper : public HandleWrapper {}; -struct OpticalFlowSessionNVWrapper : public HandleWrapper {}; -struct VideoSessionKHRWrapper : public HandleWrapper {}; -struct VideoSessionParametersKHRWrapper : public HandleWrapper {}; -struct ShaderEXTWrapper : public HandleWrapper {}; - -// This handle type has a create function, but no destroy function. The handle wrapper will be owned by its parent VkDisplayKHR -// handle wrapper, which will filter duplicate handle retrievals and ensure that the wrapper is destroyed. -struct DisplayModeKHRWrapper : public HandleWrapper {}; -// clang-format on +struct SamplerYcbcrConversionWrapper : public HandleWrapper +{ + SamplerYcbcrConversionWrapper() : HandleWrapper(VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION) {} +}; + +struct DebugReportCallbackEXTWrapper : public HandleWrapper +{ + DebugReportCallbackEXTWrapper() : HandleWrapper(VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT) {} +}; + +struct DebugUtilsMessengerEXTWrapper : public HandleWrapper +{ + DebugUtilsMessengerEXTWrapper() : HandleWrapper(VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT) {} +}; + +struct ValidationCacheEXTWrapper : public HandleWrapper +{ + ValidationCacheEXTWrapper() : HandleWrapper(VK_OBJECT_TYPE_VALIDATION_CACHE_EXT) {} +}; + +struct IndirectCommandsLayoutNVWrapper : public HandleWrapper +{ + IndirectCommandsLayoutNVWrapper() : HandleWrapper(VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV) {} +}; + +struct PerformanceConfigurationINTELWrapper : public HandleWrapper +{ + PerformanceConfigurationINTELWrapper() : HandleWrapper(VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL) {} +}; + +struct MicromapEXTWrapper : public HandleWrapper +{ + MicromapEXTWrapper() : HandleWrapper(VK_OBJECT_TYPE_MICROMAP_EXT) {} +}; + +struct OpticalFlowSessionNVWrapper : public HandleWrapper +{ + OpticalFlowSessionNVWrapper() : HandleWrapper(VK_OBJECT_TYPE_OPTICAL_FLOW_SESSION_NV) {} +}; + +struct VideoSessionKHRWrapper : public HandleWrapper +{ + VideoSessionKHRWrapper() : HandleWrapper(VK_OBJECT_TYPE_VIDEO_SESSION_KHR) {} +}; + +struct VideoSessionParametersKHRWrapper : public HandleWrapper +{ + VideoSessionParametersKHRWrapper() : HandleWrapper(VK_OBJECT_TYPE_VIDEO_SESSION_PARAMETERS_KHR) {} +}; + +struct ShaderEXTWrapper : public HandleWrapper +{ + ShaderEXTWrapper() : HandleWrapper(VK_OBJECT_TYPE_SHADER_EXT) {} +}; + +// This handle type has a create function, but no destroy function. The handle wrapper will be owned by its parent +// VkDisplayKHR handle wrapper, which will filter duplicate handle retrievals and ensure that the wrapper is destroyed. +struct DisplayModeKHRWrapper : public HandleWrapper +{ + DisplayModeKHRWrapper() : HandleWrapper(VK_OBJECT_TYPE_DISPLAY_MODE_KHR) {} +}; // // Declarations for handle wrappers that require additional state info. @@ -98,6 +146,7 @@ struct DisplayModeKHRWrapper : public HandleWrapper struct ShaderModuleWrapper : public HandleWrapper { + ShaderModuleWrapper() : HandleWrapper(VK_OBJECT_TYPE_SHADER_MODULE) {} vulkan_state_info::ShaderReflectionDescriptorSetsInfos used_descriptors_info; }; @@ -106,6 +155,8 @@ struct ShaderModuleWrapper : public HandleWrapper // destroyed. struct DisplayKHRWrapper : public HandleWrapper { + DisplayKHRWrapper() : HandleWrapper(VK_OBJECT_TYPE_DISPLAY_KHR) {} + std::vector child_display_modes; }; @@ -113,6 +164,8 @@ struct DisplayKHRWrapper : public HandleWrapper // handle wrapper, which will filter duplicate handle retrievals and ensure that the wrapper is destroyed. struct PhysicalDeviceWrapper : public HandleWrapper { + PhysicalDeviceWrapper() : HandleWrapper(VK_OBJECT_TYPE_PHYSICAL_DEVICE) {} + VulkanInstanceTable* layer_table_ref{ nullptr }; std::vector child_displays; uint32_t instance_api_version{ 0 }; @@ -131,6 +184,8 @@ struct PhysicalDeviceWrapper : public HandleWrapper struct InstanceWrapper : public HandleWrapper { + InstanceWrapper() : HandleWrapper(VK_OBJECT_TYPE_INSTANCE) {} + VulkanInstanceTable layer_table; std::vector child_physical_devices; bool have_device_properties{ false }; @@ -139,11 +194,15 @@ struct InstanceWrapper : public HandleWrapper struct QueueWrapper : public HandleWrapper { + QueueWrapper() : HandleWrapper(VK_OBJECT_TYPE_QUEUE) {} + VulkanDeviceTable* layer_table_ref{ nullptr }; }; struct DeviceWrapper : public HandleWrapper { + DeviceWrapper() : HandleWrapper(VK_OBJECT_TYPE_DEVICE) {} + VulkanDeviceTable layer_table; PhysicalDeviceWrapper* physical_device{ nullptr }; std::vector child_queues; @@ -155,6 +214,8 @@ struct DeviceWrapper : public HandleWrapper struct FenceWrapper : public HandleWrapper { + FenceWrapper() : HandleWrapper(VK_OBJECT_TYPE_FENCE) {} + // Signaled state at creation to be compared with signaled state at snapshot write. If states are different, the // create parameters will need to be modified to reflect the state at snapshot write. bool created_signaled{ false }; @@ -163,6 +224,8 @@ struct FenceWrapper : public HandleWrapper struct EventWrapper : public HandleWrapper { + EventWrapper() : HandleWrapper(VK_OBJECT_TYPE_EVENT) {} + DeviceWrapper* device{ nullptr }; }; @@ -184,6 +247,8 @@ struct AssetWrapperBase struct BufferWrapper : public HandleWrapper, AssetWrapperBase { + BufferWrapper() : HandleWrapper(VK_OBJECT_TYPE_BUFFER) {} + // State tracking info for buffers with device addresses. format::HandleId device_id{ format::kNullHandleId }; VkDeviceAddress address{ 0 }; @@ -191,6 +256,8 @@ struct BufferWrapper : public HandleWrapper, AssetWrapperBase struct ImageWrapper : public HandleWrapper, AssetWrapperBase { + ImageWrapper() : HandleWrapper(VK_OBJECT_TYPE_IMAGE) {} + VkImageType image_type{ VK_IMAGE_TYPE_2D }; VkFormat format{ VK_FORMAT_UNDEFINED }; VkExtent3D extent{ 0, 0, 0 }; @@ -205,11 +272,15 @@ struct ImageWrapper : public HandleWrapper, AssetWrapperBase struct SamplerWrapper : public HandleWrapper { + SamplerWrapper() : HandleWrapper(VK_OBJECT_TYPE_SAMPLER) {} + std::unordered_set descriptor_sets_bound_to; }; struct DeviceMemoryWrapper : public HandleWrapper { + DeviceMemoryWrapper() : HandleWrapper(VK_OBJECT_TYPE_DEVICE_MEMORY) {} + uint32_t memory_type_index{ std::numeric_limits::max() }; VkDeviceSize allocation_size{ 0 }; // This is the device which was used to allocate the memory. @@ -237,6 +308,8 @@ struct DeviceMemoryWrapper : public HandleWrapper struct BufferViewWrapper : public HandleWrapper { + BufferViewWrapper() : HandleWrapper(VK_OBJECT_TYPE_BUFFER_VIEW) {} + format::HandleId buffer_id{ format::kNullHandleId }; BufferWrapper* buffer{ nullptr }; @@ -245,6 +318,8 @@ struct BufferViewWrapper : public HandleWrapper struct ImageViewWrapper : public HandleWrapper { + ImageViewWrapper() : HandleWrapper(VK_OBJECT_TYPE_IMAGE_VIEW) {} + format::HandleId image_id{ format::kNullHandleId }; ImageWrapper* image{ nullptr }; @@ -253,6 +328,8 @@ struct ImageViewWrapper : public HandleWrapper struct FramebufferWrapper : public HandleWrapper { + FramebufferWrapper() : HandleWrapper(VK_OBJECT_TYPE_FRAMEBUFFER) {} + // Creation info for objects used to create the framebuffer, which may have been destroyed after creation. format::HandleId render_pass_id{ format::kNullHandleId }; format::ApiCallId render_pass_create_call_id{ format::ApiCallId::ApiCall_Unknown }; @@ -266,6 +343,8 @@ struct FramebufferWrapper : public HandleWrapper struct SemaphoreWrapper : public HandleWrapper { + SemaphoreWrapper() : HandleWrapper(VK_OBJECT_TYPE_SEMAPHORE) {} + // Track semaphore signaled state. State is signaled when a sempahore is submitted to QueueSubmit, QueueBindSparse, // AcquireNextImageKHR, or AcquireNextImage2KHR as a signal semaphore. State is not signaled when a semaphore is // submitted to QueueSubmit, QueueBindSparse, or QueuePresentKHR as a wait semaphore. Initial state after creation @@ -277,6 +356,8 @@ struct SemaphoreWrapper : public HandleWrapper struct QueryPoolWrapper : public HandleWrapper { + QueryPoolWrapper() : HandleWrapper(VK_OBJECT_TYPE_QUERY_POOL) {} + DeviceWrapper* device{ nullptr }; VkQueryType query_type{}; uint32_t query_count{ 0 }; @@ -285,6 +366,8 @@ struct QueryPoolWrapper : public HandleWrapper struct RenderPassWrapper : public HandleWrapper { + RenderPassWrapper() : HandleWrapper(VK_OBJECT_TYPE_RENDER_PASS) {} + struct { // Final image attachment layouts to be used for processing image layout transitions after calls to @@ -297,12 +380,16 @@ struct RenderPassWrapper : public HandleWrapper struct DescriptorUpdateTemplateWrapper : public HandleWrapper { + DescriptorUpdateTemplateWrapper() : HandleWrapper(VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE) {} + // Members for general wrapper support. UpdateTemplateInfo info; }; struct DescriptorSetLayoutWrapper : public HandleWrapper { + DescriptorSetLayoutWrapper() : HandleWrapper(VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT) {} + // Members for trimming state tracking. std::vector binding_info; }; @@ -310,6 +397,8 @@ struct DescriptorSetLayoutWrapper : public HandleWrapper struct DescriptorPoolWrapper; struct DescriptorSetWrapper : public HandleWrapper { + DescriptorSetWrapper() : HandleWrapper(VK_OBJECT_TYPE_DESCRIPTOR_SET) {} + // Members for general wrapper support. // Pool from which set was allocated. The set must be removed from the pool's allocation list when destroyed. DescriptorPoolWrapper* parent_pool{ nullptr }; @@ -329,6 +418,8 @@ struct DescriptorSetWrapper : public HandleWrapper struct DescriptorPoolWrapper : public HandleWrapper { + DescriptorPoolWrapper() : HandleWrapper(VK_OBJECT_TYPE_DESCRIPTOR_POOL) {} + // Members for general wrapper support. // Track descriptor set info, which must be destroyed on descriptor pool reset. std::unordered_map child_sets; @@ -336,6 +427,8 @@ struct DescriptorPoolWrapper : public HandleWrapper struct PipelineLayoutWrapper : public HandleWrapper { + PipelineLayoutWrapper() : HandleWrapper(VK_OBJECT_TYPE_PIPELINE_LAYOUT) {} + // Creation info for objects used to create the pipeline layout, which may have been destroyed after pipeline layout // creation. std::shared_ptr layout_dependencies; @@ -343,6 +436,8 @@ struct PipelineLayoutWrapper : public HandleWrapper struct PipelineWrapper : public HandleWrapper { + PipelineWrapper() : HandleWrapper(VK_OBJECT_TYPE_PIPELINE) {} + // Creation info for objects used to create the pipeline, which may have been destroyed after pipeline creation. std::vector shader_module_dependencies; vulkan_state_info::CreateDependencyInfo render_pass_dependency; @@ -365,6 +460,8 @@ struct AccelerationStructureKHRWrapper; struct CommandPoolWrapper; struct CommandBufferWrapper : public HandleWrapper { + CommandBufferWrapper() : HandleWrapper(VK_OBJECT_TYPE_COMMAND_BUFFER) {} + VulkanDeviceTable* layer_table_ref{ nullptr }; // Members for general wrapper support. @@ -421,6 +518,8 @@ struct CommandBufferWrapper : public HandleWrapper struct DeferredOperationKHRWrapper : public HandleWrapper { + DeferredOperationKHRWrapper() : HandleWrapper(VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR) {} + // Record CreateRayTracingPipelinesKHR parameters for safety. HandleUnwrapMemory handle_unwrap_memory; std::vector create_infos; @@ -434,6 +533,8 @@ struct DeferredOperationKHRWrapper : public HandleWrapper { + CommandPoolWrapper() : HandleWrapper(VK_OBJECT_TYPE_COMMAND_POOL) {} + // Members for general wrapper support. // Track command buffer info, which must be destroyed on command pool reset. std::unordered_map child_buffers; @@ -484,6 +585,8 @@ struct GroupSurfacePresentModes struct SurfaceKHRWrapper : public HandleWrapper { + SurfaceKHRWrapper() : HandleWrapper(VK_OBJECT_TYPE_SURFACE_KHR) {} + // Track results from calls to vkGetPhysicalDeviceSurfaceSupportKHR to write to the state snapshot after surface // creation. The call is only written to the state snapshot if it was previously called by the application. // Keys are the VkPhysicalDevice handle ID. @@ -498,6 +601,8 @@ struct SurfaceKHRWrapper : public HandleWrapper struct SwapchainKHRWrapper : public HandleWrapper { + SwapchainKHRWrapper() : HandleWrapper(VK_OBJECT_TYPE_SWAPCHAIN_KHR) {} + // Members for general wrapper support. std::vector child_images; @@ -519,6 +624,8 @@ struct SwapchainKHRWrapper : public HandleWrapper struct AccelerationStructureKHRWrapper : public HandleWrapper { + AccelerationStructureKHRWrapper() : HandleWrapper(VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR) {} + // State tracking info for buffers with device addresses. format::HandleId device_id{ format::kNullHandleId }; VkDeviceAddress address{ 0 }; @@ -531,6 +638,8 @@ struct AccelerationStructureKHRWrapper : public HandleWrapper { + AccelerationStructureNVWrapper() : HandleWrapper(VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV) {} + std::unordered_set descriptor_sets_bound_to; // TODO: Determine what additional state tracking is needed. @@ -538,6 +647,8 @@ struct AccelerationStructureNVWrapper : public HandleWrapper { + PrivateDataSlotWrapper() : HandleWrapper(VK_OBJECT_TYPE_PRIVATE_DATA_SLOT) {} + DeviceWrapper* device{ nullptr }; VkObjectType object_type{ VK_OBJECT_TYPE_UNKNOWN }; uint64_t object_handle{ 0 }; @@ -546,6 +657,8 @@ struct PrivateDataSlotWrapper : public HandleWrapper struct PipelineCacheWrapper : public HandleWrapper { + PipelineCacheWrapper() : HandleWrapper(VK_OBJECT_TYPE_PIPELINE_CACHE) {} + DeviceWrapper* device{ nullptr }; VkPipelineCacheCreateInfo create_info; std::vector cache_data; diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index 812cf65372..2de5c81ee7 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -3004,5 +3004,17 @@ void VulkanStateTracker::TrackBeginRendering(VkCommandBuffer commandBuffer, cons } } +void VulkanStateTracker::LoadAssetFileOffsets(const format::AssetFileOffsets& offsets) +{ + GFXRECON_WRITE_CONSOLE("%s()", __func__) + GFXRECON_WRITE_CONSOLE(" importing %zu", offsets.size()) + for (const auto frame : offsets) + { + GFXRECON_WRITE_CONSOLE(" ... %zu", frame.second.size()) + } + + asset_file_offsets_ = offsets; +} + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index d34ffdacb1..c6216e1ca1 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #if defined(VK_USE_PLATFORM_ANDROID_KHR) @@ -44,6 +45,7 @@ GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(encode) +static FILE* debug = nullptr; const uint32_t kDefaultQueueFamilyIndex = 0; static bool IsMemoryCoherent(VkMemoryPropertyFlags property_flags) @@ -100,6 +102,8 @@ WriteFrameMarker(format::MarkerType marker_type, uint64_t frame_number, util::Fi { assert(output_stream != nullptr); + fprintf(debug, "%s() %" PRId64 "\n", __func__, frame_number); + format::Marker marker_cmd; uint64_t header_size = sizeof(format::Marker); marker_cmd.header.size = sizeof(marker_cmd.marker_type) + sizeof(marker_cmd.frame_number); @@ -116,11 +120,17 @@ uint64_t VulkanStateWriter::WriteAssets(const VulkanStateTable& state_table, uin blocks_written_ = 0; + debug = fopen("/storage/emulated/0/Download/WriteState.txt", "a"); + assert(debug); + WriteFrameMarker(format::MarkerType::kBeginMarker, frame_number, asset_file_stream_); WriteResourceMemoryState(state_table, false); WriteDescriptorSetStateWithAssetFile(state_table); + fsync(fileno(debug)); + fclose(debug); + return blocks_written_; } @@ -129,6 +139,9 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint // clang-format off blocks_written_ = 0; + debug = fopen("/storage/emulated/0/Download/WriteState.txt", "a"); + assert(debug); + auto started = std::chrono::high_resolution_clock::now(); format::Marker marker; @@ -238,6 +251,9 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint asset_file_stream_->Flush(); } + fsync(fileno(debug)); + fclose(debug); + // For the EndMarker meta command ++blocks_written_; @@ -1129,6 +1145,8 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa { wrapper->dirty = false; (*asset_file_offsets_)[wrapper->handle_id] = offset; + + fprintf(debug, "%" PRIu64 " -> %" PRId64 "\n", wrapper->handle_id, offset); } }); @@ -1735,6 +1753,8 @@ void VulkanStateWriter::ProcessBufferMemoryWithAssetFile(const vulkan_wrappers:: asset_file_stream_->Write(bytes, data_size); (*asset_file_offsets_)[buffer_wrapper->handle_id] = offset; + fprintf(debug, "buffer %" PRIu64 " -> %" PRId64 "\n", buffer_wrapper->handle_id, offset); + if (output_stream_ != nullptr) { WriteExecuteFromFile(asset_file_stream_->GetFilename(), 1, offset); @@ -2055,6 +2075,8 @@ void VulkanStateWriter::ProcessImageMemoryWithAssetFile(const vulkan_wrappers::D asset_file_stream_->Write(snapshot_entry.level_sizes.data(), levels_size); asset_file_stream_->Write(bytes, data_size); + fprintf(debug, "image %" PRIu64 " -> %" PRId64 "\n", image_wrapper->handle_id, offset); + if (output_stream_ != nullptr) { WriteExecuteFromFile(asset_file_stream_->GetFilename(), 1, offset); diff --git a/framework/generated/generated_vulkan_api_call_encoders.cpp b/framework/generated/generated_vulkan_api_call_encoders.cpp index f0b5e9ec71..40b8d37130 100644 --- a/framework/generated/generated_vulkan_api_call_encoders.cpp +++ b/framework/generated/generated_vulkan_api_call_encoders.cpp @@ -58,6 +58,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateInstance( const VkAllocationCallbacks* pAllocator, VkInstance* pInstance) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) auto api_call_lock = VulkanCaptureManager::AcquireExclusiveApiCallLock(); bool omit_output_data = false; @@ -89,6 +90,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyInstance( VkInstance instance, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -126,6 +128,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -174,6 +177,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -208,6 +212,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFormatProperties( VkFormat format, VkFormatProperties* pFormatProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -247,6 +252,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceImageFormatProperties( VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -294,6 +300,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -328,6 +335,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties* pQueueFamilyProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -362,6 +370,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMemoryProperties( VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -397,6 +406,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice( const VkAllocationCallbacks* pAllocator, VkDevice* pDevice) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -441,6 +451,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDevice( VkDevice device, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -479,6 +490,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceQueue( uint32_t queueIndex, VkQueue* pQueue) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -518,6 +530,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit( const VkSubmitInfo* pSubmits, VkFence fence) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -558,6 +571,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit( VKAPI_ATTR VkResult VKAPI_CALL QueueWaitIdle( VkQueue queue) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -592,6 +606,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueWaitIdle( VKAPI_ATTR VkResult VKAPI_CALL DeviceWaitIdle( VkDevice device) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -629,6 +644,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateMemory( const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -674,6 +690,7 @@ VKAPI_ATTR void VKAPI_CALL FreeMemory( VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -715,6 +732,7 @@ VKAPI_ATTR VkResult VKAPI_CALL MapMemory( VkMemoryMapFlags flags, void** ppData) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -761,6 +779,7 @@ VKAPI_ATTR void VKAPI_CALL UnmapMemory( VkDevice device, VkDeviceMemory memory) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -795,6 +814,7 @@ VKAPI_ATTR VkResult VKAPI_CALL FlushMappedMemoryRanges( uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -836,6 +856,7 @@ VKAPI_ATTR VkResult VKAPI_CALL InvalidateMappedMemoryRanges( uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -877,6 +898,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceMemoryCommitment( VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -913,6 +935,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory( VkDeviceMemory memory, VkDeviceSize memoryOffset) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -953,6 +976,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory( VkDeviceMemory memory, VkDeviceSize memoryOffset) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -992,6 +1016,7 @@ VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements( VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1027,6 +1052,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements( VkImage image, VkMemoryRequirements* pMemoryRequirements) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1063,6 +1089,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements( uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1104,6 +1131,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties( uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1145,6 +1173,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueBindSparse( const VkBindSparseInfo* pBindInfo, VkFence fence) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1188,6 +1217,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateFence( const VkAllocationCallbacks* pAllocator, VkFence* pFence) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1238,6 +1268,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyFence( VkFence fence, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1276,6 +1307,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetFences( uint32_t fenceCount, const VkFence* pFences) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1313,6 +1345,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetFenceStatus( VkDevice device, VkFence fence) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1352,6 +1385,7 @@ VKAPI_ATTR VkResult VKAPI_CALL WaitForFences( VkBool32 waitAll, uint64_t timeout) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1393,6 +1427,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSemaphore( const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1443,6 +1478,7 @@ VKAPI_ATTR void VKAPI_CALL DestroySemaphore( VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1482,6 +1518,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateEvent( const VkAllocationCallbacks* pAllocator, VkEvent* pEvent) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1532,6 +1569,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyEvent( VkEvent event, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1569,6 +1607,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetEventStatus( VkDevice device, VkEvent event) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1605,6 +1644,7 @@ VKAPI_ATTR VkResult VKAPI_CALL SetEvent( VkDevice device, VkEvent event) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1641,6 +1681,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetEvent( VkDevice device, VkEvent event) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1679,6 +1720,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateQueryPool( const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1729,6 +1771,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyQueryPool( VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1772,6 +1815,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetQueryPoolResults( VkDeviceSize stride, VkQueryResultFlags flags) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1822,6 +1866,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateBuffer( const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1867,6 +1912,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyBuffer( VkBuffer buffer, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1906,6 +1952,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateBufferView( const VkAllocationCallbacks* pAllocator, VkBufferView* pView) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1959,6 +2006,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyBufferView( VkBufferView bufferView, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1998,6 +2046,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateImage( const VkAllocationCallbacks* pAllocator, VkImage* pImage) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2043,6 +2092,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyImage( VkImage image, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2082,6 +2132,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout( const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2119,6 +2170,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateImageView( const VkAllocationCallbacks* pAllocator, VkImageView* pView) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2172,6 +2224,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyImageView( VkImageView imageView, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2211,6 +2264,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateShaderModule( const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2264,6 +2318,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyShaderModule( VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2303,6 +2358,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineCache( const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2353,6 +2409,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyPipelineCache( VkPipelineCache pipelineCache, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2392,6 +2449,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPipelineCacheData( size_t* pDataSize, void* pData) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2438,6 +2496,7 @@ VKAPI_ATTR VkResult VKAPI_CALL MergePipelineCaches( uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2477,6 +2536,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyPipeline( VkPipeline pipeline, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2516,6 +2576,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineLayout( const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2569,6 +2630,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyPipelineLayout( VkPipelineLayout pipelineLayout, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2608,6 +2670,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSampler( const VkAllocationCallbacks* pAllocator, VkSampler* pSampler) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2661,6 +2724,7 @@ VKAPI_ATTR void VKAPI_CALL DestroySampler( VkSampler sampler, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2700,6 +2764,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorSetLayout( const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2753,6 +2818,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDescriptorSetLayout( VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2792,6 +2858,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorPool( const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2842,6 +2909,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDescriptorPool( VkDescriptorPool descriptorPool, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2880,6 +2948,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetDescriptorPool( VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2919,6 +2988,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateDescriptorSets( const VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2972,6 +3042,7 @@ VKAPI_ATTR VkResult VKAPI_CALL FreeDescriptorSets( uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3016,6 +3087,7 @@ VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSets( uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3058,6 +3130,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateFramebuffer( const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3111,6 +3184,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyFramebuffer( VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3150,6 +3224,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass( const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3200,6 +3275,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyRenderPass( VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3238,6 +3314,7 @@ VKAPI_ATTR void VKAPI_CALL GetRenderAreaGranularity( VkRenderPass renderPass, VkExtent2D* pGranularity) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3274,6 +3351,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateCommandPool( const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3324,6 +3402,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyCommandPool( VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3362,6 +3441,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetCommandPool( VkCommandPool commandPool, VkCommandPoolResetFlags flags) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3400,6 +3480,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateCommandBuffers( const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3453,6 +3534,7 @@ VKAPI_ATTR void VKAPI_CALL FreeCommandBuffers( uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3491,6 +3573,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer( VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3529,6 +3612,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer( VKAPI_ATTR VkResult VKAPI_CALL EndCommandBuffer( VkCommandBuffer commandBuffer) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3564,6 +3648,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetCommandBuffer( VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3601,6 +3686,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindPipeline( VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3637,6 +3723,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewport( uint32_t viewportCount, const VkViewport* pViewports) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3674,6 +3761,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetScissor( uint32_t scissorCount, const VkRect2D* pScissors) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3709,6 +3797,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLineWidth( VkCommandBuffer commandBuffer, float lineWidth) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3744,6 +3833,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBias( float depthBiasClamp, float depthBiasSlopeFactor) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3779,6 +3869,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetBlendConstants( VkCommandBuffer commandBuffer, const float blendConstants[4]) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3813,6 +3904,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBounds( float minDepthBounds, float maxDepthBounds) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3848,6 +3940,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilCompareMask( VkStencilFaceFlags faceMask, uint32_t compareMask) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3883,6 +3976,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilWriteMask( VkStencilFaceFlags faceMask, uint32_t writeMask) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3918,6 +4012,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilReference( VkStencilFaceFlags faceMask, uint32_t reference) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3958,6 +4053,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorSets( uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3999,6 +4095,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindIndexBuffer( VkDeviceSize offset, VkIndexType indexType) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4037,6 +4134,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers( const VkBuffer* pBuffers, const VkDeviceSize* pOffsets) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4076,6 +4174,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDraw( uint32_t firstVertex, uint32_t firstInstance) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4116,6 +4215,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexed( int32_t vertexOffset, uint32_t firstInstance) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4156,6 +4256,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndirect( uint32_t drawCount, uint32_t stride) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4195,6 +4296,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirect( uint32_t drawCount, uint32_t stride) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4233,6 +4335,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDispatch( uint32_t groupCountY, uint32_t groupCountZ) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4269,6 +4372,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDispatchIndirect( VkBuffer buffer, VkDeviceSize offset) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4306,6 +4410,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer( uint32_t regionCount, const VkBufferCopy* pRegions) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4347,6 +4452,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImage( uint32_t regionCount, const VkImageCopy* pRegions) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4391,6 +4497,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBlitImage( const VkImageBlit* pRegions, VkFilter filter) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4434,6 +4541,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage( uint32_t regionCount, const VkBufferImageCopy* pRegions) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4475,6 +4583,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer( uint32_t regionCount, const VkBufferImageCopy* pRegions) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4515,6 +4624,7 @@ VKAPI_ATTR void VKAPI_CALL CmdUpdateBuffer( VkDeviceSize dataSize, const void* pData) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4554,6 +4664,7 @@ VKAPI_ATTR void VKAPI_CALL CmdFillBuffer( VkDeviceSize size, uint32_t data) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4594,6 +4705,7 @@ VKAPI_ATTR void VKAPI_CALL CmdClearColorImage( uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4635,6 +4747,7 @@ VKAPI_ATTR void VKAPI_CALL CmdClearDepthStencilImage( uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4675,6 +4788,7 @@ VKAPI_ATTR void VKAPI_CALL CmdClearAttachments( uint32_t rectCount, const VkClearRect* pRects) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4716,6 +4830,7 @@ VKAPI_ATTR void VKAPI_CALL CmdResolveImage( uint32_t regionCount, const VkImageResolve* pRegions) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4755,6 +4870,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetEvent( VkEvent event, VkPipelineStageFlags stageMask) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4790,6 +4906,7 @@ VKAPI_ATTR void VKAPI_CALL CmdResetEvent( VkEvent event, VkPipelineStageFlags stageMask) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4833,6 +4950,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWaitEvents( uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4887,6 +5005,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier( uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4934,6 +5053,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginQuery( uint32_t query, VkQueryControlFlags flags) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4970,6 +5090,7 @@ VKAPI_ATTR void VKAPI_CALL CmdEndQuery( VkQueryPool queryPool, uint32_t query) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5006,6 +5127,7 @@ VKAPI_ATTR void VKAPI_CALL CmdResetQueryPool( uint32_t firstQuery, uint32_t queryCount) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5043,6 +5165,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteTimestamp( VkQueryPool queryPool, uint32_t query) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5084,6 +5207,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyQueryPoolResults( VkDeviceSize stride, VkQueryResultFlags flags) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5127,6 +5251,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPushConstants( uint32_t size, const void* pValues) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5165,6 +5290,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass( const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5202,6 +5328,7 @@ VKAPI_ATTR void VKAPI_CALL CmdNextSubpass( VkCommandBuffer commandBuffer, VkSubpassContents contents) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5234,6 +5361,7 @@ VKAPI_ATTR void VKAPI_CALL CmdNextSubpass( VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass( VkCommandBuffer commandBuffer) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5267,6 +5395,7 @@ VKAPI_ATTR void VKAPI_CALL CmdExecuteCommands( uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5302,6 +5431,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory2( uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5343,6 +5473,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory2( uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5386,6 +5517,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceGroupPeerMemoryFeatures( uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5422,6 +5554,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDeviceMask( VkCommandBuffer commandBuffer, uint32_t deviceMask) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5460,6 +5593,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDispatchBase( uint32_t groupCountY, uint32_t groupCountZ) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5499,6 +5633,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceGroups( uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5548,6 +5683,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements2( const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5586,6 +5722,7 @@ VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements2( const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5625,6 +5762,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements2( uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5663,6 +5801,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures2( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5696,6 +5835,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties2( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5730,6 +5870,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFormatProperties2( VkFormat format, VkFormatProperties2* pFormatProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5765,6 +5906,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceImageFormatProperties2( const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5809,6 +5951,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties2( uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5843,6 +5986,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMemoryProperties2( VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5878,6 +6022,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties2( uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5914,6 +6059,7 @@ VKAPI_ATTR void VKAPI_CALL TrimCommandPool( VkCommandPool commandPool, VkCommandPoolTrimFlags flags) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5949,6 +6095,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceQueue2( const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5987,6 +6134,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSamplerYcbcrConversion( const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6037,6 +6185,7 @@ VKAPI_ATTR void VKAPI_CALL DestroySamplerYcbcrConversion( VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6076,6 +6225,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorUpdateTemplate( const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6129,6 +6279,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDescriptorUpdateTemplate( VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6167,6 +6318,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalBufferProperties( const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6202,6 +6354,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalFenceProperties( const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6237,6 +6390,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalSemaphoreProperties( const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6272,6 +6426,7 @@ VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutSupport( const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6314,6 +6469,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectCount( uint32_t maxDrawCount, uint32_t stride) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6357,6 +6513,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCount( uint32_t maxDrawCount, uint32_t stride) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6397,6 +6554,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass2( const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6447,6 +6605,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass2( const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6485,6 +6644,7 @@ VKAPI_ATTR void VKAPI_CALL CmdNextSubpass2( const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6519,6 +6679,7 @@ VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass2( VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6554,6 +6715,7 @@ VKAPI_ATTR void VKAPI_CALL ResetQueryPool( uint32_t firstQuery, uint32_t queryCount) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6590,6 +6752,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreCounterValue( VkSemaphore semaphore, uint64_t* pValue) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6634,6 +6797,7 @@ VKAPI_ATTR VkResult VKAPI_CALL WaitSemaphores( const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6674,6 +6838,7 @@ VKAPI_ATTR VkResult VKAPI_CALL SignalSemaphore( VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6713,6 +6878,7 @@ VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetBufferDeviceAddress( VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6752,6 +6918,7 @@ VKAPI_ATTR uint64_t VKAPI_CALL GetBufferOpaqueCaptureAddress( VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6791,6 +6958,7 @@ VKAPI_ATTR uint64_t VKAPI_CALL GetDeviceMemoryOpaqueCaptureAddress( VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6831,6 +6999,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceToolProperties( uint32_t* pToolCount, VkPhysicalDeviceToolProperties* pToolProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6876,6 +7045,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePrivateDataSlot( const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6926,6 +7096,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyPrivateDataSlot( VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6966,6 +7137,7 @@ VKAPI_ATTR VkResult VKAPI_CALL SetPrivateData( VkPrivateDataSlot privateDataSlot, uint64_t data) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7008,6 +7180,7 @@ VKAPI_ATTR void VKAPI_CALL GetPrivateData( VkPrivateDataSlot privateDataSlot, uint64_t* pData) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7045,6 +7218,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetEvent2( VkEvent event, const VkDependencyInfo* pDependencyInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7083,6 +7257,7 @@ VKAPI_ATTR void VKAPI_CALL CmdResetEvent2( VkEvent event, VkPipelineStageFlags2 stageMask) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7119,6 +7294,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWaitEvents2( const VkEvent* pEvents, const VkDependencyInfo* pDependencyInfos) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7157,6 +7333,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier2( VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7195,6 +7372,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteTimestamp2( VkQueryPool queryPool, uint32_t query) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7232,6 +7410,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit2( const VkSubmitInfo2* pSubmits, VkFence fence) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7273,6 +7452,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer2( VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7309,6 +7489,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImage2( VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7345,6 +7526,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage2( VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7381,6 +7563,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer2( VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7417,6 +7600,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBlitImage2( VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7453,6 +7637,7 @@ VKAPI_ATTR void VKAPI_CALL CmdResolveImage2( VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7489,6 +7674,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRendering( VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7524,6 +7710,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRendering( VKAPI_ATTR void VKAPI_CALL CmdEndRendering( VkCommandBuffer commandBuffer) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7556,6 +7743,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCullMode( VkCommandBuffer commandBuffer, VkCullModeFlags cullMode) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7589,6 +7777,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetFrontFace( VkCommandBuffer commandBuffer, VkFrontFace frontFace) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7622,6 +7811,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetPrimitiveTopology( VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7656,6 +7846,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewportWithCount( uint32_t viewportCount, const VkViewport* pViewports) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7691,6 +7882,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetScissorWithCount( uint32_t scissorCount, const VkRect2D* pScissors) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7730,6 +7922,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers2( const VkDeviceSize* pSizes, const VkDeviceSize* pStrides) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7768,6 +7961,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthTestEnable( VkCommandBuffer commandBuffer, VkBool32 depthTestEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7801,6 +7995,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthWriteEnable( VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7834,6 +8029,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthCompareOp( VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7867,6 +8063,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBoundsTestEnable( VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7900,6 +8097,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilTestEnable( VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7937,6 +8135,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilOp( VkStencilOp depthFailOp, VkCompareOp compareOp) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7974,6 +8173,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRasterizerDiscardEnable( VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8007,6 +8207,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBiasEnable( VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8040,6 +8241,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetPrimitiveRestartEnable( VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8074,6 +8276,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceBufferMemoryRequirements( const VkDeviceBufferMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8109,6 +8312,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceImageMemoryRequirements( const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8148,6 +8352,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceImageSparseMemoryRequirements( uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8187,6 +8392,7 @@ VKAPI_ATTR void VKAPI_CALL DestroySurfaceKHR( VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8226,6 +8432,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceSupportKHR( VkSurfaceKHR surface, VkBool32* pSupported) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8271,6 +8478,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilitiesKHR( VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8316,6 +8524,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceFormatsKHR( uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8362,6 +8571,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModesKHR( uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8408,6 +8618,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR( const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8461,6 +8672,7 @@ VKAPI_ATTR void VKAPI_CALL DestroySwapchainKHR( VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8500,6 +8712,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR( uint32_t* pSwapchainImageCount, VkImage* pSwapchainImages) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8553,6 +8766,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImageKHR( VkFence fence, uint32_t* pImageIndex) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8599,6 +8813,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR( VkQueue queue, const VkPresentInfoKHR* pPresentInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto api_call_lock = VulkanCaptureManager::AcquireExclusiveApiCallLock(); @@ -8628,6 +8843,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDeviceGroupPresentCapabilitiesKHR( VkDevice device, VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8671,6 +8887,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDeviceGroupSurfacePresentModesKHR( VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR* pModes) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8716,6 +8933,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDevicePresentRectanglesKHR( uint32_t* pRectCount, VkRect2D* pRects) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8761,6 +8979,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImage2KHR( const VkAcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8808,6 +9027,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPropertiesKHR( uint32_t* pPropertyCount, VkDisplayPropertiesKHR* pProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8857,6 +9077,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, VkDisplayPlanePropertiesKHR* pProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8907,6 +9128,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneSupportedDisplaysKHR( uint32_t* pDisplayCount, VkDisplayKHR* pDisplays) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8958,6 +9180,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayModePropertiesKHR( uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9010,6 +9233,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDisplayModeKHR( const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9062,6 +9286,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneCapabilitiesKHR( uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9108,6 +9333,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDisplayPlaneSurfaceKHR( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9163,6 +9389,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSharedSwapchainsKHR( const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9218,6 +9445,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateXlibSurfaceKHR( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9269,6 +9497,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceXlibPresentationSupportKHR( Display* dpy, VisualID visualID) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9309,6 +9538,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateXcbSurfaceKHR( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9360,6 +9590,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceXcbPresentationSupportKHR( xcb_connection_t* connection, xcb_visualid_t visual_id) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9400,6 +9631,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateWaylandSurfaceKHR( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9450,6 +9682,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display* display) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9489,6 +9722,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateAndroidSurfaceKHR( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9540,6 +9774,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateWin32SurfaceKHR( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9589,6 +9824,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceWin32PresentationSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9626,6 +9862,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceVideoCapabilitiesKHR( const VkVideoProfileInfoKHR* pVideoProfile, VkVideoCapabilitiesKHR* pCapabilities) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9671,6 +9908,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceVideoFormatPropertiesKHR( uint32_t* pVideoFormatPropertyCount, VkVideoFormatPropertiesKHR* pVideoFormatProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9717,6 +9955,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateVideoSessionKHR( const VkAllocationCallbacks* pAllocator, VkVideoSessionKHR* pVideoSession) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9767,6 +10006,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyVideoSessionKHR( VkVideoSessionKHR videoSession, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9806,6 +10046,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetVideoSessionMemoryRequirementsKHR( uint32_t* pMemoryRequirementsCount, VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9852,6 +10093,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindVideoSessionMemoryKHR( uint32_t bindSessionMemoryInfoCount, const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9895,6 +10137,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateVideoSessionParametersKHR( const VkAllocationCallbacks* pAllocator, VkVideoSessionParametersKHR* pVideoSessionParameters) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9948,6 +10191,7 @@ VKAPI_ATTR VkResult VKAPI_CALL UpdateVideoSessionParametersKHR( VkVideoSessionParametersKHR videoSessionParameters, const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9986,6 +10230,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyVideoSessionParametersKHR( VkVideoSessionParametersKHR videoSessionParameters, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10023,6 +10268,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginVideoCodingKHR( VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR* pBeginInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10059,6 +10305,7 @@ VKAPI_ATTR void VKAPI_CALL CmdEndVideoCodingKHR( VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR* pEndCodingInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10092,6 +10339,7 @@ VKAPI_ATTR void VKAPI_CALL CmdControlVideoCodingKHR( VkCommandBuffer commandBuffer, const VkVideoCodingControlInfoKHR* pCodingControlInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10125,6 +10373,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDecodeVideoKHR( VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR* pDecodeInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10161,6 +10410,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRenderingKHR( VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10196,6 +10446,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRenderingKHR( VKAPI_ATTR void VKAPI_CALL CmdEndRenderingKHR( VkCommandBuffer commandBuffer) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10228,6 +10479,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10261,6 +10513,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10295,6 +10548,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFormatProperties2KHR( VkFormat format, VkFormatProperties2* pFormatProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10330,6 +10584,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceImageFormatProperties2KHR( const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10374,6 +10629,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10408,6 +10664,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMemoryProperties2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10443,6 +10700,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties2KHR( uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10481,6 +10739,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceGroupPeerMemoryFeaturesKHR( uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10517,6 +10776,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDeviceMaskKHR( VkCommandBuffer commandBuffer, uint32_t deviceMask) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10555,6 +10815,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDispatchBaseKHR( uint32_t groupCountY, uint32_t groupCountZ) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10594,6 +10855,7 @@ VKAPI_ATTR void VKAPI_CALL TrimCommandPoolKHR( VkCommandPool commandPool, VkCommandPoolTrimFlags flags) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10629,6 +10891,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceGroupsKHR( uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10678,6 +10941,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalBufferPropertiesKHR( const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10713,6 +10977,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandleKHR( const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10761,6 +11026,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandlePropertiesKHR( HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10806,6 +11072,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryFdKHR( const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10854,6 +11121,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryFdPropertiesKHR( int fd, VkMemoryFdPropertiesKHR* pMemoryFdProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10899,6 +11167,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalSemaphorePropertiesKHR( const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10933,6 +11202,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreWin32HandleKHR( VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10973,6 +11243,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreWin32HandleKHR( const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11019,6 +11290,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreFdKHR( VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11059,6 +11331,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreFdKHR( const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11109,6 +11382,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetKHR( uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11151,6 +11425,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorUpdateTemplateKHR( const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11204,6 +11479,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDescriptorUpdateTemplateKHR( VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11243,6 +11519,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass2KHR( const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11293,6 +11570,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass2KHR( const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11331,6 +11609,7 @@ VKAPI_ATTR void VKAPI_CALL CmdNextSubpass2KHR( const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11365,6 +11644,7 @@ VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass2KHR( VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11398,6 +11678,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainStatusKHR( VkDevice device, VkSwapchainKHR swapchain) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11435,6 +11716,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalFencePropertiesKHR( const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11469,6 +11751,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ImportFenceWin32HandleKHR( VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11509,6 +11792,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetFenceWin32HandleKHR( const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11555,6 +11839,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ImportFenceFdKHR( VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11595,6 +11880,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetFenceFdKHR( const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11644,6 +11930,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceQueueFamilyPerformanceQuer VkPerformanceCounterKHR* pCounters, VkPerformanceCounterDescriptionKHR* pCounterDescriptions) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11690,6 +11977,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, uint32_t* pNumPasses) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11724,6 +12012,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireProfilingLockKHR( VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11759,6 +12048,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireProfilingLockKHR( VKAPI_ATTR void VKAPI_CALL ReleaseProfilingLockKHR( VkDevice device) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11792,6 +12082,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilities2KHR( const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkSurfaceCapabilities2KHR* pSurfaceCapabilities) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11840,6 +12131,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceFormats2KHR( uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11888,6 +12180,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayProperties2KHR( uint32_t* pPropertyCount, VkDisplayProperties2KHR* pProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11937,6 +12230,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPlaneProperties2KHR( uint32_t* pPropertyCount, VkDisplayPlaneProperties2KHR* pProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11987,6 +12281,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayModeProperties2KHR( uint32_t* pPropertyCount, VkDisplayModeProperties2KHR* pProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12037,6 +12332,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneCapabilities2KHR( const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, VkDisplayPlaneCapabilities2KHR* pCapabilities) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12084,6 +12380,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements2KHR( const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12122,6 +12419,7 @@ VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements2KHR( const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12161,6 +12459,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements2KHR( uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12201,6 +12500,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSamplerYcbcrConversionKHR( const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12251,6 +12551,7 @@ VKAPI_ATTR void VKAPI_CALL DestroySamplerYcbcrConversionKHR( VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12289,6 +12590,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory2KHR( uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12330,6 +12632,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory2KHR( uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12371,6 +12674,7 @@ VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutSupportKHR( const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12413,6 +12717,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectCountKHR( uint32_t maxDrawCount, uint32_t stride) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12456,6 +12761,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCountKHR( uint32_t maxDrawCount, uint32_t stride) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12495,6 +12801,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreCounterValueKHR( VkSemaphore semaphore, uint64_t* pValue) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12539,6 +12846,7 @@ VKAPI_ATTR VkResult VKAPI_CALL WaitSemaphoresKHR( const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12579,6 +12887,7 @@ VKAPI_ATTR VkResult VKAPI_CALL SignalSemaphoreKHR( VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12619,6 +12928,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceFragmentShadingRatesKHR( uint32_t* pFragmentShadingRateCount, VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12663,6 +12973,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetFragmentShadingRateKHR( const VkExtent2D* pFragmentSize, const VkFragmentShadingRateCombinerOpKHR combinerOps[2]) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12697,6 +13008,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRenderingAttachmentLocationsKHR( VkCommandBuffer commandBuffer, const VkRenderingAttachmentLocationInfoKHR* pLocationInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12730,6 +13042,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRenderingInputAttachmentIndicesKHR( VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfoKHR* pInputAttachmentIndexInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12765,6 +13078,7 @@ VKAPI_ATTR VkResult VKAPI_CALL WaitForPresentKHR( uint64_t presentId, uint64_t timeout) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12803,6 +13117,7 @@ VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetBufferDeviceAddressKHR( VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12842,6 +13157,7 @@ VKAPI_ATTR uint64_t VKAPI_CALL GetBufferOpaqueCaptureAddressKHR( VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12881,6 +13197,7 @@ VKAPI_ATTR uint64_t VKAPI_CALL GetDeviceMemoryOpaqueCaptureAddressKHR( VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12921,6 +13238,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDeferredOperationKHR( const VkAllocationCallbacks* pAllocator, VkDeferredOperationKHR* pDeferredOperation) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12970,6 +13288,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDeferredOperationKHR( VkDeferredOperationKHR operation, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13007,6 +13326,7 @@ VKAPI_ATTR uint32_t VKAPI_CALL GetDeferredOperationMaxConcurrencyKHR( VkDevice device, VkDeferredOperationKHR operation) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13043,6 +13363,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDeferredOperationResultKHR( VkDevice device, VkDeferredOperationKHR operation) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13079,6 +13400,7 @@ VKAPI_ATTR VkResult VKAPI_CALL DeferredOperationJoinKHR( VkDevice device, VkDeferredOperationKHR operation) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13117,6 +13439,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutablePropertiesKHR( uint32_t* pExecutableCount, VkPipelineExecutablePropertiesKHR* pProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13166,6 +13489,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutableStatisticsKHR( uint32_t* pStatisticCount, VkPipelineExecutableStatisticKHR* pStatistics) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13215,6 +13539,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutableInternalRepresentationsKHR( uint32_t* pInternalRepresentationCount, VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13263,6 +13588,7 @@ VKAPI_ATTR VkResult VKAPI_CALL MapMemory2KHR( const VkMemoryMapInfoKHR* pMemoryMapInfo, void** ppData) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13309,6 +13635,7 @@ VKAPI_ATTR VkResult VKAPI_CALL UnmapMemory2KHR( VkDevice device, const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13349,6 +13676,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceVideoEncodeQualityLevelPropertie const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13395,6 +13723,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetEncodedVideoSessionParametersKHR( size_t* pDataSize, void* pData) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13443,6 +13772,7 @@ VKAPI_ATTR void VKAPI_CALL CmdEncodeVideoKHR( VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13480,6 +13810,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetEvent2KHR( VkEvent event, const VkDependencyInfo* pDependencyInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13518,6 +13849,7 @@ VKAPI_ATTR void VKAPI_CALL CmdResetEvent2KHR( VkEvent event, VkPipelineStageFlags2 stageMask) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13554,6 +13886,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWaitEvents2KHR( const VkEvent* pEvents, const VkDependencyInfo* pDependencyInfos) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13592,6 +13925,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier2KHR( VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13630,6 +13964,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteTimestamp2KHR( VkQueryPool queryPool, uint32_t query) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13667,6 +14002,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit2KHR( const VkSubmitInfo2* pSubmits, VkFence fence) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13711,6 +14047,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteBufferMarker2AMD( VkDeviceSize dstOffset, uint32_t marker) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13748,6 +14085,7 @@ VKAPI_ATTR void VKAPI_CALL GetQueueCheckpointData2NV( uint32_t* pCheckpointDataCount, VkCheckpointData2NV* pCheckpointData) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13782,6 +14120,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer2KHR( VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13818,6 +14157,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImage2KHR( VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13854,6 +14194,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage2KHR( VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13890,6 +14231,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer2KHR( VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13926,6 +14268,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBlitImage2KHR( VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13962,6 +14305,7 @@ VKAPI_ATTR void VKAPI_CALL CmdResolveImage2KHR( VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13998,6 +14342,7 @@ VKAPI_ATTR void VKAPI_CALL CmdTraceRaysIndirect2KHR( VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14032,6 +14377,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceBufferMemoryRequirementsKHR( const VkDeviceBufferMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14067,6 +14413,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceImageMemoryRequirementsKHR( const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14106,6 +14453,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceImageSparseMemoryRequirementsKHR( uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14147,6 +14495,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindIndexBuffer2KHR( VkDeviceSize size, VkIndexType indexType) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14184,6 +14533,7 @@ VKAPI_ATTR void VKAPI_CALL GetRenderingAreaGranularityKHR( const VkRenderingAreaInfoKHR* pRenderingAreaInfo, VkExtent2D* pGranularity) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14219,6 +14569,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceImageSubresourceLayoutKHR( const VkDeviceImageSubresourceInfoKHR* pInfo, VkSubresourceLayout2KHR* pLayout) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14258,6 +14609,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout2KHR( const VkImageSubresource2KHR* pSubresource, VkSubresourceLayout2KHR* pLayout) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14294,6 +14646,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCooperativeMatrixPropertiesKHR( uint32_t* pPropertyCount, VkCooperativeMatrixPropertiesKHR* pProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14338,6 +14691,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLineStippleKHR( uint32_t lineStippleFactor, uint16_t lineStipplePattern) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14373,6 +14727,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCalibrateableTimeDomainsKHR( uint32_t* pTimeDomainCount, VkTimeDomainKHR* pTimeDomains) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14419,6 +14774,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetCalibratedTimestampsKHR( uint64_t* pTimestamps, uint64_t* pMaxDeviation) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14464,6 +14820,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorSets2KHR( VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14500,6 +14857,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPushConstants2KHR( VkCommandBuffer commandBuffer, const VkPushConstantsInfoKHR* pPushConstantsInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14536,6 +14894,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSet2KHR( VkCommandBuffer commandBuffer, const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14572,6 +14931,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDescriptorBufferOffsets2EXT( VkCommandBuffer commandBuffer, const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14608,6 +14968,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorBufferEmbeddedSamplers2EXT( VkCommandBuffer commandBuffer, const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14645,6 +15006,7 @@ VKAPI_ATTR void VKAPI_CALL FrameBoundaryANDROID( VkSemaphore semaphore, VkImage image) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14681,6 +15043,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDebugReportCallbackEXT( const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14731,6 +15094,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDebugReportCallbackEXT( VkDebugReportCallbackEXT callback, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14774,6 +15138,7 @@ VKAPI_ATTR void VKAPI_CALL DebugReportMessageEXT( const char* pLayerPrefix, const char* pMessage) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14813,6 +15178,7 @@ VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectTagEXT( VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14852,6 +15218,7 @@ VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectNameEXT( VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14891,6 +15258,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerBeginEXT( VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14923,6 +15291,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerBeginEXT( VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerEndEXT( VkCommandBuffer commandBuffer) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14955,6 +15324,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerInsertEXT( VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14992,6 +15362,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindTransformFeedbackBuffersEXT( const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15032,6 +15403,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginTransformFeedbackEXT( const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15071,6 +15443,7 @@ VKAPI_ATTR void VKAPI_CALL CmdEndTransformFeedbackEXT( const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15110,6 +15483,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginQueryIndexedEXT( VkQueryControlFlags flags, uint32_t index) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15148,6 +15522,7 @@ VKAPI_ATTR void VKAPI_CALL CmdEndQueryIndexedEXT( uint32_t query, uint32_t index) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15188,6 +15563,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectByteCountEXT( uint32_t counterOffset, uint32_t vertexStride) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15226,6 +15602,7 @@ VKAPI_ATTR uint32_t VKAPI_CALL GetImageViewHandleNVX( VkDevice device, const VkImageViewHandleInfoNVX* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15266,6 +15643,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetImageViewAddressNVX( VkImageView imageView, VkImageViewAddressPropertiesNVX* pProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15314,6 +15692,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectCountAMD( uint32_t maxDrawCount, uint32_t stride) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15357,6 +15736,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCountAMD( uint32_t maxDrawCount, uint32_t stride) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15399,6 +15779,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetShaderInfoAMD( size_t* pInfoSize, void* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15447,6 +15828,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateStreamDescriptorSurfaceGGP( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15502,6 +15884,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceExternalImageFormatPropertiesNV( VkExternalMemoryHandleTypeFlagsNV externalHandleType, VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15552,6 +15935,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandleNV( VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15598,6 +15982,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateViSurfaceNN( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15647,6 +16032,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginConditionalRenderingEXT( VkCommandBuffer commandBuffer, const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15682,6 +16068,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginConditionalRenderingEXT( VKAPI_ATTR void VKAPI_CALL CmdEndConditionalRenderingEXT( VkCommandBuffer commandBuffer) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15716,6 +16103,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewportWScalingNV( uint32_t viewportCount, const VkViewportWScalingNV* pViewportWScalings) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15751,6 +16139,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ReleaseDisplayEXT( VkPhysicalDevice physicalDevice, VkDisplayKHR display) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15788,6 +16177,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireXlibDisplayEXT( Display* dpy, VkDisplayKHR display) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15827,6 +16217,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetRandROutputDisplayEXT( RROutput rrOutput, VkDisplayKHR* pDisplay) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15877,6 +16268,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilities2EXT( VkSurfaceKHR surface, VkSurfaceCapabilities2EXT* pSurfaceCapabilities) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15921,6 +16313,7 @@ VKAPI_ATTR VkResult VKAPI_CALL DisplayPowerControlEXT( VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15960,6 +16353,7 @@ VKAPI_ATTR VkResult VKAPI_CALL RegisterDeviceEventEXT( const VkAllocationCallbacks* pAllocator, VkFence* pFence) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16012,6 +16406,7 @@ VKAPI_ATTR VkResult VKAPI_CALL RegisterDisplayEventEXT( const VkAllocationCallbacks* pAllocator, VkFence* pFence) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16064,6 +16459,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainCounterEXT( VkSurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16109,6 +16505,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetRefreshCycleDurationGOOGLE( VkSwapchainKHR swapchain, VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16154,6 +16551,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPastPresentationTimingGOOGLE( uint32_t* pPresentationTimingCount, VkPastPresentationTimingGOOGLE* pPresentationTimings) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16200,6 +16598,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDiscardRectangleEXT( uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16235,6 +16634,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDiscardRectangleEnableEXT( VkCommandBuffer commandBuffer, VkBool32 discardRectangleEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16268,6 +16668,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDiscardRectangleModeEXT( VkCommandBuffer commandBuffer, VkDiscardRectangleModeEXT discardRectangleMode) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16303,6 +16704,7 @@ VKAPI_ATTR void VKAPI_CALL SetHdrMetadataEXT( const VkSwapchainKHR* pSwapchains, const VkHdrMetadataEXT* pMetadata) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16340,6 +16742,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateIOSSurfaceMVK( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16391,6 +16794,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateMacOSSurfaceMVK( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16440,6 +16844,7 @@ VKAPI_ATTR VkResult VKAPI_CALL SetDebugUtilsObjectNameEXT( VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16481,6 +16886,7 @@ VKAPI_ATTR VkResult VKAPI_CALL SetDebugUtilsObjectTagEXT( VkDevice device, const VkDebugUtilsObjectTagInfoEXT* pTagInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16522,6 +16928,7 @@ VKAPI_ATTR void VKAPI_CALL QueueBeginDebugUtilsLabelEXT( VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16554,6 +16961,7 @@ VKAPI_ATTR void VKAPI_CALL QueueBeginDebugUtilsLabelEXT( VKAPI_ATTR void VKAPI_CALL QueueEndDebugUtilsLabelEXT( VkQueue queue) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16586,6 +16994,7 @@ VKAPI_ATTR void VKAPI_CALL QueueInsertDebugUtilsLabelEXT( VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16619,6 +17028,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginDebugUtilsLabelEXT( VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16651,6 +17061,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginDebugUtilsLabelEXT( VKAPI_ATTR void VKAPI_CALL CmdEndDebugUtilsLabelEXT( VkCommandBuffer commandBuffer) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16683,6 +17094,7 @@ VKAPI_ATTR void VKAPI_CALL CmdInsertDebugUtilsLabelEXT( VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16718,6 +17130,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDebugUtilsMessengerEXT( const VkAllocationCallbacks* pAllocator, VkDebugUtilsMessengerEXT* pMessenger) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16768,6 +17181,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDebugUtilsMessengerEXT( VkDebugUtilsMessengerEXT messenger, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16807,6 +17221,7 @@ VKAPI_ATTR void VKAPI_CALL SubmitDebugUtilsMessageEXT( VkDebugUtilsMessageTypeFlagsEXT messageTypes, const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16843,6 +17258,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16887,6 +17303,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryAndroidHardwareBufferANDROID( const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16933,6 +17350,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetSampleLocationsEXT( VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16967,6 +17385,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMultisamplePropertiesEXT( VkSampleCountFlagBits samples, VkMultisamplePropertiesEXT* pMultisampleProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17002,6 +17421,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetImageDrmFormatModifierPropertiesEXT( VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17047,6 +17467,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateValidationCacheEXT( const VkAllocationCallbacks* pAllocator, VkValidationCacheEXT* pValidationCache) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17097,6 +17518,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyValidationCacheEXT( VkValidationCacheEXT validationCache, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17136,6 +17558,7 @@ VKAPI_ATTR VkResult VKAPI_CALL MergeValidationCachesEXT( uint32_t srcCacheCount, const VkValidationCacheEXT* pSrcCaches) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17176,6 +17599,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetValidationCacheDataEXT( size_t* pDataSize, void* pData) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17221,6 +17645,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindShadingRateImageNV( VkImageView imageView, VkImageLayout imageLayout) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17257,6 +17682,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewportShadingRatePaletteNV( uint32_t viewportCount, const VkShadingRatePaletteNV* pShadingRatePalettes) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17294,6 +17720,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCoarseSampleOrderNV( uint32_t customSampleOrderCount, const VkCoarseSampleOrderCustomNV* pCustomSampleOrders) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17331,6 +17758,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateAccelerationStructureNV( const VkAllocationCallbacks* pAllocator, VkAccelerationStructureNV* pAccelerationStructure) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17384,6 +17812,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyAccelerationStructureNV( VkAccelerationStructureNV accelerationStructure, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17422,6 +17851,7 @@ VKAPI_ATTR void VKAPI_CALL GetAccelerationStructureMemoryRequirementsNV( const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17460,6 +17890,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindAccelerationStructureMemoryNV( uint32_t bindInfoCount, const VkBindAccelerationStructureMemoryInfoNV* pBindInfos) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17507,6 +17938,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBuildAccelerationStructureNV( VkBuffer scratch, VkDeviceSize scratchOffset) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17552,6 +17984,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyAccelerationStructureNV( VkAccelerationStructureNV src, VkCopyAccelerationStructureModeKHR mode) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17600,6 +18033,7 @@ VKAPI_ATTR void VKAPI_CALL CmdTraceRaysNV( uint32_t height, uint32_t depth) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17650,6 +18084,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetRayTracingShaderGroupHandlesKHR( size_t dataSize, void* pData) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17700,6 +18135,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetRayTracingShaderGroupHandlesNV( size_t dataSize, void* pData) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17748,6 +18184,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetAccelerationStructureHandleNV( size_t dataSize, void* pData) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17796,6 +18233,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteAccelerationStructuresPropertiesNV( VkQueryPool queryPool, uint32_t firstQuery) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17834,6 +18272,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CompileDeferredNV( VkPipeline pipeline, uint32_t shader) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17873,6 +18312,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryHostPointerPropertiesEXT( const void* pHostPointer, VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17920,6 +18360,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteBufferMarkerAMD( VkDeviceSize dstOffset, uint32_t marker) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17957,6 +18398,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCalibrateableTimeDomainsEXT( uint32_t* pTimeDomainCount, VkTimeDomainKHR* pTimeDomains) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18003,6 +18445,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetCalibratedTimestampsEXT( uint64_t* pTimestamps, uint64_t* pMaxDeviation) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18049,6 +18492,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksNV( uint32_t taskCount, uint32_t firstTask) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18086,6 +18530,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectNV( uint32_t drawCount, uint32_t stride) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18127,6 +18572,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectCountNV( uint32_t maxDrawCount, uint32_t stride) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18167,6 +18613,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetExclusiveScissorEnableNV( uint32_t exclusiveScissorCount, const VkBool32* pExclusiveScissorEnables) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18204,6 +18651,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetExclusiveScissorNV( uint32_t exclusiveScissorCount, const VkRect2D* pExclusiveScissors) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18239,6 +18687,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCheckpointNV( VkCommandBuffer commandBuffer, const void* pCheckpointMarker) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18273,6 +18722,7 @@ VKAPI_ATTR void VKAPI_CALL GetQueueCheckpointDataNV( uint32_t* pCheckpointDataCount, VkCheckpointDataNV* pCheckpointData) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18307,6 +18757,7 @@ VKAPI_ATTR VkResult VKAPI_CALL InitializePerformanceApiINTEL( VkDevice device, const VkInitializePerformanceApiInfoINTEL* pInitializeInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18342,6 +18793,7 @@ VKAPI_ATTR VkResult VKAPI_CALL InitializePerformanceApiINTEL( VKAPI_ATTR void VKAPI_CALL UninitializePerformanceApiINTEL( VkDevice device) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18374,6 +18826,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CmdSetPerformanceMarkerINTEL( VkCommandBuffer commandBuffer, const VkPerformanceMarkerInfoINTEL* pMarkerInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18410,6 +18863,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CmdSetPerformanceStreamMarkerINTEL( VkCommandBuffer commandBuffer, const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18446,6 +18900,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CmdSetPerformanceOverrideINTEL( VkCommandBuffer commandBuffer, const VkPerformanceOverrideInfoINTEL* pOverrideInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18483,6 +18938,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquirePerformanceConfigurationINTEL( const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, VkPerformanceConfigurationINTEL* pConfiguration) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18531,6 +18987,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ReleasePerformanceConfigurationINTEL( VkDevice device, VkPerformanceConfigurationINTEL configuration) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18570,6 +19027,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueSetPerformanceConfigurationINTEL( VkQueue queue, VkPerformanceConfigurationINTEL configuration) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18607,6 +19065,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPerformanceParameterINTEL( VkPerformanceParameterTypeINTEL parameter, VkPerformanceValueINTEL* pValue) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18651,6 +19110,7 @@ VKAPI_ATTR void VKAPI_CALL SetLocalDimmingAMD( VkSwapchainKHR swapChain, VkBool32 localDimmingEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18687,6 +19147,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateImagePipeSurfaceFUCHSIA( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18738,6 +19199,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateMetalSurfaceEXT( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18787,6 +19249,7 @@ VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetBufferDeviceAddressEXT( VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18827,6 +19290,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceToolPropertiesEXT( uint32_t* pToolCount, VkPhysicalDeviceToolProperties* pToolProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18871,6 +19335,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCooperativeMatrixPropertiesNV( uint32_t* pPropertyCount, VkCooperativeMatrixPropertiesNV* pProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18915,6 +19380,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSupportedFramebufferMixedSamples uint32_t* pCombinationCount, VkFramebufferMixedSamplesCombinationNV* pCombinations) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18960,6 +19426,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModes2EXT( uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19007,6 +19474,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireFullScreenExclusiveModeEXT( VkDevice device, VkSwapchainKHR swapchain) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19043,6 +19511,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ReleaseFullScreenExclusiveModeEXT( VkDevice device, VkSwapchainKHR swapchain) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19080,6 +19549,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDeviceGroupSurfacePresentModes2EXT( const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19128,6 +19598,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateHeadlessSurfaceEXT( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19178,6 +19649,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLineStippleEXT( uint32_t lineStippleFactor, uint16_t lineStipplePattern) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19214,6 +19686,7 @@ VKAPI_ATTR void VKAPI_CALL ResetQueryPoolEXT( uint32_t firstQuery, uint32_t queryCount) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19249,6 +19722,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCullModeEXT( VkCommandBuffer commandBuffer, VkCullModeFlags cullMode) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19282,6 +19756,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetFrontFaceEXT( VkCommandBuffer commandBuffer, VkFrontFace frontFace) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19315,6 +19790,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetPrimitiveTopologyEXT( VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19349,6 +19825,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewportWithCountEXT( uint32_t viewportCount, const VkViewport* pViewports) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19384,6 +19861,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetScissorWithCountEXT( uint32_t scissorCount, const VkRect2D* pScissors) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19423,6 +19901,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers2EXT( const VkDeviceSize* pSizes, const VkDeviceSize* pStrides) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19461,6 +19940,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthTestEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthTestEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19494,6 +19974,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthWriteEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19527,6 +20008,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthCompareOpEXT( VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19560,6 +20042,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBoundsTestEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19593,6 +20076,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilTestEnableEXT( VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19630,6 +20114,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilOpEXT( VkStencilOp depthFailOp, VkCompareOp compareOp) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19667,6 +20152,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyMemoryToImageEXT( VkDevice device, const VkCopyMemoryToImageInfoEXT* pCopyMemoryToImageInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19706,6 +20192,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyImageToMemoryEXT( VkDevice device, const VkCopyImageToMemoryInfoEXT* pCopyImageToMemoryInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19745,6 +20232,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyImageToImageEXT( VkDevice device, const VkCopyImageToImageInfoEXT* pCopyImageToImageInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19785,6 +20273,7 @@ VKAPI_ATTR VkResult VKAPI_CALL TransitionImageLayoutEXT( uint32_t transitionCount, const VkHostImageLayoutTransitionInfoEXT* pTransitions) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19827,6 +20316,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout2EXT( const VkImageSubresource2KHR* pSubresource, VkSubresourceLayout2KHR* pLayout) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19862,6 +20352,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ReleaseSwapchainImagesEXT( VkDevice device, const VkReleaseSwapchainImagesInfoEXT* pReleaseInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19902,6 +20393,7 @@ VKAPI_ATTR void VKAPI_CALL GetGeneratedCommandsMemoryRequirementsNV( const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2* pMemoryRequirements) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19939,6 +20431,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPreprocessGeneratedCommandsNV( VkCommandBuffer commandBuffer, const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19976,6 +20469,7 @@ VKAPI_ATTR void VKAPI_CALL CmdExecuteGeneratedCommandsNV( VkBool32 isPreprocessed, const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20015,6 +20509,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindPipelineShaderGroupNV( VkPipeline pipeline, uint32_t groupIndex) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20052,6 +20547,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateIndirectCommandsLayoutNV( const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutNV* pIndirectCommandsLayout) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20105,6 +20601,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyIndirectCommandsLayoutNV( VkIndirectCommandsLayoutNV indirectCommandsLayout, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20142,6 +20639,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBias2EXT( VkCommandBuffer commandBuffer, const VkDepthBiasInfoEXT* pDepthBiasInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20176,6 +20674,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireDrmDisplayEXT( int32_t drmFd, VkDisplayKHR display) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20215,6 +20714,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDrmDisplayEXT( uint32_t connectorId, VkDisplayKHR* display) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20266,6 +20766,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePrivateDataSlotEXT( const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20316,6 +20817,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyPrivateDataSlotEXT( VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20356,6 +20858,7 @@ VKAPI_ATTR VkResult VKAPI_CALL SetPrivateDataEXT( VkPrivateDataSlot privateDataSlot, uint64_t data) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20398,6 +20901,7 @@ VKAPI_ATTR void VKAPI_CALL GetPrivateDataEXT( VkPrivateDataSlot privateDataSlot, uint64_t* pData) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20435,6 +20939,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetFragmentShadingRateEnumNV( VkFragmentShadingRateNV shadingRate, const VkFragmentShadingRateCombinerOpKHR combinerOps[2]) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20470,6 +20975,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDeviceFaultInfoEXT( VkDeviceFaultCountsEXT* pFaultCounts, VkDeviceFaultInfoEXT* pFaultInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20513,6 +21019,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireWinrtDisplayNV( VkPhysicalDevice physicalDevice, VkDisplayKHR display) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20550,6 +21057,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetWinrtDisplayNV( uint32_t deviceRelativeId, VkDisplayKHR* pDisplay) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20600,6 +21108,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDirectFBSurfaceEXT( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20650,6 +21159,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceDirectFBPresentationSupportEXT( uint32_t queueFamilyIndex, IDirectFB* dfb) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20690,6 +21200,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetVertexInputEXT( uint32_t vertexAttributeDescriptionCount, const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20727,6 +21238,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryZirconHandleFUCHSIA( const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20775,6 +21287,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryZirconHandlePropertiesFUCHSIA( zx_handle_t zirconHandle, VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20819,6 +21332,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreZirconHandleFUCHSIA( VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20859,6 +21373,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreZirconHandleFUCHSIA( const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20906,6 +21421,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindInvocationMaskHUAWEI( VkImageView imageView, VkImageLayout imageLayout) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20941,6 +21457,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryRemoteAddressNV( const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, VkRemoteAddressNV* pAddress) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20987,6 +21504,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetPatchControlPointsEXT( VkCommandBuffer commandBuffer, uint32_t patchControlPoints) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21020,6 +21538,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRasterizerDiscardEnableEXT( VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21053,6 +21572,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBiasEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21086,6 +21606,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLogicOpEXT( VkCommandBuffer commandBuffer, VkLogicOp logicOp) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21119,6 +21640,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetPrimitiveRestartEnableEXT( VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21154,6 +21676,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateScreenSurfaceQNX( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21204,6 +21727,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceScreenPresentationSupportQNX( uint32_t queueFamilyIndex, struct _screen_window* window) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21242,6 +21766,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetColorWriteEn uint32_t attachmentCount, const VkBool32* pColorWriteEnables) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21280,6 +21805,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMultiEXT( uint32_t firstInstance, uint32_t stride) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21322,6 +21848,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMultiIndexedEXT( uint32_t stride, const int32_t* pVertexOffset) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21362,6 +21889,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateMicromapEXT( const VkAllocationCallbacks* pAllocator, VkMicromapEXT* pMicromap) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21415,6 +21943,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyMicromapEXT( VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21453,6 +21982,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBuildMicromapsEXT( uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21492,6 +22022,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BuildMicromapsEXT( uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21534,6 +22065,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyMicromapEXT( VkDeferredOperationKHR deferredOperation, const VkCopyMicromapInfoEXT* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21575,6 +22107,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyMicromapToMemoryEXT( VkDeferredOperationKHR deferredOperation, const VkCopyMicromapToMemoryInfoEXT* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21616,6 +22149,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyMemoryToMicromapEXT( VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToMicromapInfoEXT* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21661,6 +22195,7 @@ VKAPI_ATTR VkResult VKAPI_CALL WriteMicromapsPropertiesEXT( void* pData, size_t stride) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21708,6 +22243,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyMicromapEXT( VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21744,6 +22280,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyMicromapToMemoryEXT( VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21780,6 +22317,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyMemoryToMicromapEXT( VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21820,6 +22358,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteMicromapsPropertiesEXT( VkQueryPool queryPool, uint32_t firstQuery) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21858,6 +22397,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceMicromapCompatibilityEXT( const VkMicromapVersionInfoEXT* pVersionInfo, VkAccelerationStructureCompatibilityKHR* pCompatibility) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21894,6 +22434,7 @@ VKAPI_ATTR void VKAPI_CALL GetMicromapBuildSizesEXT( const VkMicromapBuildInfoEXT* pBuildInfo, VkMicromapBuildSizesInfoEXT* pSizeInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21934,6 +22475,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawClusterHUAWEI( uint32_t groupCountY, uint32_t groupCountZ) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21970,6 +22512,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawClusterIndirectHUAWEI( VkBuffer buffer, VkDeviceSize offset) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22005,6 +22548,7 @@ VKAPI_ATTR void VKAPI_CALL SetDeviceMemoryPriorityEXT( VkDeviceMemory memory, float priority) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22040,6 +22584,7 @@ VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutHostMappingInfoVALVE( const VkDescriptorSetBindingReferenceVALVE* pBindingReference, VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22078,6 +22623,7 @@ VKAPI_ATTR void VKAPI_CALL GetDescriptorSetHostMappingVALVE( VkDescriptorSet descriptorSet, void** ppData) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22113,6 +22659,7 @@ VKAPI_ATTR void VKAPI_CALL GetPipelineIndirectMemoryRequirementsNV( const VkComputePipelineCreateInfo* pCreateInfo, VkMemoryRequirements2* pMemoryRequirements) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22151,6 +22698,7 @@ VKAPI_ATTR void VKAPI_CALL CmdUpdatePipelineIndirectBufferNV( VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22185,6 +22733,7 @@ VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetPipelineIndirectDeviceAddressNV( VkDevice device, const VkPipelineIndirectDeviceAddressInfoNV* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22224,6 +22773,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthClampEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthClampEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22257,6 +22807,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetPolygonModeEXT( VkCommandBuffer commandBuffer, VkPolygonMode polygonMode) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22290,6 +22841,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRasterizationSamplesEXT( VkCommandBuffer commandBuffer, VkSampleCountFlagBits rasterizationSamples) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22324,6 +22876,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetSampleMaskEXT( VkSampleCountFlagBits samples, const VkSampleMask* pSampleMask) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22358,6 +22911,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetAlphaToCoverageEnableEXT( VkCommandBuffer commandBuffer, VkBool32 alphaToCoverageEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22391,6 +22945,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetAlphaToOneEnableEXT( VkCommandBuffer commandBuffer, VkBool32 alphaToOneEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22424,6 +22979,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLogicOpEnableEXT( VkCommandBuffer commandBuffer, VkBool32 logicOpEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22459,6 +23015,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetColorBlendEnableEXT( uint32_t attachmentCount, const VkBool32* pColorBlendEnables) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22496,6 +23053,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetColorBlendEquationEXT( uint32_t attachmentCount, const VkColorBlendEquationEXT* pColorBlendEquations) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22533,6 +23091,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetColorWriteMaskEXT( uint32_t attachmentCount, const VkColorComponentFlags* pColorWriteMasks) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22568,6 +23127,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetTessellationDomainOriginEXT( VkCommandBuffer commandBuffer, VkTessellationDomainOrigin domainOrigin) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22601,6 +23161,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRasterizationStreamEXT( VkCommandBuffer commandBuffer, uint32_t rasterizationStream) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22634,6 +23195,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetConservativeRasterizationModeEXT( VkCommandBuffer commandBuffer, VkConservativeRasterizationModeEXT conservativeRasterizationMode) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22667,6 +23229,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetExtraPrimitiveOverestimationSizeEXT( VkCommandBuffer commandBuffer, float extraPrimitiveOverestimationSize) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22700,6 +23263,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthClipEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthClipEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22733,6 +23297,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetSampleLocationsEnableEXT( VkCommandBuffer commandBuffer, VkBool32 sampleLocationsEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22768,6 +23333,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetColorBlendAdvancedEXT( uint32_t attachmentCount, const VkColorBlendAdvancedEXT* pColorBlendAdvanced) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22803,6 +23369,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetProvokingVertexModeEXT( VkCommandBuffer commandBuffer, VkProvokingVertexModeEXT provokingVertexMode) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22836,6 +23403,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLineRasterizationModeEXT( VkCommandBuffer commandBuffer, VkLineRasterizationModeEXT lineRasterizationMode) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22869,6 +23437,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLineStippleEnableEXT( VkCommandBuffer commandBuffer, VkBool32 stippledLineEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22902,6 +23471,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthClipNegativeOneToOneEXT( VkCommandBuffer commandBuffer, VkBool32 negativeOneToOne) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22935,6 +23505,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewportWScalingEnableNV( VkCommandBuffer commandBuffer, VkBool32 viewportWScalingEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22970,6 +23541,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewportSwizzleNV( uint32_t viewportCount, const VkViewportSwizzleNV* pViewportSwizzles) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23005,6 +23577,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCoverageToColorEnableNV( VkCommandBuffer commandBuffer, VkBool32 coverageToColorEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23038,6 +23611,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCoverageToColorLocationNV( VkCommandBuffer commandBuffer, uint32_t coverageToColorLocation) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23071,6 +23645,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCoverageModulationModeNV( VkCommandBuffer commandBuffer, VkCoverageModulationModeNV coverageModulationMode) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23104,6 +23679,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCoverageModulationTableEnableNV( VkCommandBuffer commandBuffer, VkBool32 coverageModulationTableEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23138,6 +23714,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCoverageModulationTableNV( uint32_t coverageModulationTableCount, const float* pCoverageModulationTable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23172,6 +23749,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetShadingRateImageEnableNV( VkCommandBuffer commandBuffer, VkBool32 shadingRateImageEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23205,6 +23783,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRepresentativeFragmentTestEnableNV( VkCommandBuffer commandBuffer, VkBool32 representativeFragmentTestEnable) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23238,6 +23817,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCoverageReductionModeNV( VkCommandBuffer commandBuffer, VkCoverageReductionModeNV coverageReductionMode) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23272,6 +23852,7 @@ VKAPI_ATTR void VKAPI_CALL GetShaderModuleIdentifierEXT( VkShaderModule shaderModule, VkShaderModuleIdentifierEXT* pIdentifier) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23307,6 +23888,7 @@ VKAPI_ATTR void VKAPI_CALL GetShaderModuleCreateInfoIdentifierEXT( const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModuleIdentifierEXT* pIdentifier) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23346,6 +23928,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceOpticalFlowImageFormatsNV( uint32_t* pFormatCount, VkOpticalFlowImageFormatPropertiesNV* pImageFormatProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23392,6 +23975,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateOpticalFlowSessionNV( const VkAllocationCallbacks* pAllocator, VkOpticalFlowSessionNV* pSession) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23442,6 +24026,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyOpticalFlowSessionNV( VkOpticalFlowSessionNV session, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23482,6 +24067,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindOpticalFlowSessionImageNV( VkImageView view, VkImageLayout layout) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23522,6 +24108,7 @@ VKAPI_ATTR void VKAPI_CALL CmdOpticalFlowExecuteNV( VkOpticalFlowSessionNV session, const VkOpticalFlowExecuteInfoNV* pExecuteInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23559,6 +24146,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateShadersEXT( const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23613,6 +24201,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyShaderEXT( VkShaderEXT shader, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23652,6 +24241,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetShaderBinaryDataEXT( size_t* pDataSize, void* pData) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23698,6 +24288,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindShadersEXT( const VkShaderStageFlagBits* pStages, const VkShaderEXT* pShaders) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23735,6 +24326,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetFramebufferTilePropertiesQCOM( uint32_t* pPropertiesCount, VkTilePropertiesQCOM* pProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23780,6 +24372,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDynamicRenderingTilePropertiesQCOM( const VkRenderingInfo* pRenderingInfo, VkTilePropertiesQCOM* pProperties) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23827,6 +24420,7 @@ VKAPI_ATTR VkResult VKAPI_CALL SetLatencySleepModeNV( VkSwapchainKHR swapchain, const VkLatencySleepModeInfoNV* pSleepModeInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23865,6 +24459,7 @@ VKAPI_ATTR VkResult VKAPI_CALL LatencySleepNV( VkSwapchainKHR swapchain, const VkLatencySleepInfoNV* pSleepInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23906,6 +24501,7 @@ VKAPI_ATTR void VKAPI_CALL SetLatencyMarkerNV( VkSwapchainKHR swapchain, const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23941,6 +24537,7 @@ VKAPI_ATTR void VKAPI_CALL GetLatencyTimingsNV( VkSwapchainKHR swapchain, VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23975,6 +24572,7 @@ VKAPI_ATTR void VKAPI_CALL QueueNotifyOutOfBandNV( VkQueue queue, const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24008,6 +24606,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetAttachmentFeedbackLoopEnableEXT( VkCommandBuffer commandBuffer, VkImageAspectFlags aspectMask) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24043,6 +24642,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateAccelerationStructureKHR( const VkAllocationCallbacks* pAllocator, VkAccelerationStructureKHR* pAccelerationStructure) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24088,6 +24688,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyAccelerationStructureKHR( VkAccelerationStructureKHR accelerationStructure, const VkAllocationCallbacks* pAllocator) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24127,6 +24728,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBuildAccelerationStructuresKHR( const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24166,6 +24768,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBuildAccelerationStructuresIndirectKHR( const uint32_t* pIndirectStrides, const uint32_t* const* ppMaxPrimitiveCounts) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24207,6 +24810,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyAccelerationStructureToMemoryKHR( VkDeferredOperationKHR deferredOperation, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24248,6 +24852,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyMemoryToAccelerationStructureKHR( VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24293,6 +24898,7 @@ VKAPI_ATTR VkResult VKAPI_CALL WriteAccelerationStructuresPropertiesKHR( void* pData, size_t stride) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24340,6 +24946,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyAccelerationStructureKHR( VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureInfoKHR* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24376,6 +24983,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyAccelerationStructureToMemoryKHR( VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24412,6 +25020,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyMemoryToAccelerationStructureKHR( VkCommandBuffer commandBuffer, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24448,6 +25057,7 @@ VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetAccelerationStructureDeviceAddressKHR( VkDevice device, const VkAccelerationStructureDeviceAddressInfoKHR* pInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24491,6 +25101,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteAccelerationStructuresPropertiesKHR( VkQueryPool queryPool, uint32_t firstQuery) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24529,6 +25140,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceAccelerationStructureCompatibilityKHR( const VkAccelerationStructureVersionInfoKHR* pVersionInfo, VkAccelerationStructureCompatibilityKHR* pCompatibility) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24566,6 +25178,7 @@ VKAPI_ATTR void VKAPI_CALL GetAccelerationStructureBuildSizesKHR( const uint32_t* pMaxPrimitiveCounts, VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24611,6 +25224,7 @@ VKAPI_ATTR void VKAPI_CALL CmdTraceRaysKHR( uint32_t height, uint32_t depth) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24654,6 +25268,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetRayTracingCaptureReplayShaderGroupHandlesKHR( size_t dataSize, void* pData) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24704,6 +25319,7 @@ VKAPI_ATTR void VKAPI_CALL CmdTraceRaysIndirectKHR( const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, VkDeviceAddress indirectDeviceAddress) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24743,6 +25359,7 @@ VKAPI_ATTR VkDeviceSize VKAPI_CALL GetRayTracingShaderGroupStackSizeKHR( uint32_t group, VkShaderGroupShaderKHR groupShader) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24781,6 +25398,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRayTracingPipelineStackSizeKHR( VkCommandBuffer commandBuffer, uint32_t pipelineStackSize) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24816,6 +25434,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksEXT( uint32_t groupCountY, uint32_t groupCountZ) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24854,6 +25473,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectEXT( uint32_t drawCount, uint32_t stride) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24895,6 +25515,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectCountEXT( uint32_t maxDrawCount, uint32_t stride) { +GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); diff --git a/framework/generated/generated_vulkan_replay_consumer.cpp b/framework/generated/generated_vulkan_replay_consumer.cpp index 61734cd1a7..7070e9530a 100644 --- a/framework/generated/generated_vulkan_replay_consumer.cpp +++ b/framework/generated/generated_vulkan_replay_consumer.cpp @@ -48,9 +48,11 @@ void VulkanReplayConsumer::Process_vkCreateInstance( StructPointerDecoder* pAllocator, HandlePointerDecoder* pInstance) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) if (!pInstance->IsNull()) { pInstance->SetHandleLength(1); } InstanceInfo handle_info; pInstance->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pInstance->GetPointer(), VK_OBJECT_TYPE_INSTANCE); VkResult replay_result = OverrideCreateInstance(returnValue, pCreateInfo, pAllocator, pInstance); CheckResult("vkCreateInstance", returnValue, replay_result, call_info); @@ -63,6 +65,7 @@ void VulkanReplayConsumer::Process_vkDestroyInstance( format::HandleId instance, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -77,10 +80,12 @@ void VulkanReplayConsumer::Process_vkEnumeratePhysicalDevices( PointerDecoder* pPhysicalDeviceCount, HandlePointerDecoder* pPhysicalDevices) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); pPhysicalDeviceCount->IsNull() ? nullptr : pPhysicalDeviceCount->AllocateOutputData(1, GetOutputArrayCount("vkEnumeratePhysicalDevices", returnValue, instance, kInstanceArrayEnumeratePhysicalDevices, pPhysicalDeviceCount, pPhysicalDevices, &VulkanObjectInfoTable::GetInstanceInfo)); if (!pPhysicalDevices->IsNull()) { pPhysicalDevices->SetHandleLength(*pPhysicalDeviceCount->GetOutputPointer()); } std::vector handle_info(*pPhysicalDeviceCount->GetOutputPointer()); + ForwardIdsToCaptureLayer(pPhysicalDevices->GetPointer(), pPhysicalDevices->GetLength(), pPhysicalDevices->GetHandlePointer(), *pPhysicalDeviceCount->GetOutputPointer(), VK_OBJECT_TYPE_PHYSICAL_DEVICE); for (size_t i = 0; i < *pPhysicalDeviceCount->GetOutputPointer(); ++i) { pPhysicalDevices->SetConsumerData(i, &handle_info[i]); } VkResult replay_result = OverrideEnumeratePhysicalDevices(GetInstanceTable(in_instance->handle)->EnumeratePhysicalDevices, returnValue, in_instance, pPhysicalDeviceCount, pPhysicalDevices); @@ -95,6 +100,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceFeatures( format::HandleId physicalDevice, StructPointerDecoder* pFeatures) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkPhysicalDeviceFeatures* out_pFeatures = pFeatures->IsNull() ? nullptr : pFeatures->AllocateOutputData(1); @@ -107,6 +113,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceFormatProperties( VkFormat format, StructPointerDecoder* pFormatProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkFormatProperties* out_pFormatProperties = pFormatProperties->IsNull() ? nullptr : pFormatProperties->AllocateOutputData(1); @@ -124,6 +131,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceImageFormatProperties( VkImageCreateFlags flags, StructPointerDecoder* pImageFormatProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkImageFormatProperties* out_pImageFormatProperties = pImageFormatProperties->IsNull() ? nullptr : pImageFormatProperties->AllocateOutputData(1); @@ -136,6 +144,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceProperties( format::HandleId physicalDevice, StructPointerDecoder* pProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(1); @@ -148,6 +157,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceQueueFamilyProperties( PointerDecoder* pQueueFamilyPropertyCount, StructPointerDecoder* pQueueFamilyProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pQueueFamilyPropertyCount = pQueueFamilyPropertyCount->IsNull() ? nullptr : pQueueFamilyPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceQueueFamilyProperties", VK_SUCCESS, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceQueueFamilyProperties, pQueueFamilyPropertyCount, pQueueFamilyProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkQueueFamilyProperties* out_pQueueFamilyProperties = pQueueFamilyProperties->IsNull() ? nullptr : pQueueFamilyProperties->AllocateOutputData(*out_pQueueFamilyPropertyCount); @@ -162,6 +172,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceMemoryProperties( format::HandleId physicalDevice, StructPointerDecoder* pMemoryProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); pMemoryProperties->IsNull() ? nullptr : pMemoryProperties->AllocateOutputData(1); @@ -176,12 +187,14 @@ void VulkanReplayConsumer::Process_vkCreateDevice( StructPointerDecoder* pAllocator, HandlePointerDecoder* pDevice) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); if (!pDevice->IsNull()) { pDevice->SetHandleLength(1); } DeviceInfo handle_info; pDevice->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pDevice->GetPointer(), VK_OBJECT_TYPE_DEVICE); VkResult replay_result = OverrideCreateDevice(returnValue, in_physicalDevice, pCreateInfo, pAllocator, pDevice); CheckResult("vkCreateDevice", returnValue, replay_result, call_info); @@ -194,6 +207,7 @@ void VulkanReplayConsumer::Process_vkDestroyDevice( format::HandleId device, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); OverrideDestroyDevice(GetDeviceTable(in_device->handle)->DestroyDevice, in_device, pAllocator); @@ -207,10 +221,12 @@ void VulkanReplayConsumer::Process_vkGetDeviceQueue( uint32_t queueIndex, HandlePointerDecoder* pQueue) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); if (!pQueue->IsNull()) { pQueue->SetHandleLength(1); } QueueInfo handle_info; pQueue->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pQueue->GetPointer(), VK_OBJECT_TYPE_QUEUE); OverrideGetDeviceQueue(GetDeviceTable(in_device->handle)->GetDeviceQueue, in_device, queueFamilyIndex, queueIndex, pQueue); @@ -225,6 +241,7 @@ void VulkanReplayConsumer::Process_vkQueueSubmit( StructPointerDecoder* pSubmits, format::HandleId fence) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_queue = GetObjectInfoTable().GetQueueInfo(queue); MapStructArrayHandles(pSubmits->GetMetaStructPointer(), pSubmits->GetLength(), GetObjectInfoTable()); @@ -239,6 +256,7 @@ void VulkanReplayConsumer::Process_vkQueueWaitIdle( VkResult returnValue, format::HandleId queue) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkQueue in_queue = MapHandle(queue, &VulkanObjectInfoTable::GetQueueInfo); VkResult replay_result = GetDeviceTable(in_queue)->QueueWaitIdle(in_queue); @@ -250,6 +268,7 @@ void VulkanReplayConsumer::Process_vkDeviceWaitIdle( VkResult returnValue, format::HandleId device) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkResult replay_result = GetDeviceTable(in_device)->DeviceWaitIdle(in_device); @@ -264,12 +283,14 @@ void VulkanReplayConsumer::Process_vkAllocateMemory( StructPointerDecoder* pAllocator, HandlePointerDecoder* pMemory) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pAllocateInfo->GetMetaStructPointer(), GetObjectInfoTable()); if (!pMemory->IsNull()) { pMemory->SetHandleLength(1); } DeviceMemoryInfo handle_info; pMemory->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pMemory->GetPointer(), VK_OBJECT_TYPE_DEVICE_MEMORY); VkResult replay_result = OverrideAllocateMemory(GetDeviceTable(in_device->handle)->AllocateMemory, returnValue, in_device, pAllocateInfo, pAllocator, pMemory); CheckResult("vkAllocateMemory", returnValue, replay_result, call_info); @@ -283,6 +304,7 @@ void VulkanReplayConsumer::Process_vkFreeMemory( format::HandleId memory, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_memory = GetObjectInfoTable().GetDeviceMemoryInfo(memory); @@ -300,6 +322,7 @@ void VulkanReplayConsumer::Process_vkMapMemory( VkMemoryMapFlags flags, PointerDecoder* ppData) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_memory = GetObjectInfoTable().GetDeviceMemoryInfo(memory); void** out_ppData = ppData->IsNull() ? nullptr : ppData->AllocateOutputData(1); @@ -315,6 +338,7 @@ void VulkanReplayConsumer::Process_vkUnmapMemory( format::HandleId device, format::HandleId memory) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_memory = GetObjectInfoTable().GetDeviceMemoryInfo(memory); @@ -328,6 +352,7 @@ void VulkanReplayConsumer::Process_vkFlushMappedMemoryRanges( uint32_t memoryRangeCount, StructPointerDecoder* pMemoryRanges) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructArrayHandles(pMemoryRanges->GetMetaStructPointer(), pMemoryRanges->GetLength(), GetObjectInfoTable()); @@ -343,6 +368,7 @@ void VulkanReplayConsumer::Process_vkInvalidateMappedMemoryRanges( uint32_t memoryRangeCount, StructPointerDecoder* pMemoryRanges) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructArrayHandles(pMemoryRanges->GetMetaStructPointer(), pMemoryRanges->GetLength(), GetObjectInfoTable()); @@ -357,6 +383,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceMemoryCommitment( format::HandleId memory, PointerDecoder* pCommittedMemoryInBytes) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeviceMemory in_memory = MapHandle(memory, &VulkanObjectInfoTable::GetDeviceMemoryInfo); VkDeviceSize* out_pCommittedMemoryInBytes = pCommittedMemoryInBytes->IsNull() ? nullptr : pCommittedMemoryInBytes->AllocateOutputData(1, static_cast(0)); @@ -372,6 +399,7 @@ void VulkanReplayConsumer::Process_vkBindBufferMemory( format::HandleId memory, VkDeviceSize memoryOffset) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_buffer = GetObjectInfoTable().GetBufferInfo(buffer); auto in_memory = GetObjectInfoTable().GetDeviceMemoryInfo(memory); @@ -388,6 +416,7 @@ void VulkanReplayConsumer::Process_vkBindImageMemory( format::HandleId memory, VkDeviceSize memoryOffset) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_image = GetObjectInfoTable().GetImageInfo(image); auto in_memory = GetObjectInfoTable().GetDeviceMemoryInfo(memory); @@ -402,6 +431,7 @@ void VulkanReplayConsumer::Process_vkGetBufferMemoryRequirements( format::HandleId buffer, StructPointerDecoder* pMemoryRequirements) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); VkMemoryRequirements* out_pMemoryRequirements = pMemoryRequirements->IsNull() ? nullptr : pMemoryRequirements->AllocateOutputData(1); @@ -415,6 +445,7 @@ void VulkanReplayConsumer::Process_vkGetImageMemoryRequirements( format::HandleId image, StructPointerDecoder* pMemoryRequirements) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkImage in_image = MapHandle(image, &VulkanObjectInfoTable::GetImageInfo); VkMemoryRequirements* out_pMemoryRequirements = pMemoryRequirements->IsNull() ? nullptr : pMemoryRequirements->AllocateOutputData(1); @@ -429,6 +460,7 @@ void VulkanReplayConsumer::Process_vkGetImageSparseMemoryRequirements( PointerDecoder* pSparseMemoryRequirementCount, StructPointerDecoder* pSparseMemoryRequirements) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkImage in_image = MapHandle(image, &VulkanObjectInfoTable::GetImageInfo); uint32_t* out_pSparseMemoryRequirementCount = pSparseMemoryRequirementCount->IsNull() ? nullptr : pSparseMemoryRequirementCount->AllocateOutputData(1, GetOutputArrayCount("vkGetImageSparseMemoryRequirements", VK_SUCCESS, image, kImageArrayGetImageSparseMemoryRequirements, pSparseMemoryRequirementCount, pSparseMemoryRequirements, &VulkanObjectInfoTable::GetImageInfo)); @@ -450,6 +482,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSparseImageFormatPropertie PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceSparseImageFormatProperties", VK_SUCCESS, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceSparseImageFormatProperties, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkSparseImageFormatProperties* out_pProperties = pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(*out_pPropertyCount); @@ -467,6 +500,7 @@ void VulkanReplayConsumer::Process_vkQueueBindSparse( StructPointerDecoder* pBindInfo, format::HandleId fence) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_queue = GetObjectInfoTable().GetQueueInfo(queue); MapStructArrayHandles(pBindInfo->GetMetaStructPointer(), pBindInfo->GetLength(), GetObjectInfoTable()); @@ -484,11 +518,13 @@ void VulkanReplayConsumer::Process_vkCreateFence( StructPointerDecoder* pAllocator, HandlePointerDecoder* pFence) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkFenceCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pFence->IsNull()) { pFence->SetHandleLength(1); } VkFence* out_pFence = pFence->GetHandlePointer(); +ForwardIdToCaptureLayer(pFence->GetPointer(), VK_OBJECT_TYPE_FENCE); VkResult replay_result = GetDeviceTable(in_device)->CreateFence(in_device, in_pCreateInfo, in_pAllocator, out_pFence); CheckResult("vkCreateFence", returnValue, replay_result, call_info); @@ -502,6 +538,7 @@ void VulkanReplayConsumer::Process_vkDestroyFence( format::HandleId fence, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkFence in_fence = MapHandle(fence, &VulkanObjectInfoTable::GetFenceInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -517,6 +554,7 @@ void VulkanReplayConsumer::Process_vkResetFences( uint32_t fenceCount, HandlePointerDecoder* pFences) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkFence* in_pFences = MapHandles(pFences, fenceCount, &VulkanObjectInfoTable::GetFenceInfo); @@ -530,6 +568,7 @@ void VulkanReplayConsumer::Process_vkGetFenceStatus( format::HandleId device, format::HandleId fence) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_fence = GetObjectInfoTable().GetFenceInfo(fence); @@ -546,6 +585,7 @@ void VulkanReplayConsumer::Process_vkWaitForFences( VkBool32 waitAll, uint64_t timeout) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapHandles(pFences, fenceCount, &VulkanObjectInfoTable::GetFenceInfo); @@ -561,11 +601,13 @@ void VulkanReplayConsumer::Process_vkCreateSemaphore( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSemaphore) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkSemaphoreCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pSemaphore->IsNull()) { pSemaphore->SetHandleLength(1); } VkSemaphore* out_pSemaphore = pSemaphore->GetHandlePointer(); +ForwardIdToCaptureLayer(pSemaphore->GetPointer(), VK_OBJECT_TYPE_SEMAPHORE); VkResult replay_result = GetDeviceTable(in_device)->CreateSemaphore(in_device, in_pCreateInfo, in_pAllocator, out_pSemaphore); CheckResult("vkCreateSemaphore", returnValue, replay_result, call_info); @@ -579,6 +621,7 @@ void VulkanReplayConsumer::Process_vkDestroySemaphore( format::HandleId semaphore, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSemaphore in_semaphore = MapHandle(semaphore, &VulkanObjectInfoTable::GetSemaphoreInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -595,11 +638,13 @@ void VulkanReplayConsumer::Process_vkCreateEvent( StructPointerDecoder* pAllocator, HandlePointerDecoder* pEvent) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkEventCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pEvent->IsNull()) { pEvent->SetHandleLength(1); } VkEvent* out_pEvent = pEvent->GetHandlePointer(); +ForwardIdToCaptureLayer(pEvent->GetPointer(), VK_OBJECT_TYPE_EVENT); VkResult replay_result = GetDeviceTable(in_device)->CreateEvent(in_device, in_pCreateInfo, in_pAllocator, out_pEvent); CheckResult("vkCreateEvent", returnValue, replay_result, call_info); @@ -613,6 +658,7 @@ void VulkanReplayConsumer::Process_vkDestroyEvent( format::HandleId event, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkEvent in_event = MapHandle(event, &VulkanObjectInfoTable::GetEventInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -627,6 +673,7 @@ void VulkanReplayConsumer::Process_vkGetEventStatus( format::HandleId device, format::HandleId event) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_event = GetObjectInfoTable().GetEventInfo(event); @@ -640,6 +687,7 @@ void VulkanReplayConsumer::Process_vkSetEvent( format::HandleId device, format::HandleId event) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkEvent in_event = MapHandle(event, &VulkanObjectInfoTable::GetEventInfo); @@ -653,6 +701,7 @@ void VulkanReplayConsumer::Process_vkResetEvent( format::HandleId device, format::HandleId event) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkEvent in_event = MapHandle(event, &VulkanObjectInfoTable::GetEventInfo); @@ -668,11 +717,13 @@ void VulkanReplayConsumer::Process_vkCreateQueryPool( StructPointerDecoder* pAllocator, HandlePointerDecoder* pQueryPool) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkQueryPoolCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pQueryPool->IsNull()) { pQueryPool->SetHandleLength(1); } VkQueryPool* out_pQueryPool = pQueryPool->GetHandlePointer(); +ForwardIdToCaptureLayer(pQueryPool->GetPointer(), VK_OBJECT_TYPE_QUERY_POOL); VkResult replay_result = GetDeviceTable(in_device)->CreateQueryPool(in_device, in_pCreateInfo, in_pAllocator, out_pQueryPool); CheckResult("vkCreateQueryPool", returnValue, replay_result, call_info); @@ -686,6 +737,7 @@ void VulkanReplayConsumer::Process_vkDestroyQueryPool( format::HandleId queryPool, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -706,6 +758,7 @@ void VulkanReplayConsumer::Process_vkGetQueryPoolResults( VkDeviceSize stride, VkQueryResultFlags flags) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_queryPool = GetObjectInfoTable().GetQueryPoolInfo(queryPool); if (!pData->IsNull()) { pData->AllocateOutputData(dataSize); } @@ -722,10 +775,12 @@ void VulkanReplayConsumer::Process_vkCreateBuffer( StructPointerDecoder* pAllocator, HandlePointerDecoder* pBuffer) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); if (!pBuffer->IsNull()) { pBuffer->SetHandleLength(1); } BufferInfo handle_info; pBuffer->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pBuffer->GetPointer(), VK_OBJECT_TYPE_BUFFER); VkResult replay_result = OverrideCreateBuffer(GetDeviceTable(in_device->handle)->CreateBuffer, returnValue, in_device, pCreateInfo, pAllocator, pBuffer); CheckResult("vkCreateBuffer", returnValue, replay_result, call_info); @@ -739,6 +794,7 @@ void VulkanReplayConsumer::Process_vkDestroyBuffer( format::HandleId buffer, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_buffer = GetObjectInfoTable().GetBufferInfo(buffer); @@ -754,12 +810,14 @@ void VulkanReplayConsumer::Process_vkCreateBufferView( StructPointerDecoder* pAllocator, HandlePointerDecoder* pView) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkBufferViewCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pView->IsNull()) { pView->SetHandleLength(1); } VkBufferView* out_pView = pView->GetHandlePointer(); +ForwardIdToCaptureLayer(pView->GetPointer(), VK_OBJECT_TYPE_BUFFER_VIEW); VkResult replay_result = GetDeviceTable(in_device)->CreateBufferView(in_device, in_pCreateInfo, in_pAllocator, out_pView); CheckResult("vkCreateBufferView", returnValue, replay_result, call_info); @@ -773,6 +831,7 @@ void VulkanReplayConsumer::Process_vkDestroyBufferView( format::HandleId bufferView, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkBufferView in_bufferView = MapHandle(bufferView, &VulkanObjectInfoTable::GetBufferViewInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -789,12 +848,14 @@ void VulkanReplayConsumer::Process_vkCreateImage( StructPointerDecoder* pAllocator, HandlePointerDecoder* pImage) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); if (!pImage->IsNull()) { pImage->SetHandleLength(1); } ImageInfo handle_info; pImage->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pImage->GetPointer(), VK_OBJECT_TYPE_IMAGE); VkResult replay_result = OverrideCreateImage(GetDeviceTable(in_device->handle)->CreateImage, returnValue, in_device, pCreateInfo, pAllocator, pImage); CheckResult("vkCreateImage", returnValue, replay_result, call_info); @@ -808,6 +869,7 @@ void VulkanReplayConsumer::Process_vkDestroyImage( format::HandleId image, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_image = GetObjectInfoTable().GetImageInfo(image); @@ -822,6 +884,7 @@ void VulkanReplayConsumer::Process_vkGetImageSubresourceLayout( StructPointerDecoder* pSubresource, StructPointerDecoder* pLayout) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_image = GetObjectInfoTable().GetImageInfo(image); pLayout->IsNull() ? nullptr : pLayout->AllocateOutputData(1); @@ -837,12 +900,14 @@ void VulkanReplayConsumer::Process_vkCreateImageView( StructPointerDecoder* pAllocator, HandlePointerDecoder* pView) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); if (!pView->IsNull()) { pView->SetHandleLength(1); } ImageViewInfo handle_info; pView->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pView->GetPointer(), VK_OBJECT_TYPE_IMAGE_VIEW); VkResult replay_result = OverrideCreateImageView(GetDeviceTable(in_device->handle)->CreateImageView, returnValue, in_device, pCreateInfo, pAllocator, pView); CheckResult("vkCreateImageView", returnValue, replay_result, call_info); @@ -856,6 +921,7 @@ void VulkanReplayConsumer::Process_vkDestroyImageView( format::HandleId imageView, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkImageView in_imageView = MapHandle(imageView, &VulkanObjectInfoTable::GetImageViewInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -872,12 +938,14 @@ void VulkanReplayConsumer::Process_vkCreateShaderModule( StructPointerDecoder* pAllocator, HandlePointerDecoder* pShaderModule) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); if (!pShaderModule->IsNull()) { pShaderModule->SetHandleLength(1); } ShaderModuleInfo handle_info; pShaderModule->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pShaderModule->GetPointer(), VK_OBJECT_TYPE_SHADER_MODULE); VkResult replay_result = OverrideCreateShaderModule(GetDeviceTable(in_device->handle)->CreateShaderModule, returnValue, in_device, pCreateInfo, pAllocator, pShaderModule); CheckResult("vkCreateShaderModule", returnValue, replay_result, call_info); @@ -891,6 +959,7 @@ void VulkanReplayConsumer::Process_vkDestroyShaderModule( format::HandleId shaderModule, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_shaderModule = GetObjectInfoTable().GetShaderModuleInfo(shaderModule); @@ -906,10 +975,12 @@ void VulkanReplayConsumer::Process_vkCreatePipelineCache( StructPointerDecoder* pAllocator, HandlePointerDecoder* pPipelineCache) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); if (!pPipelineCache->IsNull()) { pPipelineCache->SetHandleLength(1); } PipelineCacheInfo handle_info; pPipelineCache->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pPipelineCache->GetPointer(), VK_OBJECT_TYPE_PIPELINE_CACHE); VkResult replay_result = OverrideCreatePipelineCache(GetDeviceTable(in_device->handle)->CreatePipelineCache, returnValue, in_device, pCreateInfo, pAllocator, pPipelineCache); CheckResult("vkCreatePipelineCache", returnValue, replay_result, call_info); @@ -923,6 +994,7 @@ void VulkanReplayConsumer::Process_vkDestroyPipelineCache( format::HandleId pipelineCache, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPipelineCache in_pipelineCache = MapHandle(pipelineCache, &VulkanObjectInfoTable::GetPipelineCacheInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -939,6 +1011,7 @@ void VulkanReplayConsumer::Process_vkGetPipelineCacheData( PointerDecoder* pDataSize, PointerDecoder* pData) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_pipelineCache = GetObjectInfoTable().GetPipelineCacheInfo(pipelineCache); pDataSize->IsNull() ? nullptr : pDataSize->AllocateOutputData(1, GetOutputArrayCount("vkGetPipelineCacheData", returnValue, pipelineCache, kPipelineCacheArrayGetPipelineCacheData, pDataSize, pData, &VulkanObjectInfoTable::GetPipelineCacheInfo)); @@ -958,6 +1031,7 @@ void VulkanReplayConsumer::Process_vkMergePipelineCaches( uint32_t srcCacheCount, HandlePointerDecoder* pSrcCaches) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPipelineCache in_dstCache = MapHandle(dstCache, &VulkanObjectInfoTable::GetPipelineCacheInfo); const VkPipelineCache* in_pSrcCaches = MapHandles(pSrcCaches, srcCacheCount, &VulkanObjectInfoTable::GetPipelineCacheInfo); @@ -976,6 +1050,7 @@ void VulkanReplayConsumer::Process_vkCreateGraphicsPipelines( StructPointerDecoder* pAllocator, HandlePointerDecoder* pPipelines) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_pipelineCache = GetObjectInfoTable().GetPipelineCacheInfo(pipelineCache); @@ -983,7 +1058,9 @@ void VulkanReplayConsumer::Process_vkCreateGraphicsPipelines( if (!pPipelines->IsNull()) { pPipelines->SetHandleLength(createInfoCount); } if (omitted_pipeline_cache_data_) {AllowCompileDuringPipelineCreation(createInfoCount, pCreateInfos->GetPointer());} std::vector handle_info(createInfoCount); + ForwardIdsToCaptureLayer(pPipelines->GetPointer(), pPipelines->GetLength(), pPipelines->GetHandlePointer(), createInfoCount, VK_OBJECT_TYPE_PIPELINE); for (size_t i = 0; i < createInfoCount; ++i) { pPipelines->SetConsumerData(i, &handle_info[i]); } +ForwardIdsToCaptureLayer(pPipelines->GetPointer(), pPipelines->GetLength(), VK_OBJECT_TYPE_PIPELINE); if (UseAsyncOperations()) { @@ -1010,6 +1087,7 @@ void VulkanReplayConsumer::Process_vkCreateComputePipelines( StructPointerDecoder* pAllocator, HandlePointerDecoder* pPipelines) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_pipelineCache = GetObjectInfoTable().GetPipelineCacheInfo(pipelineCache); @@ -1017,7 +1095,9 @@ void VulkanReplayConsumer::Process_vkCreateComputePipelines( if (!pPipelines->IsNull()) { pPipelines->SetHandleLength(createInfoCount); } if (omitted_pipeline_cache_data_) {AllowCompileDuringPipelineCreation(createInfoCount, pCreateInfos->GetPointer());} std::vector handle_info(createInfoCount); + ForwardIdsToCaptureLayer(pPipelines->GetPointer(), pPipelines->GetLength(), pPipelines->GetHandlePointer(), createInfoCount, VK_OBJECT_TYPE_PIPELINE); for (size_t i = 0; i < createInfoCount; ++i) { pPipelines->SetConsumerData(i, &handle_info[i]); } +ForwardIdsToCaptureLayer(pPipelines->GetPointer(), pPipelines->GetLength(), VK_OBJECT_TYPE_PIPELINE); if (UseAsyncOperations()) { @@ -1040,6 +1120,7 @@ void VulkanReplayConsumer::Process_vkDestroyPipeline( format::HandleId pipeline, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_pipeline = GetObjectInfoTable().GetPipelineInfo(pipeline); @@ -1055,12 +1136,14 @@ void VulkanReplayConsumer::Process_vkCreatePipelineLayout( StructPointerDecoder* pAllocator, HandlePointerDecoder* pPipelineLayout) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkPipelineLayoutCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pPipelineLayout->IsNull()) { pPipelineLayout->SetHandleLength(1); } VkPipelineLayout* out_pPipelineLayout = pPipelineLayout->GetHandlePointer(); +ForwardIdToCaptureLayer(pPipelineLayout->GetPointer(), VK_OBJECT_TYPE_PIPELINE_LAYOUT); VkResult replay_result = GetDeviceTable(in_device)->CreatePipelineLayout(in_device, in_pCreateInfo, in_pAllocator, out_pPipelineLayout); CheckResult("vkCreatePipelineLayout", returnValue, replay_result, call_info); @@ -1074,6 +1157,7 @@ void VulkanReplayConsumer::Process_vkDestroyPipelineLayout( format::HandleId pipelineLayout, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPipelineLayout in_pipelineLayout = MapHandle(pipelineLayout, &VulkanObjectInfoTable::GetPipelineLayoutInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -1090,12 +1174,14 @@ void VulkanReplayConsumer::Process_vkCreateSampler( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSampler) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkSamplerCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pSampler->IsNull()) { pSampler->SetHandleLength(1); } VkSampler* out_pSampler = pSampler->GetHandlePointer(); +ForwardIdToCaptureLayer(pSampler->GetPointer(), VK_OBJECT_TYPE_SAMPLER); VkResult replay_result = GetDeviceTable(in_device)->CreateSampler(in_device, in_pCreateInfo, in_pAllocator, out_pSampler); CheckResult("vkCreateSampler", returnValue, replay_result, call_info); @@ -1109,6 +1195,7 @@ void VulkanReplayConsumer::Process_vkDestroySampler( format::HandleId sampler, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSampler in_sampler = MapHandle(sampler, &VulkanObjectInfoTable::GetSamplerInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -1125,12 +1212,14 @@ void VulkanReplayConsumer::Process_vkCreateDescriptorSetLayout( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSetLayout) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); if (!pSetLayout->IsNull()) { pSetLayout->SetHandleLength(1); } DescriptorSetLayoutInfo handle_info; pSetLayout->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pSetLayout->GetPointer(), VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT); VkResult replay_result = OverrideCreateDescriptorSetLayout(GetDeviceTable(in_device->handle)->CreateDescriptorSetLayout, returnValue, in_device, pCreateInfo, pAllocator, pSetLayout); CheckResult("vkCreateDescriptorSetLayout", returnValue, replay_result, call_info); @@ -1144,6 +1233,7 @@ void VulkanReplayConsumer::Process_vkDestroyDescriptorSetLayout( format::HandleId descriptorSetLayout, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDescriptorSetLayout in_descriptorSetLayout = MapHandle(descriptorSetLayout, &VulkanObjectInfoTable::GetDescriptorSetLayoutInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -1160,10 +1250,12 @@ void VulkanReplayConsumer::Process_vkCreateDescriptorPool( StructPointerDecoder* pAllocator, HandlePointerDecoder* pDescriptorPool) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); if (!pDescriptorPool->IsNull()) { pDescriptorPool->SetHandleLength(1); } DescriptorPoolInfo handle_info; pDescriptorPool->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pDescriptorPool->GetPointer(), VK_OBJECT_TYPE_DESCRIPTOR_POOL); VkResult replay_result = OverrideCreateDescriptorPool(GetDeviceTable(in_device->handle)->CreateDescriptorPool, returnValue, in_device, pCreateInfo, pAllocator, pDescriptorPool); CheckResult("vkCreateDescriptorPool", returnValue, replay_result, call_info); @@ -1177,6 +1269,7 @@ void VulkanReplayConsumer::Process_vkDestroyDescriptorPool( format::HandleId descriptorPool, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_descriptorPool = GetObjectInfoTable().GetDescriptorPoolInfo(descriptorPool); @@ -1191,6 +1284,7 @@ void VulkanReplayConsumer::Process_vkResetDescriptorPool( format::HandleId descriptorPool, VkDescriptorPoolResetFlags flags) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_descriptorPool = GetObjectInfoTable().GetDescriptorPoolInfo(descriptorPool); @@ -1205,12 +1299,14 @@ void VulkanReplayConsumer::Process_vkAllocateDescriptorSets( StructPointerDecoder* pAllocateInfo, HandlePointerDecoder* pDescriptorSets) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pAllocateInfo->GetMetaStructPointer(), GetObjectInfoTable()); if (!pDescriptorSets->IsNull()) { pDescriptorSets->SetHandleLength(pAllocateInfo->GetPointer()->descriptorSetCount); } std::vector handle_info(pAllocateInfo->GetPointer()->descriptorSetCount); for (size_t i = 0; i < pAllocateInfo->GetPointer()->descriptorSetCount; ++i) { pDescriptorSets->SetConsumerData(i, &handle_info[i]); } +ForwardIdsToCaptureLayer(pDescriptorSets->GetPointer(), pDescriptorSets->GetLength(), pDescriptorSets->GetHandlePointer(), pAllocateInfo->GetPointer()->descriptorSetCount, VK_OBJECT_TYPE_DESCRIPTOR_SET); VkResult replay_result = OverrideAllocateDescriptorSets(GetDeviceTable(in_device->handle)->AllocateDescriptorSets, returnValue, in_device, pAllocateInfo, pDescriptorSets); CheckResult("vkAllocateDescriptorSets", returnValue, replay_result, call_info); @@ -1226,6 +1322,7 @@ void VulkanReplayConsumer::Process_vkFreeDescriptorSets( uint32_t descriptorSetCount, HandlePointerDecoder* pDescriptorSets) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDescriptorPool in_descriptorPool = MapHandle(descriptorPool, &VulkanObjectInfoTable::GetDescriptorPoolInfo); const VkDescriptorSet* in_pDescriptorSets = MapHandles(pDescriptorSets, descriptorSetCount, &VulkanObjectInfoTable::GetDescriptorSetInfo); @@ -1243,6 +1340,7 @@ void VulkanReplayConsumer::Process_vkUpdateDescriptorSets( uint32_t descriptorCopyCount, StructPointerDecoder* pDescriptorCopies) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructArrayHandles(pDescriptorWrites->GetMetaStructPointer(), pDescriptorWrites->GetLength(), GetObjectInfoTable()); @@ -1260,12 +1358,14 @@ void VulkanReplayConsumer::Process_vkCreateFramebuffer( StructPointerDecoder* pAllocator, HandlePointerDecoder* pFramebuffer) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); if (!pFramebuffer->IsNull()) { pFramebuffer->SetHandleLength(1); } FramebufferInfo handle_info; pFramebuffer->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pFramebuffer->GetPointer(), VK_OBJECT_TYPE_FRAMEBUFFER); VkResult replay_result = OverrideCreateFramebuffer(GetDeviceTable(in_device->handle)->CreateFramebuffer, returnValue, in_device, pCreateInfo, pAllocator, pFramebuffer); CheckResult("vkCreateFramebuffer", returnValue, replay_result, call_info); @@ -1279,6 +1379,7 @@ void VulkanReplayConsumer::Process_vkDestroyFramebuffer( format::HandleId framebuffer, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkFramebuffer in_framebuffer = MapHandle(framebuffer, &VulkanObjectInfoTable::GetFramebufferInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -1295,10 +1396,12 @@ void VulkanReplayConsumer::Process_vkCreateRenderPass( StructPointerDecoder* pAllocator, HandlePointerDecoder* pRenderPass) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); if (!pRenderPass->IsNull()) { pRenderPass->SetHandleLength(1); } RenderPassInfo handle_info; pRenderPass->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pRenderPass->GetPointer(), VK_OBJECT_TYPE_RENDER_PASS); VkResult replay_result = OverrideCreateRenderPass(GetDeviceTable(in_device->handle)->CreateRenderPass, returnValue, in_device, pCreateInfo, pAllocator, pRenderPass); CheckResult("vkCreateRenderPass", returnValue, replay_result, call_info); @@ -1312,6 +1415,7 @@ void VulkanReplayConsumer::Process_vkDestroyRenderPass( format::HandleId renderPass, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_renderPass = GetObjectInfoTable().GetRenderPassInfo(renderPass); @@ -1325,6 +1429,7 @@ void VulkanReplayConsumer::Process_vkGetRenderAreaGranularity( format::HandleId renderPass, StructPointerDecoder* pGranularity) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkRenderPass in_renderPass = MapHandle(renderPass, &VulkanObjectInfoTable::GetRenderPassInfo); VkExtent2D* out_pGranularity = pGranularity->IsNull() ? nullptr : pGranularity->AllocateOutputData(1); @@ -1340,11 +1445,13 @@ void VulkanReplayConsumer::Process_vkCreateCommandPool( StructPointerDecoder* pAllocator, HandlePointerDecoder* pCommandPool) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkCommandPoolCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pCommandPool->IsNull()) { pCommandPool->SetHandleLength(1); } VkCommandPool* out_pCommandPool = pCommandPool->GetHandlePointer(); +ForwardIdToCaptureLayer(pCommandPool->GetPointer(), VK_OBJECT_TYPE_COMMAND_POOL); VkResult replay_result = GetDeviceTable(in_device)->CreateCommandPool(in_device, in_pCreateInfo, in_pAllocator, out_pCommandPool); CheckResult("vkCreateCommandPool", returnValue, replay_result, call_info); @@ -1358,6 +1465,7 @@ void VulkanReplayConsumer::Process_vkDestroyCommandPool( format::HandleId commandPool, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_commandPool = GetObjectInfoTable().GetCommandPoolInfo(commandPool); @@ -1372,6 +1480,7 @@ void VulkanReplayConsumer::Process_vkResetCommandPool( format::HandleId commandPool, VkCommandPoolResetFlags flags) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_commandPool = GetObjectInfoTable().GetCommandPoolInfo(commandPool); @@ -1386,12 +1495,14 @@ void VulkanReplayConsumer::Process_vkAllocateCommandBuffers( StructPointerDecoder* pAllocateInfo, HandlePointerDecoder* pCommandBuffers) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pAllocateInfo->GetMetaStructPointer(), GetObjectInfoTable()); if (!pCommandBuffers->IsNull()) { pCommandBuffers->SetHandleLength(pAllocateInfo->GetPointer()->commandBufferCount); } std::vector handle_info(pAllocateInfo->GetPointer()->commandBufferCount); for (size_t i = 0; i < pAllocateInfo->GetPointer()->commandBufferCount; ++i) { pCommandBuffers->SetConsumerData(i, &handle_info[i]); } +ForwardIdsToCaptureLayer(pCommandBuffers->GetPointer(), pCommandBuffers->GetLength(), pCommandBuffers->GetHandlePointer(), pAllocateInfo->GetPointer()->commandBufferCount, VK_OBJECT_TYPE_COMMAND_BUFFER); VkResult replay_result = OverrideAllocateCommandBuffers(GetDeviceTable(in_device->handle)->AllocateCommandBuffers, returnValue, in_device, pAllocateInfo, pCommandBuffers); CheckResult("vkAllocateCommandBuffers", returnValue, replay_result, call_info); @@ -1406,6 +1517,7 @@ void VulkanReplayConsumer::Process_vkFreeCommandBuffers( uint32_t commandBufferCount, HandlePointerDecoder* pCommandBuffers) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_commandPool = GetObjectInfoTable().GetCommandPoolInfo(commandPool); MapHandles(pCommandBuffers, commandBufferCount, &VulkanObjectInfoTable::GetCommandBufferInfo); @@ -1420,6 +1532,7 @@ void VulkanReplayConsumer::Process_vkBeginCommandBuffer( format::HandleId commandBuffer, StructPointerDecoder* pBeginInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_commandBuffer = GetObjectInfoTable().GetCommandBufferInfo(commandBuffer); MapStructHandles(pBeginInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -1433,6 +1546,7 @@ void VulkanReplayConsumer::Process_vkEndCommandBuffer( VkResult returnValue, format::HandleId commandBuffer) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkResult replay_result = GetDeviceTable(in_commandBuffer)->EndCommandBuffer(in_commandBuffer); @@ -1445,6 +1559,7 @@ void VulkanReplayConsumer::Process_vkResetCommandBuffer( format::HandleId commandBuffer, VkCommandBufferResetFlags flags) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_commandBuffer = GetObjectInfoTable().GetCommandBufferInfo(commandBuffer); VkResult replay_result = OverrideResetCommandBuffer(GetDeviceTable(in_commandBuffer->handle)->ResetCommandBuffer, returnValue, in_commandBuffer, flags); @@ -1457,6 +1572,7 @@ void VulkanReplayConsumer::Process_vkCmdBindPipeline( VkPipelineBindPoint pipelineBindPoint, format::HandleId pipeline) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkPipeline in_pipeline = MapHandle(pipeline, &VulkanObjectInfoTable::GetPipelineInfo); @@ -1475,6 +1591,7 @@ void VulkanReplayConsumer::Process_vkCmdSetViewport( uint32_t viewportCount, StructPointerDecoder* pViewports) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkViewport* in_pViewports = pViewports->GetPointer(); @@ -1493,6 +1610,7 @@ void VulkanReplayConsumer::Process_vkCmdSetScissor( uint32_t scissorCount, StructPointerDecoder* pScissors) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkRect2D* in_pScissors = pScissors->GetPointer(); @@ -1509,6 +1627,7 @@ void VulkanReplayConsumer::Process_vkCmdSetLineWidth( format::HandleId commandBuffer, float lineWidth) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetLineWidth(in_commandBuffer, lineWidth); @@ -1526,6 +1645,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthBias( float depthBiasClamp, float depthBiasSlopeFactor) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthBias(in_commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor); @@ -1541,6 +1661,7 @@ void VulkanReplayConsumer::Process_vkCmdSetBlendConstants( format::HandleId commandBuffer, PointerDecoder* blendConstants) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const float* in_blendConstants = blendConstants->GetPointer(); @@ -1558,6 +1679,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthBounds( float minDepthBounds, float maxDepthBounds) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthBounds(in_commandBuffer, minDepthBounds, maxDepthBounds); @@ -1574,6 +1696,7 @@ void VulkanReplayConsumer::Process_vkCmdSetStencilCompareMask( VkStencilFaceFlags faceMask, uint32_t compareMask) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetStencilCompareMask(in_commandBuffer, faceMask, compareMask); @@ -1590,6 +1713,7 @@ void VulkanReplayConsumer::Process_vkCmdSetStencilWriteMask( VkStencilFaceFlags faceMask, uint32_t writeMask) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetStencilWriteMask(in_commandBuffer, faceMask, writeMask); @@ -1606,6 +1730,7 @@ void VulkanReplayConsumer::Process_vkCmdSetStencilReference( VkStencilFaceFlags faceMask, uint32_t reference) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetStencilReference(in_commandBuffer, faceMask, reference); @@ -1627,6 +1752,7 @@ void VulkanReplayConsumer::Process_vkCmdBindDescriptorSets( uint32_t dynamicOffsetCount, PointerDecoder* pDynamicOffsets) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkPipelineLayout in_layout = MapHandle(layout, &VulkanObjectInfoTable::GetPipelineLayoutInfo); const VkDescriptorSet* in_pDescriptorSets = MapHandles(pDescriptorSets, descriptorSetCount, &VulkanObjectInfoTable::GetDescriptorSetInfo); @@ -1647,6 +1773,7 @@ void VulkanReplayConsumer::Process_vkCmdBindIndexBuffer( VkDeviceSize offset, VkIndexType indexType) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -1666,6 +1793,7 @@ void VulkanReplayConsumer::Process_vkCmdBindVertexBuffers( HandlePointerDecoder* pBuffers, PointerDecoder* pOffsets) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBuffer* in_pBuffers = MapHandles(pBuffers, bindingCount, &VulkanObjectInfoTable::GetBufferInfo); const VkDeviceSize* in_pOffsets = pOffsets->GetPointer(); @@ -1686,6 +1814,7 @@ void VulkanReplayConsumer::Process_vkCmdDraw( uint32_t firstVertex, uint32_t firstInstance) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdDraw(in_commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance); @@ -1705,6 +1834,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawIndexed( int32_t vertexOffset, uint32_t firstInstance) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdDrawIndexed(in_commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance); @@ -1723,6 +1853,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawIndirect( uint32_t drawCount, uint32_t stride) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -1742,6 +1873,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawIndexedIndirect( uint32_t drawCount, uint32_t stride) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -1760,6 +1892,7 @@ void VulkanReplayConsumer::Process_vkCmdDispatch( uint32_t groupCountY, uint32_t groupCountZ) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdDispatch(in_commandBuffer, groupCountX, groupCountY, groupCountZ); @@ -1776,6 +1909,7 @@ void VulkanReplayConsumer::Process_vkCmdDispatchIndirect( format::HandleId buffer, VkDeviceSize offset) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -1795,6 +1929,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyBuffer( uint32_t regionCount, StructPointerDecoder* pRegions) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_srcBuffer = MapHandle(srcBuffer, &VulkanObjectInfoTable::GetBufferInfo); VkBuffer in_dstBuffer = MapHandle(dstBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -1818,6 +1953,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyImage( uint32_t regionCount, StructPointerDecoder* pRegions) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkImage in_srcImage = MapHandle(srcImage, &VulkanObjectInfoTable::GetImageInfo); VkImage in_dstImage = MapHandle(dstImage, &VulkanObjectInfoTable::GetImageInfo); @@ -1842,6 +1978,7 @@ void VulkanReplayConsumer::Process_vkCmdBlitImage( StructPointerDecoder* pRegions, VkFilter filter) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkImage in_srcImage = MapHandle(srcImage, &VulkanObjectInfoTable::GetImageInfo); VkImage in_dstImage = MapHandle(dstImage, &VulkanObjectInfoTable::GetImageInfo); @@ -1864,6 +2001,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyBufferToImage( uint32_t regionCount, StructPointerDecoder* pRegions) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_srcBuffer = MapHandle(srcBuffer, &VulkanObjectInfoTable::GetBufferInfo); VkImage in_dstImage = MapHandle(dstImage, &VulkanObjectInfoTable::GetImageInfo); @@ -1886,6 +2024,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyImageToBuffer( uint32_t regionCount, StructPointerDecoder* pRegions) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkImage in_srcImage = MapHandle(srcImage, &VulkanObjectInfoTable::GetImageInfo); VkBuffer in_dstBuffer = MapHandle(dstBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -1907,6 +2046,7 @@ void VulkanReplayConsumer::Process_vkCmdUpdateBuffer( VkDeviceSize dataSize, PointerDecoder* pData) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_dstBuffer = MapHandle(dstBuffer, &VulkanObjectInfoTable::GetBufferInfo); const void* in_pData = pData->GetPointer(); @@ -1927,6 +2067,7 @@ void VulkanReplayConsumer::Process_vkCmdFillBuffer( VkDeviceSize size, uint32_t data) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_dstBuffer = MapHandle(dstBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -1947,6 +2088,7 @@ void VulkanReplayConsumer::Process_vkCmdClearColorImage( uint32_t rangeCount, StructPointerDecoder* pRanges) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkImage in_image = MapHandle(image, &VulkanObjectInfoTable::GetImageInfo); const VkClearColorValue* in_pColor = pColor->GetPointer(); @@ -1969,6 +2111,7 @@ void VulkanReplayConsumer::Process_vkCmdClearDepthStencilImage( uint32_t rangeCount, StructPointerDecoder* pRanges) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkImage in_image = MapHandle(image, &VulkanObjectInfoTable::GetImageInfo); const VkClearDepthStencilValue* in_pDepthStencil = pDepthStencil->GetPointer(); @@ -1990,6 +2133,7 @@ void VulkanReplayConsumer::Process_vkCmdClearAttachments( uint32_t rectCount, StructPointerDecoder* pRects) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkClearAttachment* in_pAttachments = pAttachments->GetPointer(); const VkClearRect* in_pRects = pRects->GetPointer(); @@ -2012,6 +2156,7 @@ void VulkanReplayConsumer::Process_vkCmdResolveImage( uint32_t regionCount, StructPointerDecoder* pRegions) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkImage in_srcImage = MapHandle(srcImage, &VulkanObjectInfoTable::GetImageInfo); VkImage in_dstImage = MapHandle(dstImage, &VulkanObjectInfoTable::GetImageInfo); @@ -2031,6 +2176,7 @@ void VulkanReplayConsumer::Process_vkCmdSetEvent( format::HandleId event, VkPipelineStageFlags stageMask) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkEvent in_event = MapHandle(event, &VulkanObjectInfoTable::GetEventInfo); @@ -2048,6 +2194,7 @@ void VulkanReplayConsumer::Process_vkCmdResetEvent( format::HandleId event, VkPipelineStageFlags stageMask) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkEvent in_event = MapHandle(event, &VulkanObjectInfoTable::GetEventInfo); @@ -2073,6 +2220,7 @@ void VulkanReplayConsumer::Process_vkCmdWaitEvents( uint32_t imageMemoryBarrierCount, StructPointerDecoder* pImageMemoryBarriers) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkEvent* in_pEvents = MapHandles(pEvents, eventCount, &VulkanObjectInfoTable::GetEventInfo); const VkMemoryBarrier* in_pMemoryBarriers = pMemoryBarriers->GetPointer(); @@ -2102,6 +2250,7 @@ void VulkanReplayConsumer::Process_vkCmdPipelineBarrier( uint32_t imageMemoryBarrierCount, StructPointerDecoder* pImageMemoryBarriers) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_commandBuffer = GetObjectInfoTable().GetCommandBufferInfo(commandBuffer); MapStructArrayHandles(pBufferMemoryBarriers->GetMetaStructPointer(), pBufferMemoryBarriers->GetLength(), GetObjectInfoTable()); @@ -2123,6 +2272,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginQuery( uint32_t query, VkQueryControlFlags flags) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -2140,6 +2290,7 @@ void VulkanReplayConsumer::Process_vkCmdEndQuery( format::HandleId queryPool, uint32_t query) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -2158,6 +2309,7 @@ void VulkanReplayConsumer::Process_vkCmdResetQueryPool( uint32_t firstQuery, uint32_t queryCount) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -2176,6 +2328,7 @@ void VulkanReplayConsumer::Process_vkCmdWriteTimestamp( format::HandleId queryPool, uint32_t query) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -2198,6 +2351,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyQueryPoolResults( VkDeviceSize stride, VkQueryResultFlags flags) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); VkBuffer in_dstBuffer = MapHandle(dstBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -2219,6 +2373,7 @@ void VulkanReplayConsumer::Process_vkCmdPushConstants( uint32_t size, PointerDecoder* pValues) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkPipelineLayout in_layout = MapHandle(layout, &VulkanObjectInfoTable::GetPipelineLayoutInfo); const void* in_pValues = pValues->GetPointer(); @@ -2237,6 +2392,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginRenderPass( StructPointerDecoder* pRenderPassBegin, VkSubpassContents contents) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_commandBuffer = GetObjectInfoTable().GetCommandBufferInfo(commandBuffer); MapStructHandles(pRenderPassBegin->GetMetaStructPointer(), GetObjectInfoTable()); @@ -2254,6 +2410,7 @@ void VulkanReplayConsumer::Process_vkCmdNextSubpass( format::HandleId commandBuffer, VkSubpassContents contents) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdNextSubpass(in_commandBuffer, contents); @@ -2268,6 +2425,7 @@ void VulkanReplayConsumer::Process_vkCmdEndRenderPass( const ApiCallInfo& call_info, format::HandleId commandBuffer) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdEndRenderPass(in_commandBuffer); @@ -2284,6 +2442,7 @@ void VulkanReplayConsumer::Process_vkCmdExecuteCommands( uint32_t commandBufferCount, HandlePointerDecoder* pCommandBuffers) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCommandBuffer* in_pCommandBuffers = MapHandles(pCommandBuffers, commandBufferCount, &VulkanObjectInfoTable::GetCommandBufferInfo); @@ -2302,6 +2461,7 @@ void VulkanReplayConsumer::Process_vkBindBufferMemory2( uint32_t bindInfoCount, StructPointerDecoder* pBindInfos) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructArrayHandles(pBindInfos->GetMetaStructPointer(), pBindInfos->GetLength(), GetObjectInfoTable()); @@ -2317,6 +2477,7 @@ void VulkanReplayConsumer::Process_vkBindImageMemory2( uint32_t bindInfoCount, StructPointerDecoder* pBindInfos) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructArrayHandles(pBindInfos->GetMetaStructPointer(), pBindInfos->GetLength(), GetObjectInfoTable()); @@ -2333,6 +2494,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceGroupPeerMemoryFeatures( uint32_t remoteDeviceIndex, PointerDecoder* pPeerMemoryFeatures) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPeerMemoryFeatureFlags* out_pPeerMemoryFeatures = pPeerMemoryFeatures->IsNull() ? nullptr : pPeerMemoryFeatures->AllocateOutputData(1, static_cast(0)); @@ -2344,6 +2506,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDeviceMask( format::HandleId commandBuffer, uint32_t deviceMask) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDeviceMask(in_commandBuffer, deviceMask); @@ -2364,6 +2527,7 @@ void VulkanReplayConsumer::Process_vkCmdDispatchBase( uint32_t groupCountY, uint32_t groupCountZ) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdDispatchBase(in_commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); @@ -2381,6 +2545,7 @@ void VulkanReplayConsumer::Process_vkEnumeratePhysicalDeviceGroups( PointerDecoder* pPhysicalDeviceGroupCount, StructPointerDecoder* pPhysicalDeviceGroupProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); pPhysicalDeviceGroupCount->IsNull() ? nullptr : pPhysicalDeviceGroupCount->AllocateOutputData(1, GetOutputArrayCount("vkEnumeratePhysicalDeviceGroups", returnValue, instance, kInstanceArrayEnumeratePhysicalDeviceGroups, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties, &VulkanObjectInfoTable::GetInstanceInfo)); SetStructArrayHandleLengths(pPhysicalDeviceGroupProperties->GetMetaStructPointer(), pPhysicalDeviceGroupProperties->GetLength()); @@ -2399,6 +2564,7 @@ void VulkanReplayConsumer::Process_vkGetImageMemoryRequirements2( StructPointerDecoder* pInfo, StructPointerDecoder* pMemoryRequirements) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkImageMemoryRequirementsInfo2* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -2414,6 +2580,7 @@ void VulkanReplayConsumer::Process_vkGetBufferMemoryRequirements2( StructPointerDecoder* pInfo, StructPointerDecoder* pMemoryRequirements) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkBufferMemoryRequirementsInfo2* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -2430,6 +2597,7 @@ void VulkanReplayConsumer::Process_vkGetImageSparseMemoryRequirements2( PointerDecoder* pSparseMemoryRequirementCount, StructPointerDecoder* pSparseMemoryRequirements) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkImageSparseMemoryRequirementsInfo2* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -2446,6 +2614,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceFeatures2( format::HandleId physicalDevice, StructPointerDecoder* pFeatures) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkPhysicalDeviceFeatures2* out_pFeatures = pFeatures->IsNull() ? nullptr : pFeatures->AllocateOutputData(1, { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, nullptr }); InitializeOutputStructPNext(pFeatures); @@ -2458,6 +2627,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceProperties2( format::HandleId physicalDevice, StructPointerDecoder* pProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, nullptr }); InitializeOutputStructPNext(pProperties); @@ -2471,6 +2641,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceFormatProperties2( VkFormat format, StructPointerDecoder* pFormatProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkFormatProperties2* out_pFormatProperties = pFormatProperties->IsNull() ? nullptr : pFormatProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2, nullptr }); InitializeOutputStructPNext(pFormatProperties); @@ -2485,6 +2656,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceImageFormatProperties2( StructPointerDecoder* pImageFormatInfo, StructPointerDecoder* pImageFormatProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceImageFormatInfo2* in_pImageFormatInfo = pImageFormatInfo->GetPointer(); VkImageFormatProperties2* out_pImageFormatProperties = pImageFormatProperties->IsNull() ? nullptr : pImageFormatProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2, nullptr }); @@ -2500,6 +2672,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceQueueFamilyProperties2( PointerDecoder* pQueueFamilyPropertyCount, StructPointerDecoder* pQueueFamilyProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pQueueFamilyPropertyCount = pQueueFamilyPropertyCount->IsNull() ? nullptr : pQueueFamilyPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceQueueFamilyProperties2", VK_SUCCESS, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceQueueFamilyProperties2, pQueueFamilyPropertyCount, pQueueFamilyProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkQueueFamilyProperties2* out_pQueueFamilyProperties = pQueueFamilyProperties->IsNull() ? nullptr : pQueueFamilyProperties->AllocateOutputData(*out_pQueueFamilyPropertyCount, VkQueueFamilyProperties2{ VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2, nullptr }); @@ -2514,6 +2687,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceMemoryProperties2( format::HandleId physicalDevice, StructPointerDecoder* pMemoryProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); pMemoryProperties->IsNull() ? nullptr : pMemoryProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2, nullptr }); InitializeOutputStructPNext(pMemoryProperties); @@ -2528,6 +2702,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSparseImageFormatPropertie PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceSparseImageFormatInfo2* in_pFormatInfo = pFormatInfo->GetPointer(); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceSparseImageFormatProperties2", VK_SUCCESS, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceSparseImageFormatProperties2, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); @@ -2544,6 +2719,7 @@ void VulkanReplayConsumer::Process_vkTrimCommandPool( format::HandleId commandPool, VkCommandPoolTrimFlags flags) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkCommandPool in_commandPool = MapHandle(commandPool, &VulkanObjectInfoTable::GetCommandPoolInfo); @@ -2556,10 +2732,12 @@ void VulkanReplayConsumer::Process_vkGetDeviceQueue2( StructPointerDecoder* pQueueInfo, HandlePointerDecoder* pQueue) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); if (!pQueue->IsNull()) { pQueue->SetHandleLength(1); } QueueInfo handle_info; pQueue->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pQueue->GetPointer(), VK_OBJECT_TYPE_QUEUE); OverrideGetDeviceQueue2(GetDeviceTable(in_device->handle)->GetDeviceQueue2, in_device, pQueueInfo, pQueue); @@ -2574,11 +2752,13 @@ void VulkanReplayConsumer::Process_vkCreateSamplerYcbcrConversion( StructPointerDecoder* pAllocator, HandlePointerDecoder* pYcbcrConversion) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkSamplerYcbcrConversionCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pYcbcrConversion->IsNull()) { pYcbcrConversion->SetHandleLength(1); } VkSamplerYcbcrConversion* out_pYcbcrConversion = pYcbcrConversion->GetHandlePointer(); +ForwardIdToCaptureLayer(pYcbcrConversion->GetPointer(), VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION); VkResult replay_result = GetDeviceTable(in_device)->CreateSamplerYcbcrConversion(in_device, in_pCreateInfo, in_pAllocator, out_pYcbcrConversion); CheckResult("vkCreateSamplerYcbcrConversion", returnValue, replay_result, call_info); @@ -2592,6 +2772,7 @@ void VulkanReplayConsumer::Process_vkDestroySamplerYcbcrConversion( format::HandleId ycbcrConversion, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSamplerYcbcrConversion in_ycbcrConversion = MapHandle(ycbcrConversion, &VulkanObjectInfoTable::GetSamplerYcbcrConversionInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -2608,12 +2789,14 @@ void VulkanReplayConsumer::Process_vkCreateDescriptorUpdateTemplate( StructPointerDecoder* pAllocator, HandlePointerDecoder* pDescriptorUpdateTemplate) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); if (!pDescriptorUpdateTemplate->IsNull()) { pDescriptorUpdateTemplate->SetHandleLength(1); } DescriptorUpdateTemplateInfo handle_info; pDescriptorUpdateTemplate->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pDescriptorUpdateTemplate->GetPointer(), VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE); VkResult replay_result = OverrideCreateDescriptorUpdateTemplate(GetDeviceTable(in_device->handle)->CreateDescriptorUpdateTemplate, returnValue, in_device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate); CheckResult("vkCreateDescriptorUpdateTemplate", returnValue, replay_result, call_info); @@ -2627,6 +2810,7 @@ void VulkanReplayConsumer::Process_vkDestroyDescriptorUpdateTemplate( format::HandleId descriptorUpdateTemplate, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_descriptorUpdateTemplate = GetObjectInfoTable().GetDescriptorUpdateTemplateInfo(descriptorUpdateTemplate); @@ -2640,6 +2824,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceExternalBufferProperties( StructPointerDecoder* pExternalBufferInfo, StructPointerDecoder* pExternalBufferProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceExternalBufferInfo* in_pExternalBufferInfo = pExternalBufferInfo->GetPointer(); VkExternalBufferProperties* out_pExternalBufferProperties = pExternalBufferProperties->IsNull() ? nullptr : pExternalBufferProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES, nullptr }); @@ -2654,6 +2839,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceExternalFenceProperties( StructPointerDecoder* pExternalFenceInfo, StructPointerDecoder* pExternalFenceProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceExternalFenceInfo* in_pExternalFenceInfo = pExternalFenceInfo->GetPointer(); VkExternalFenceProperties* out_pExternalFenceProperties = pExternalFenceProperties->IsNull() ? nullptr : pExternalFenceProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES, nullptr }); @@ -2668,6 +2854,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceExternalSemaphorePropertie StructPointerDecoder* pExternalSemaphoreInfo, StructPointerDecoder* pExternalSemaphoreProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceExternalSemaphoreInfo* in_pExternalSemaphoreInfo = pExternalSemaphoreInfo->GetPointer(); VkExternalSemaphoreProperties* out_pExternalSemaphoreProperties = pExternalSemaphoreProperties->IsNull() ? nullptr : pExternalSemaphoreProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES, nullptr }); @@ -2682,6 +2869,7 @@ void VulkanReplayConsumer::Process_vkGetDescriptorSetLayoutSupport( StructPointerDecoder* pCreateInfo, StructPointerDecoder* pSupport) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDescriptorSetLayoutCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -2701,6 +2889,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawIndirectCount( uint32_t maxDrawCount, uint32_t stride) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); VkBuffer in_countBuffer = MapHandle(countBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -2723,6 +2912,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawIndexedIndirectCount( uint32_t maxDrawCount, uint32_t stride) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); VkBuffer in_countBuffer = MapHandle(countBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -2743,10 +2933,12 @@ void VulkanReplayConsumer::Process_vkCreateRenderPass2( StructPointerDecoder* pAllocator, HandlePointerDecoder* pRenderPass) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); if (!pRenderPass->IsNull()) { pRenderPass->SetHandleLength(1); } RenderPassInfo handle_info; pRenderPass->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pRenderPass->GetPointer(), VK_OBJECT_TYPE_RENDER_PASS); VkResult replay_result = OverrideCreateRenderPass2(GetDeviceTable(in_device->handle)->CreateRenderPass2, returnValue, in_device, pCreateInfo, pAllocator, pRenderPass); CheckResult("vkCreateRenderPass2", returnValue, replay_result, call_info); @@ -2760,6 +2952,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginRenderPass2( StructPointerDecoder* pRenderPassBegin, StructPointerDecoder* pSubpassBeginInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_commandBuffer = GetObjectInfoTable().GetCommandBufferInfo(commandBuffer); MapStructHandles(pRenderPassBegin->GetMetaStructPointer(), GetObjectInfoTable()); @@ -2778,6 +2971,7 @@ void VulkanReplayConsumer::Process_vkCmdNextSubpass2( StructPointerDecoder* pSubpassBeginInfo, StructPointerDecoder* pSubpassEndInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkSubpassBeginInfo* in_pSubpassBeginInfo = pSubpassBeginInfo->GetPointer(); const VkSubpassEndInfo* in_pSubpassEndInfo = pSubpassEndInfo->GetPointer(); @@ -2795,6 +2989,7 @@ void VulkanReplayConsumer::Process_vkCmdEndRenderPass2( format::HandleId commandBuffer, StructPointerDecoder* pSubpassEndInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkSubpassEndInfo* in_pSubpassEndInfo = pSubpassEndInfo->GetPointer(); @@ -2813,6 +3008,7 @@ void VulkanReplayConsumer::Process_vkResetQueryPool( uint32_t firstQuery, uint32_t queryCount) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -2826,6 +3022,7 @@ void VulkanReplayConsumer::Process_vkGetSemaphoreCounterValue( format::HandleId semaphore, PointerDecoder* pValue) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSemaphore in_semaphore = MapHandle(semaphore, &VulkanObjectInfoTable::GetSemaphoreInfo); uint64_t* out_pValue = pValue->IsNull() ? nullptr : pValue->AllocateOutputData(1, static_cast(0)); @@ -2841,6 +3038,7 @@ void VulkanReplayConsumer::Process_vkWaitSemaphores( StructPointerDecoder* pWaitInfo, uint64_t timeout) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pWaitInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -2855,6 +3053,7 @@ void VulkanReplayConsumer::Process_vkSignalSemaphore( format::HandleId device, StructPointerDecoder* pSignalInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkSemaphoreSignalInfo* in_pSignalInfo = pSignalInfo->GetPointer(); MapStructHandles(pSignalInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -2869,6 +3068,7 @@ void VulkanReplayConsumer::Process_vkGetBufferDeviceAddress( format::HandleId device, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -2882,6 +3082,7 @@ void VulkanReplayConsumer::Process_vkGetBufferOpaqueCaptureAddress( format::HandleId device, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkBufferDeviceAddressInfo* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -2895,6 +3096,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceMemoryOpaqueCaptureAddress( format::HandleId device, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDeviceMemoryOpaqueCaptureAddressInfo* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -2909,6 +3111,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceToolProperties( PointerDecoder* pToolCount, StructPointerDecoder* pToolProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); pToolCount->IsNull() ? nullptr : pToolCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceToolProperties", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceToolProperties, pToolCount, pToolProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); if (!pToolProperties->IsNull()) { pToolProperties->AllocateOutputData(*pToolCount->GetOutputPointer(), VkPhysicalDeviceToolProperties{ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES, nullptr }); } @@ -2927,11 +3130,13 @@ void VulkanReplayConsumer::Process_vkCreatePrivateDataSlot( StructPointerDecoder* pAllocator, HandlePointerDecoder* pPrivateDataSlot) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkPrivateDataSlotCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pPrivateDataSlot->IsNull()) { pPrivateDataSlot->SetHandleLength(1); } VkPrivateDataSlot* out_pPrivateDataSlot = pPrivateDataSlot->GetHandlePointer(); +ForwardIdToCaptureLayer(pPrivateDataSlot->GetPointer(), VK_OBJECT_TYPE_PRIVATE_DATA_SLOT); VkResult replay_result = GetDeviceTable(in_device)->CreatePrivateDataSlot(in_device, in_pCreateInfo, in_pAllocator, out_pPrivateDataSlot); CheckResult("vkCreatePrivateDataSlot", returnValue, replay_result, call_info); @@ -2945,6 +3150,7 @@ void VulkanReplayConsumer::Process_vkDestroyPrivateDataSlot( format::HandleId privateDataSlot, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPrivateDataSlot in_privateDataSlot = MapHandle(privateDataSlot, &VulkanObjectInfoTable::GetPrivateDataSlotInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -2962,6 +3168,7 @@ void VulkanReplayConsumer::Process_vkSetPrivateData( format::HandleId privateDataSlot, uint64_t data) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); uint64_t in_objectHandle = MapHandle(objectHandle, objectType); VkPrivateDataSlot in_privateDataSlot = MapHandle(privateDataSlot, &VulkanObjectInfoTable::GetPrivateDataSlotInfo); @@ -2978,6 +3185,7 @@ void VulkanReplayConsumer::Process_vkGetPrivateData( format::HandleId privateDataSlot, PointerDecoder* pData) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); uint64_t in_objectHandle = MapHandle(objectHandle, objectType); VkPrivateDataSlot in_privateDataSlot = MapHandle(privateDataSlot, &VulkanObjectInfoTable::GetPrivateDataSlotInfo); @@ -2992,6 +3200,7 @@ void VulkanReplayConsumer::Process_vkCmdSetEvent2( format::HandleId event, StructPointerDecoder* pDependencyInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkEvent in_event = MapHandle(event, &VulkanObjectInfoTable::GetEventInfo); const VkDependencyInfo* in_pDependencyInfo = pDependencyInfo->GetPointer(); @@ -3011,6 +3220,7 @@ void VulkanReplayConsumer::Process_vkCmdResetEvent2( format::HandleId event, VkPipelineStageFlags2 stageMask) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkEvent in_event = MapHandle(event, &VulkanObjectInfoTable::GetEventInfo); @@ -3029,6 +3239,7 @@ void VulkanReplayConsumer::Process_vkCmdWaitEvents2( HandlePointerDecoder* pEvents, StructPointerDecoder* pDependencyInfos) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkEvent* in_pEvents = MapHandles(pEvents, eventCount, &VulkanObjectInfoTable::GetEventInfo); const VkDependencyInfo* in_pDependencyInfos = pDependencyInfos->GetPointer(); @@ -3047,6 +3258,7 @@ void VulkanReplayConsumer::Process_vkCmdPipelineBarrier2( format::HandleId commandBuffer, StructPointerDecoder* pDependencyInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_commandBuffer = GetObjectInfoTable().GetCommandBufferInfo(commandBuffer); MapStructHandles(pDependencyInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3066,6 +3278,7 @@ void VulkanReplayConsumer::Process_vkCmdWriteTimestamp2( format::HandleId queryPool, uint32_t query) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -3085,6 +3298,7 @@ void VulkanReplayConsumer::Process_vkQueueSubmit2( StructPointerDecoder* pSubmits, format::HandleId fence) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_queue = GetObjectInfoTable().GetQueueInfo(queue); MapStructArrayHandles(pSubmits->GetMetaStructPointer(), pSubmits->GetLength(), GetObjectInfoTable()); @@ -3099,6 +3313,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyBuffer2( format::HandleId commandBuffer, StructPointerDecoder* pCopyBufferInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyBufferInfo2* in_pCopyBufferInfo = pCopyBufferInfo->GetPointer(); MapStructHandles(pCopyBufferInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3116,6 +3331,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyImage2( format::HandleId commandBuffer, StructPointerDecoder* pCopyImageInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyImageInfo2* in_pCopyImageInfo = pCopyImageInfo->GetPointer(); MapStructHandles(pCopyImageInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3133,6 +3349,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyBufferToImage2( format::HandleId commandBuffer, StructPointerDecoder* pCopyBufferToImageInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyBufferToImageInfo2* in_pCopyBufferToImageInfo = pCopyBufferToImageInfo->GetPointer(); MapStructHandles(pCopyBufferToImageInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3150,6 +3367,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyImageToBuffer2( format::HandleId commandBuffer, StructPointerDecoder* pCopyImageToBufferInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyImageToBufferInfo2* in_pCopyImageToBufferInfo = pCopyImageToBufferInfo->GetPointer(); MapStructHandles(pCopyImageToBufferInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3167,6 +3385,7 @@ void VulkanReplayConsumer::Process_vkCmdBlitImage2( format::HandleId commandBuffer, StructPointerDecoder* pBlitImageInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBlitImageInfo2* in_pBlitImageInfo = pBlitImageInfo->GetPointer(); MapStructHandles(pBlitImageInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3184,6 +3403,7 @@ void VulkanReplayConsumer::Process_vkCmdResolveImage2( format::HandleId commandBuffer, StructPointerDecoder* pResolveImageInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkResolveImageInfo2* in_pResolveImageInfo = pResolveImageInfo->GetPointer(); MapStructHandles(pResolveImageInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3201,6 +3421,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginRendering( format::HandleId commandBuffer, StructPointerDecoder* pRenderingInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkRenderingInfo* in_pRenderingInfo = pRenderingInfo->GetPointer(); MapStructHandles(pRenderingInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3217,6 +3438,7 @@ void VulkanReplayConsumer::Process_vkCmdEndRendering( const ApiCallInfo& call_info, format::HandleId commandBuffer) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdEndRendering(in_commandBuffer); @@ -3232,6 +3454,7 @@ void VulkanReplayConsumer::Process_vkCmdSetCullMode( format::HandleId commandBuffer, VkCullModeFlags cullMode) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetCullMode(in_commandBuffer, cullMode); @@ -3247,6 +3470,7 @@ void VulkanReplayConsumer::Process_vkCmdSetFrontFace( format::HandleId commandBuffer, VkFrontFace frontFace) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetFrontFace(in_commandBuffer, frontFace); @@ -3262,6 +3486,7 @@ void VulkanReplayConsumer::Process_vkCmdSetPrimitiveTopology( format::HandleId commandBuffer, VkPrimitiveTopology primitiveTopology) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetPrimitiveTopology(in_commandBuffer, primitiveTopology); @@ -3278,6 +3503,7 @@ void VulkanReplayConsumer::Process_vkCmdSetViewportWithCount( uint32_t viewportCount, StructPointerDecoder* pViewports) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkViewport* in_pViewports = pViewports->GetPointer(); @@ -3295,6 +3521,7 @@ void VulkanReplayConsumer::Process_vkCmdSetScissorWithCount( uint32_t scissorCount, StructPointerDecoder* pScissors) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkRect2D* in_pScissors = pScissors->GetPointer(); @@ -3316,6 +3543,7 @@ void VulkanReplayConsumer::Process_vkCmdBindVertexBuffers2( PointerDecoder* pSizes, PointerDecoder* pStrides) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBuffer* in_pBuffers = MapHandles(pBuffers, bindingCount, &VulkanObjectInfoTable::GetBufferInfo); const VkDeviceSize* in_pOffsets = pOffsets->GetPointer(); @@ -3335,6 +3563,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthTestEnable( format::HandleId commandBuffer, VkBool32 depthTestEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthTestEnable(in_commandBuffer, depthTestEnable); @@ -3350,6 +3579,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthWriteEnable( format::HandleId commandBuffer, VkBool32 depthWriteEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthWriteEnable(in_commandBuffer, depthWriteEnable); @@ -3365,6 +3595,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthCompareOp( format::HandleId commandBuffer, VkCompareOp depthCompareOp) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthCompareOp(in_commandBuffer, depthCompareOp); @@ -3380,6 +3611,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthBoundsTestEnable( format::HandleId commandBuffer, VkBool32 depthBoundsTestEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthBoundsTestEnable(in_commandBuffer, depthBoundsTestEnable); @@ -3395,6 +3627,7 @@ void VulkanReplayConsumer::Process_vkCmdSetStencilTestEnable( format::HandleId commandBuffer, VkBool32 stencilTestEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetStencilTestEnable(in_commandBuffer, stencilTestEnable); @@ -3414,6 +3647,7 @@ void VulkanReplayConsumer::Process_vkCmdSetStencilOp( VkStencilOp depthFailOp, VkCompareOp compareOp) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetStencilOp(in_commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp); @@ -3429,6 +3663,7 @@ void VulkanReplayConsumer::Process_vkCmdSetRasterizerDiscardEnable( format::HandleId commandBuffer, VkBool32 rasterizerDiscardEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetRasterizerDiscardEnable(in_commandBuffer, rasterizerDiscardEnable); @@ -3444,6 +3679,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthBiasEnable( format::HandleId commandBuffer, VkBool32 depthBiasEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthBiasEnable(in_commandBuffer, depthBiasEnable); @@ -3459,6 +3695,7 @@ void VulkanReplayConsumer::Process_vkCmdSetPrimitiveRestartEnable( format::HandleId commandBuffer, VkBool32 primitiveRestartEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetPrimitiveRestartEnable(in_commandBuffer, primitiveRestartEnable); @@ -3475,6 +3712,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceBufferMemoryRequirements( StructPointerDecoder* pInfo, StructPointerDecoder* pMemoryRequirements) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDeviceBufferMemoryRequirements* in_pInfo = pInfo->GetPointer(); VkMemoryRequirements2* out_pMemoryRequirements = pMemoryRequirements->IsNull() ? nullptr : pMemoryRequirements->AllocateOutputData(1, { VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2, nullptr }); @@ -3489,6 +3727,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceImageMemoryRequirements( StructPointerDecoder* pInfo, StructPointerDecoder* pMemoryRequirements) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDeviceImageMemoryRequirements* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3505,6 +3744,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceImageSparseMemoryRequirements( PointerDecoder* pSparseMemoryRequirementCount, StructPointerDecoder* pSparseMemoryRequirements) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDeviceImageMemoryRequirements* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3522,6 +3762,7 @@ void VulkanReplayConsumer::Process_vkDestroySurfaceKHR( format::HandleId surface, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); auto in_surface = GetObjectInfoTable().GetSurfaceKHRInfo(surface); if (in_surface == nullptr || in_surface->surface_creation_skipped) { return; } @@ -3543,6 +3784,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSurfaceSupportKHR( GFXRECON_LOG_DEBUG("Skip vkGetPhysicalDeviceSurfaceSupportKHR for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkSurfaceKHR in_surface = MapHandle(surface, &VulkanObjectInfoTable::GetSurfaceKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(surface) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(surface)->surface_creation_skipped) { return; } @@ -3564,6 +3806,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSurfaceCapabilitiesKHR( GFXRECON_LOG_DEBUG("Skip vkGetPhysicalDeviceSurfaceCapabilitiesKHR for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); auto in_surface = GetObjectInfoTable().GetSurfaceKHRInfo(surface); if (in_surface == nullptr || in_surface->surface_creation_skipped) { return; } @@ -3586,6 +3829,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSurfaceFormatsKHR( GFXRECON_LOG_DEBUG("Skip vkGetPhysicalDeviceSurfaceFormatsKHR for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkSurfaceKHR in_surface = MapHandle(surface, &VulkanObjectInfoTable::GetSurfaceKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(surface) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(surface)->surface_creation_skipped) { return; } @@ -3611,6 +3855,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSurfacePresentModesKHR( GFXRECON_LOG_DEBUG("Skip vkGetPhysicalDeviceSurfacePresentModesKHR for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkSurfaceKHR in_surface = MapHandle(surface, &VulkanObjectInfoTable::GetSurfaceKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(surface) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(surface)->surface_creation_skipped) { return; } @@ -3631,12 +3876,14 @@ void VulkanReplayConsumer::Process_vkCreateSwapchainKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSwapchain) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); if (!pSwapchain->IsNull()) { pSwapchain->SetHandleLength(1); } SwapchainKHRInfo handle_info; pSwapchain->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pSwapchain->GetPointer(), VK_OBJECT_TYPE_SWAPCHAIN_KHR); VkResult replay_result = OverrideCreateSwapchainKHR(GetDeviceTable(in_device->handle)->CreateSwapchainKHR, returnValue, in_device, pCreateInfo, pAllocator, pSwapchain); CheckResult("vkCreateSwapchainKHR", returnValue, replay_result, call_info); @@ -3650,6 +3897,7 @@ void VulkanReplayConsumer::Process_vkDestroySwapchainKHR( format::HandleId swapchain, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_swapchain = GetObjectInfoTable().GetSwapchainKHRInfo(swapchain); @@ -3665,11 +3913,13 @@ void VulkanReplayConsumer::Process_vkGetSwapchainImagesKHR( PointerDecoder* pSwapchainImageCount, HandlePointerDecoder* pSwapchainImages) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_swapchain = GetObjectInfoTable().GetSwapchainKHRInfo(swapchain); pSwapchainImageCount->IsNull() ? nullptr : pSwapchainImageCount->AllocateOutputData(1, GetOutputArrayCount("vkGetSwapchainImagesKHR", returnValue, swapchain, kSwapchainKHRArrayGetSwapchainImagesKHR, pSwapchainImageCount, pSwapchainImages, &VulkanObjectInfoTable::GetSwapchainKHRInfo)); if (!pSwapchainImages->IsNull()) { pSwapchainImages->SetHandleLength(*pSwapchainImageCount->GetOutputPointer()); } std::vector handle_info(*pSwapchainImageCount->GetOutputPointer()); + ForwardIdsToCaptureLayer(pSwapchainImages->GetPointer(), pSwapchainImages->GetLength(), pSwapchainImages->GetHandlePointer(), *pSwapchainImageCount->GetOutputPointer(), VK_OBJECT_TYPE_IMAGE); for (size_t i = 0; i < *pSwapchainImageCount->GetOutputPointer(); ++i) { pSwapchainImages->SetConsumerData(i, &handle_info[i]); } VkResult replay_result = OverrideGetSwapchainImagesKHR(GetDeviceTable(in_device->handle)->GetSwapchainImagesKHR, returnValue, in_device, in_swapchain, pSwapchainImageCount, pSwapchainImages); @@ -3689,6 +3939,7 @@ void VulkanReplayConsumer::Process_vkAcquireNextImageKHR( format::HandleId fence, PointerDecoder* pImageIndex) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_swapchain = GetObjectInfoTable().GetSwapchainKHRInfo(swapchain); auto in_semaphore = GetObjectInfoTable().GetSemaphoreInfo(semaphore); @@ -3705,6 +3956,7 @@ void VulkanReplayConsumer::Process_vkQueuePresentKHR( format::HandleId queue, StructPointerDecoder* pPresentInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_queue = GetObjectInfoTable().GetQueueInfo(queue); MapStructHandles(pPresentInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3724,6 +3976,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceGroupPresentCapabilitiesKHR( GFXRECON_LOG_DEBUG("Skip vkGetDeviceGroupPresentCapabilitiesKHR for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeviceGroupPresentCapabilitiesKHR* out_pDeviceGroupPresentCapabilities = pDeviceGroupPresentCapabilities->IsNull() ? nullptr : pDeviceGroupPresentCapabilities->AllocateOutputData(1, { VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR, nullptr }); InitializeOutputStructPNext(pDeviceGroupPresentCapabilities); @@ -3744,6 +3997,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceGroupSurfacePresentModesKHR( GFXRECON_LOG_DEBUG("Skip vkGetDeviceGroupSurfacePresentModesKHR for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSurfaceKHR in_surface = MapHandle(surface, &VulkanObjectInfoTable::GetSurfaceKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(surface) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(surface)->surface_creation_skipped) { return; } @@ -3766,6 +4020,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDevicePresentRectanglesKHR( GFXRECON_LOG_DEBUG("Skip vkGetPhysicalDevicePresentRectanglesKHR for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkSurfaceKHR in_surface = MapHandle(surface, &VulkanObjectInfoTable::GetSurfaceKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(surface) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(surface)->surface_creation_skipped) { return; } @@ -3785,6 +4040,7 @@ void VulkanReplayConsumer::Process_vkAcquireNextImage2KHR( StructPointerDecoder* pAcquireInfo, PointerDecoder* pImageIndex) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pAcquireInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3801,6 +4057,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceDisplayPropertiesKHR( PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceDisplayPropertiesKHR", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceDisplayPropertiesKHR, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkDisplayPropertiesKHR* out_pProperties = pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(*out_pPropertyCount); @@ -3819,6 +4076,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceDisplayPlanePropertiesKHR( PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceDisplayPlanePropertiesKHR", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceDisplayPlanePropertiesKHR, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkDisplayPlanePropertiesKHR* out_pProperties = pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(*out_pPropertyCount); @@ -3838,10 +4096,12 @@ void VulkanReplayConsumer::Process_vkGetDisplayPlaneSupportedDisplaysKHR( PointerDecoder* pDisplayCount, HandlePointerDecoder* pDisplays) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pDisplayCount = pDisplayCount->IsNull() ? nullptr : pDisplayCount->AllocateOutputData(1, GetOutputArrayCount("vkGetDisplayPlaneSupportedDisplaysKHR", returnValue, physicalDevice, kPhysicalDeviceArrayGetDisplayPlaneSupportedDisplaysKHR, pDisplayCount, pDisplays, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); if (!pDisplays->IsNull()) { pDisplays->SetHandleLength(*out_pDisplayCount); } VkDisplayKHR* out_pDisplays = pDisplays->GetHandlePointer(); +ForwardIdsToCaptureLayer(pDisplays->GetPointer(), pDisplays->GetLength(), pDisplays->GetHandlePointer(), *out_pDisplayCount, VK_OBJECT_TYPE_DISPLAY_KHR); VkResult replay_result = GetInstanceTable(in_physicalDevice)->GetDisplayPlaneSupportedDisplaysKHR(in_physicalDevice, planeIndex, out_pDisplayCount, out_pDisplays); CheckResult("vkGetDisplayPlaneSupportedDisplaysKHR", returnValue, replay_result, call_info); @@ -3858,6 +4118,7 @@ void VulkanReplayConsumer::Process_vkGetDisplayModePropertiesKHR( PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkDisplayKHR in_display = MapHandle(display, &VulkanObjectInfoTable::GetDisplayKHRInfo); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetDisplayModePropertiesKHR", returnValue, display, kDisplayKHRArrayGetDisplayModePropertiesKHR, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetDisplayKHRInfo)); @@ -3879,12 +4140,14 @@ void VulkanReplayConsumer::Process_vkCreateDisplayModeKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pMode) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkDisplayKHR in_display = MapHandle(display, &VulkanObjectInfoTable::GetDisplayKHRInfo); const VkDisplayModeCreateInfoKHR* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pMode->IsNull()) { pMode->SetHandleLength(1); } VkDisplayModeKHR* out_pMode = pMode->GetHandlePointer(); +ForwardIdToCaptureLayer(pMode->GetPointer(), VK_OBJECT_TYPE_DISPLAY_MODE_KHR); VkResult replay_result = GetInstanceTable(in_physicalDevice)->CreateDisplayModeKHR(in_physicalDevice, in_display, in_pCreateInfo, in_pAllocator, out_pMode); CheckResult("vkCreateDisplayModeKHR", returnValue, replay_result, call_info); @@ -3900,6 +4163,7 @@ void VulkanReplayConsumer::Process_vkGetDisplayPlaneCapabilitiesKHR( uint32_t planeIndex, StructPointerDecoder* pCapabilities) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkDisplayModeKHR in_mode = MapHandle(mode, &VulkanObjectInfoTable::GetDisplayModeKHRInfo); VkDisplayPlaneCapabilitiesKHR* out_pCapabilities = pCapabilities->IsNull() ? nullptr : pCapabilities->AllocateOutputData(1); @@ -3916,12 +4180,14 @@ void VulkanReplayConsumer::Process_vkCreateDisplayPlaneSurfaceKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } SurfaceKHRInfo handle_info; pSurface->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pSurface->GetPointer(), VK_OBJECT_TYPE_SURFACE_KHR); VkResult replay_result = OverrideCreateDisplayPlaneSurfaceKHR(GetInstanceTable(in_instance->handle)->CreateDisplayPlaneSurfaceKHR, returnValue, in_instance, pCreateInfo, pAllocator, pSurface); CheckResult("vkCreateDisplayPlaneSurfaceKHR", returnValue, replay_result, call_info); @@ -3938,11 +4204,13 @@ void VulkanReplayConsumer::Process_vkCreateSharedSwapchainsKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSwapchains) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructArrayHandles(pCreateInfos->GetMetaStructPointer(), pCreateInfos->GetLength(), GetObjectInfoTable()); if (!pSwapchains->IsNull()) { pSwapchains->SetHandleLength(swapchainCount); } std::vector handle_info(swapchainCount); + ForwardIdsToCaptureLayer(pSwapchains->GetPointer(), pSwapchains->GetLength(), pSwapchains->GetHandlePointer(), swapchainCount, VK_OBJECT_TYPE_SWAPCHAIN_KHR); for (size_t i = 0; i < swapchainCount; ++i) { pSwapchains->SetConsumerData(i, &handle_info[i]); } VkResult replay_result = OverrideCreateSharedSwapchainsKHR(GetDeviceTable(in_device->handle)->CreateSharedSwapchainsKHR, returnValue, in_device, swapchainCount, pCreateInfos, pAllocator, pSwapchains); @@ -3959,10 +4227,12 @@ void VulkanReplayConsumer::Process_vkCreateXlibSurfaceKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } SurfaceKHRInfo handle_info; pSurface->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pSurface->GetPointer(), VK_OBJECT_TYPE_SURFACE_KHR); VkResult replay_result = OverrideCreateXlibSurfaceKHR(GetInstanceTable(in_instance->handle)->CreateXlibSurfaceKHR, returnValue, in_instance, pCreateInfo, pAllocator, pSurface); CheckResult("vkCreateXlibSurfaceKHR", returnValue, replay_result, call_info); @@ -3978,6 +4248,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceXlibPresentationSupportKHR uint64_t dpy, size_t visualID) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); Display* in_dpy = static_cast(PreProcessExternalObject(dpy, format::ApiCallId::ApiCall_vkGetPhysicalDeviceXlibPresentationSupportKHR, "vkGetPhysicalDeviceXlibPresentationSupportKHR")); @@ -3992,10 +4263,12 @@ void VulkanReplayConsumer::Process_vkCreateXcbSurfaceKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } SurfaceKHRInfo handle_info; pSurface->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pSurface->GetPointer(), VK_OBJECT_TYPE_SURFACE_KHR); VkResult replay_result = OverrideCreateXcbSurfaceKHR(GetInstanceTable(in_instance->handle)->CreateXcbSurfaceKHR, returnValue, in_instance, pCreateInfo, pAllocator, pSurface); CheckResult("vkCreateXcbSurfaceKHR", returnValue, replay_result, call_info); @@ -4011,6 +4284,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceXcbPresentationSupportKHR( uint64_t connection, uint32_t visual_id) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); xcb_connection_t* in_connection = static_cast(PreProcessExternalObject(connection, format::ApiCallId::ApiCall_vkGetPhysicalDeviceXcbPresentationSupportKHR, "vkGetPhysicalDeviceXcbPresentationSupportKHR")); @@ -4025,10 +4299,12 @@ void VulkanReplayConsumer::Process_vkCreateWaylandSurfaceKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } SurfaceKHRInfo handle_info; pSurface->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pSurface->GetPointer(), VK_OBJECT_TYPE_SURFACE_KHR); VkResult replay_result = OverrideCreateWaylandSurfaceKHR(GetInstanceTable(in_instance->handle)->CreateWaylandSurfaceKHR, returnValue, in_instance, pCreateInfo, pAllocator, pSurface); CheckResult("vkCreateWaylandSurfaceKHR", returnValue, replay_result, call_info); @@ -4043,6 +4319,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceWaylandPresentationSupport uint32_t queueFamilyIndex, uint64_t display) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); struct wl_display* in_display = static_cast(PreProcessExternalObject(display, format::ApiCallId::ApiCall_vkGetPhysicalDeviceWaylandPresentationSupportKHR, "vkGetPhysicalDeviceWaylandPresentationSupportKHR")); @@ -4057,10 +4334,12 @@ void VulkanReplayConsumer::Process_vkCreateAndroidSurfaceKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } SurfaceKHRInfo handle_info; pSurface->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pSurface->GetPointer(), VK_OBJECT_TYPE_SURFACE_KHR); VkResult replay_result = OverrideCreateAndroidSurfaceKHR(GetInstanceTable(in_instance->handle)->CreateAndroidSurfaceKHR, returnValue, in_instance, pCreateInfo, pAllocator, pSurface); CheckResult("vkCreateAndroidSurfaceKHR", returnValue, replay_result, call_info); @@ -4076,10 +4355,12 @@ void VulkanReplayConsumer::Process_vkCreateWin32SurfaceKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } SurfaceKHRInfo handle_info; pSurface->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pSurface->GetPointer(), VK_OBJECT_TYPE_SURFACE_KHR); VkResult replay_result = OverrideCreateWin32SurfaceKHR(GetInstanceTable(in_instance->handle)->CreateWin32SurfaceKHR, returnValue, in_instance, pCreateInfo, pAllocator, pSurface); CheckResult("vkCreateWin32SurfaceKHR", returnValue, replay_result, call_info); @@ -4093,6 +4374,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceWin32PresentationSupportKH format::HandleId physicalDevice, uint32_t queueFamilyIndex) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); OverrideGetPhysicalDeviceWin32PresentationSupportKHR(GetInstanceTable(in_physicalDevice->handle)->GetPhysicalDeviceWin32PresentationSupportKHR, in_physicalDevice, queueFamilyIndex); @@ -4105,6 +4387,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceVideoCapabilitiesKHR( StructPointerDecoder* pVideoProfile, StructPointerDecoder* pCapabilities) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkVideoProfileInfoKHR* in_pVideoProfile = pVideoProfile->GetPointer(); VkVideoCapabilitiesKHR* out_pCapabilities = pCapabilities->IsNull() ? nullptr : pCapabilities->AllocateOutputData(1, { VK_STRUCTURE_TYPE_VIDEO_CAPABILITIES_KHR, nullptr }); @@ -4122,6 +4405,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceVideoFormatPropertiesKHR( PointerDecoder* pVideoFormatPropertyCount, StructPointerDecoder* pVideoFormatProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceVideoFormatInfoKHR* in_pVideoFormatInfo = pVideoFormatInfo->GetPointer(); uint32_t* out_pVideoFormatPropertyCount = pVideoFormatPropertyCount->IsNull() ? nullptr : pVideoFormatPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceVideoFormatPropertiesKHR", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceVideoFormatPropertiesKHR, pVideoFormatPropertyCount, pVideoFormatProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); @@ -4141,10 +4425,12 @@ void VulkanReplayConsumer::Process_vkCreateVideoSessionKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pVideoSession) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); if (!pVideoSession->IsNull()) { pVideoSession->SetHandleLength(1); } VideoSessionKHRInfo handle_info; pVideoSession->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pVideoSession->GetPointer(), VK_OBJECT_TYPE_VIDEO_SESSION_KHR); VkResult replay_result = OverrideCreateVideoSessionKHR(GetDeviceTable(in_device->handle)->CreateVideoSessionKHR, returnValue, in_device, pCreateInfo, pAllocator, pVideoSession); CheckResult("vkCreateVideoSessionKHR", returnValue, replay_result, call_info); @@ -4158,6 +4444,7 @@ void VulkanReplayConsumer::Process_vkDestroyVideoSessionKHR( format::HandleId videoSession, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_videoSession = GetObjectInfoTable().GetVideoSessionKHRInfo(videoSession); @@ -4173,6 +4460,7 @@ void VulkanReplayConsumer::Process_vkGetVideoSessionMemoryRequirementsKHR( PointerDecoder* pMemoryRequirementsCount, StructPointerDecoder* pMemoryRequirements) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkVideoSessionKHR in_videoSession = MapHandle(videoSession, &VulkanObjectInfoTable::GetVideoSessionKHRInfo); uint32_t* out_pMemoryRequirementsCount = pMemoryRequirementsCount->IsNull() ? nullptr : pMemoryRequirementsCount->AllocateOutputData(1, GetOutputArrayCount("vkGetVideoSessionMemoryRequirementsKHR", returnValue, videoSession, kVideoSessionKHRArrayGetVideoSessionMemoryRequirementsKHR, pMemoryRequirementsCount, pMemoryRequirements, &VulkanObjectInfoTable::GetVideoSessionKHRInfo)); @@ -4192,6 +4480,7 @@ void VulkanReplayConsumer::Process_vkBindVideoSessionMemoryKHR( uint32_t bindSessionMemoryInfoCount, StructPointerDecoder* pBindSessionMemoryInfos) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_videoSession = GetObjectInfoTable().GetVideoSessionKHRInfo(videoSession); @@ -4209,12 +4498,14 @@ void VulkanReplayConsumer::Process_vkCreateVideoSessionParametersKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pVideoSessionParameters) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkVideoSessionParametersCreateInfoKHR* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pVideoSessionParameters->IsNull()) { pVideoSessionParameters->SetHandleLength(1); } VkVideoSessionParametersKHR* out_pVideoSessionParameters = pVideoSessionParameters->GetHandlePointer(); +ForwardIdToCaptureLayer(pVideoSessionParameters->GetPointer(), VK_OBJECT_TYPE_VIDEO_SESSION_PARAMETERS_KHR); VkResult replay_result = GetDeviceTable(in_device)->CreateVideoSessionParametersKHR(in_device, in_pCreateInfo, in_pAllocator, out_pVideoSessionParameters); CheckResult("vkCreateVideoSessionParametersKHR", returnValue, replay_result, call_info); @@ -4229,6 +4520,7 @@ void VulkanReplayConsumer::Process_vkUpdateVideoSessionParametersKHR( format::HandleId videoSessionParameters, StructPointerDecoder* pUpdateInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkVideoSessionParametersKHR in_videoSessionParameters = MapHandle(videoSessionParameters, &VulkanObjectInfoTable::GetVideoSessionParametersKHRInfo); const VkVideoSessionParametersUpdateInfoKHR* in_pUpdateInfo = pUpdateInfo->GetPointer(); @@ -4243,6 +4535,7 @@ void VulkanReplayConsumer::Process_vkDestroyVideoSessionParametersKHR( format::HandleId videoSessionParameters, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkVideoSessionParametersKHR in_videoSessionParameters = MapHandle(videoSessionParameters, &VulkanObjectInfoTable::GetVideoSessionParametersKHRInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -4256,6 +4549,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginVideoCodingKHR( format::HandleId commandBuffer, StructPointerDecoder* pBeginInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkVideoBeginCodingInfoKHR* in_pBeginInfo = pBeginInfo->GetPointer(); MapStructHandles(pBeginInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4273,6 +4567,7 @@ void VulkanReplayConsumer::Process_vkCmdEndVideoCodingKHR( format::HandleId commandBuffer, StructPointerDecoder* pEndCodingInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkVideoEndCodingInfoKHR* in_pEndCodingInfo = pEndCodingInfo->GetPointer(); @@ -4289,6 +4584,7 @@ void VulkanReplayConsumer::Process_vkCmdControlVideoCodingKHR( format::HandleId commandBuffer, StructPointerDecoder* pCodingControlInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkVideoCodingControlInfoKHR* in_pCodingControlInfo = pCodingControlInfo->GetPointer(); @@ -4305,6 +4601,7 @@ void VulkanReplayConsumer::Process_vkCmdDecodeVideoKHR( format::HandleId commandBuffer, StructPointerDecoder* pDecodeInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkVideoDecodeInfoKHR* in_pDecodeInfo = pDecodeInfo->GetPointer(); MapStructHandles(pDecodeInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4322,6 +4619,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginRenderingKHR( format::HandleId commandBuffer, StructPointerDecoder* pRenderingInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkRenderingInfo* in_pRenderingInfo = pRenderingInfo->GetPointer(); MapStructHandles(pRenderingInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4338,6 +4636,7 @@ void VulkanReplayConsumer::Process_vkCmdEndRenderingKHR( const ApiCallInfo& call_info, format::HandleId commandBuffer) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdEndRenderingKHR(in_commandBuffer); @@ -4353,6 +4652,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceFeatures2KHR( format::HandleId physicalDevice, StructPointerDecoder* pFeatures) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkPhysicalDeviceFeatures2* out_pFeatures = pFeatures->IsNull() ? nullptr : pFeatures->AllocateOutputData(1, { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, nullptr }); InitializeOutputStructPNext(pFeatures); @@ -4365,6 +4665,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceProperties2KHR( format::HandleId physicalDevice, StructPointerDecoder* pProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, nullptr }); InitializeOutputStructPNext(pProperties); @@ -4378,6 +4679,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceFormatProperties2KHR( VkFormat format, StructPointerDecoder* pFormatProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkFormatProperties2* out_pFormatProperties = pFormatProperties->IsNull() ? nullptr : pFormatProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2, nullptr }); InitializeOutputStructPNext(pFormatProperties); @@ -4392,6 +4694,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceImageFormatProperties2KHR( StructPointerDecoder* pImageFormatInfo, StructPointerDecoder* pImageFormatProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceImageFormatInfo2* in_pImageFormatInfo = pImageFormatInfo->GetPointer(); VkImageFormatProperties2* out_pImageFormatProperties = pImageFormatProperties->IsNull() ? nullptr : pImageFormatProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2, nullptr }); @@ -4407,6 +4710,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceQueueFamilyProperties2KHR( PointerDecoder* pQueueFamilyPropertyCount, StructPointerDecoder* pQueueFamilyProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pQueueFamilyPropertyCount = pQueueFamilyPropertyCount->IsNull() ? nullptr : pQueueFamilyPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceQueueFamilyProperties2KHR", VK_SUCCESS, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceQueueFamilyProperties2KHR, pQueueFamilyPropertyCount, pQueueFamilyProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkQueueFamilyProperties2* out_pQueueFamilyProperties = pQueueFamilyProperties->IsNull() ? nullptr : pQueueFamilyProperties->AllocateOutputData(*out_pQueueFamilyPropertyCount, VkQueueFamilyProperties2{ VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2, nullptr }); @@ -4421,6 +4725,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceMemoryProperties2KHR( format::HandleId physicalDevice, StructPointerDecoder* pMemoryProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); pMemoryProperties->IsNull() ? nullptr : pMemoryProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2, nullptr }); InitializeOutputStructPNext(pMemoryProperties); @@ -4435,6 +4740,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSparseImageFormatPropertie PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceSparseImageFormatInfo2* in_pFormatInfo = pFormatInfo->GetPointer(); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceSparseImageFormatProperties2KHR", VK_SUCCESS, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceSparseImageFormatProperties2KHR, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); @@ -4453,6 +4759,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceGroupPeerMemoryFeaturesKHR( uint32_t remoteDeviceIndex, PointerDecoder* pPeerMemoryFeatures) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPeerMemoryFeatureFlags* out_pPeerMemoryFeatures = pPeerMemoryFeatures->IsNull() ? nullptr : pPeerMemoryFeatures->AllocateOutputData(1, static_cast(0)); @@ -4464,6 +4771,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDeviceMaskKHR( format::HandleId commandBuffer, uint32_t deviceMask) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDeviceMaskKHR(in_commandBuffer, deviceMask); @@ -4484,6 +4792,7 @@ void VulkanReplayConsumer::Process_vkCmdDispatchBaseKHR( uint32_t groupCountY, uint32_t groupCountZ) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdDispatchBaseKHR(in_commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); @@ -4500,6 +4809,7 @@ void VulkanReplayConsumer::Process_vkTrimCommandPoolKHR( format::HandleId commandPool, VkCommandPoolTrimFlags flags) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkCommandPool in_commandPool = MapHandle(commandPool, &VulkanObjectInfoTable::GetCommandPoolInfo); @@ -4513,6 +4823,7 @@ void VulkanReplayConsumer::Process_vkEnumeratePhysicalDeviceGroupsKHR( PointerDecoder* pPhysicalDeviceGroupCount, StructPointerDecoder* pPhysicalDeviceGroupProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); pPhysicalDeviceGroupCount->IsNull() ? nullptr : pPhysicalDeviceGroupCount->AllocateOutputData(1, GetOutputArrayCount("vkEnumeratePhysicalDeviceGroupsKHR", returnValue, instance, kInstanceArrayEnumeratePhysicalDeviceGroupsKHR, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties, &VulkanObjectInfoTable::GetInstanceInfo)); SetStructArrayHandleLengths(pPhysicalDeviceGroupProperties->GetMetaStructPointer(), pPhysicalDeviceGroupProperties->GetLength()); @@ -4531,6 +4842,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceExternalBufferPropertiesKH StructPointerDecoder* pExternalBufferInfo, StructPointerDecoder* pExternalBufferProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceExternalBufferInfo* in_pExternalBufferInfo = pExternalBufferInfo->GetPointer(); VkExternalBufferProperties* out_pExternalBufferProperties = pExternalBufferProperties->IsNull() ? nullptr : pExternalBufferProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES, nullptr }); @@ -4546,6 +4858,7 @@ void VulkanReplayConsumer::Process_vkGetMemoryWin32HandleKHR( StructPointerDecoder* pGetWin32HandleInfo, PointerDecoder* pHandle) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMemoryGetWin32HandleInfoKHR* in_pGetWin32HandleInfo = pGetWin32HandleInfo->GetPointer(); MapStructHandles(pGetWin32HandleInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4565,6 +4878,7 @@ void VulkanReplayConsumer::Process_vkGetMemoryWin32HandlePropertiesKHR( uint64_t handle, StructPointerDecoder* pMemoryWin32HandleProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); HANDLE in_handle = static_cast(PreProcessExternalObject(handle, format::ApiCallId::ApiCall_vkGetMemoryWin32HandlePropertiesKHR, "vkGetMemoryWin32HandlePropertiesKHR")); VkMemoryWin32HandlePropertiesKHR* out_pMemoryWin32HandleProperties = pMemoryWin32HandleProperties->IsNull() ? nullptr : pMemoryWin32HandleProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR, nullptr }); @@ -4581,6 +4895,7 @@ void VulkanReplayConsumer::Process_vkGetMemoryFdKHR( StructPointerDecoder* pGetFdInfo, PointerDecoder* pFd) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMemoryGetFdInfoKHR* in_pGetFdInfo = pGetFdInfo->GetPointer(); MapStructHandles(pGetFdInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4598,6 +4913,7 @@ void VulkanReplayConsumer::Process_vkGetMemoryFdPropertiesKHR( int fd, StructPointerDecoder* pMemoryFdProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkMemoryFdPropertiesKHR* out_pMemoryFdProperties = pMemoryFdProperties->IsNull() ? nullptr : pMemoryFdProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR, nullptr }); InitializeOutputStructPNext(pMemoryFdProperties); @@ -4612,6 +4928,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceExternalSemaphorePropertie StructPointerDecoder* pExternalSemaphoreInfo, StructPointerDecoder* pExternalSemaphoreProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceExternalSemaphoreInfo* in_pExternalSemaphoreInfo = pExternalSemaphoreInfo->GetPointer(); VkExternalSemaphoreProperties* out_pExternalSemaphoreProperties = pExternalSemaphoreProperties->IsNull() ? nullptr : pExternalSemaphoreProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES, nullptr }); @@ -4626,6 +4943,7 @@ void VulkanReplayConsumer::Process_vkImportSemaphoreWin32HandleKHR( format::HandleId device, StructPointerDecoder* pImportSemaphoreWin32HandleInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pImportSemaphoreWin32HandleInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4641,6 +4959,7 @@ void VulkanReplayConsumer::Process_vkGetSemaphoreWin32HandleKHR( StructPointerDecoder* pGetWin32HandleInfo, PointerDecoder* pHandle) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkSemaphoreGetWin32HandleInfoKHR* in_pGetWin32HandleInfo = pGetWin32HandleInfo->GetPointer(); MapStructHandles(pGetWin32HandleInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4658,6 +4977,7 @@ void VulkanReplayConsumer::Process_vkImportSemaphoreFdKHR( format::HandleId device, StructPointerDecoder* pImportSemaphoreFdInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pImportSemaphoreFdInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4673,6 +4993,7 @@ void VulkanReplayConsumer::Process_vkGetSemaphoreFdKHR( StructPointerDecoder* pGetFdInfo, PointerDecoder* pFd) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pGetFdInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4691,6 +5012,7 @@ void VulkanReplayConsumer::Process_vkCmdPushDescriptorSetKHR( uint32_t descriptorWriteCount, StructPointerDecoder* pDescriptorWrites) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkPipelineLayout in_layout = MapHandle(layout, &VulkanObjectInfoTable::GetPipelineLayoutInfo); const VkWriteDescriptorSet* in_pDescriptorWrites = pDescriptorWrites->GetPointer(); @@ -4712,12 +5034,14 @@ void VulkanReplayConsumer::Process_vkCreateDescriptorUpdateTemplateKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pDescriptorUpdateTemplate) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); if (!pDescriptorUpdateTemplate->IsNull()) { pDescriptorUpdateTemplate->SetHandleLength(1); } DescriptorUpdateTemplateInfo handle_info; pDescriptorUpdateTemplate->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pDescriptorUpdateTemplate->GetPointer(), VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE); VkResult replay_result = OverrideCreateDescriptorUpdateTemplate(GetDeviceTable(in_device->handle)->CreateDescriptorUpdateTemplateKHR, returnValue, in_device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate); CheckResult("vkCreateDescriptorUpdateTemplateKHR", returnValue, replay_result, call_info); @@ -4731,6 +5055,7 @@ void VulkanReplayConsumer::Process_vkDestroyDescriptorUpdateTemplateKHR( format::HandleId descriptorUpdateTemplate, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_descriptorUpdateTemplate = GetObjectInfoTable().GetDescriptorUpdateTemplateInfo(descriptorUpdateTemplate); @@ -4746,10 +5071,12 @@ void VulkanReplayConsumer::Process_vkCreateRenderPass2KHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pRenderPass) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); if (!pRenderPass->IsNull()) { pRenderPass->SetHandleLength(1); } RenderPassInfo handle_info; pRenderPass->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pRenderPass->GetPointer(), VK_OBJECT_TYPE_RENDER_PASS); VkResult replay_result = OverrideCreateRenderPass2(GetDeviceTable(in_device->handle)->CreateRenderPass2KHR, returnValue, in_device, pCreateInfo, pAllocator, pRenderPass); CheckResult("vkCreateRenderPass2KHR", returnValue, replay_result, call_info); @@ -4763,6 +5090,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginRenderPass2KHR( StructPointerDecoder* pRenderPassBegin, StructPointerDecoder* pSubpassBeginInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_commandBuffer = GetObjectInfoTable().GetCommandBufferInfo(commandBuffer); MapStructHandles(pRenderPassBegin->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4781,6 +5109,7 @@ void VulkanReplayConsumer::Process_vkCmdNextSubpass2KHR( StructPointerDecoder* pSubpassBeginInfo, StructPointerDecoder* pSubpassEndInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkSubpassBeginInfo* in_pSubpassBeginInfo = pSubpassBeginInfo->GetPointer(); const VkSubpassEndInfo* in_pSubpassEndInfo = pSubpassEndInfo->GetPointer(); @@ -4798,6 +5127,7 @@ void VulkanReplayConsumer::Process_vkCmdEndRenderPass2KHR( format::HandleId commandBuffer, StructPointerDecoder* pSubpassEndInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkSubpassEndInfo* in_pSubpassEndInfo = pSubpassEndInfo->GetPointer(); @@ -4820,6 +5150,7 @@ void VulkanReplayConsumer::Process_vkGetSwapchainStatusKHR( GFXRECON_LOG_DEBUG("Skip vkGetSwapchainStatusKHR for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapchain = MapHandle(swapchain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id)->surface_creation_skipped) { return; } @@ -4834,6 +5165,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceExternalFencePropertiesKHR StructPointerDecoder* pExternalFenceInfo, StructPointerDecoder* pExternalFenceProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceExternalFenceInfo* in_pExternalFenceInfo = pExternalFenceInfo->GetPointer(); VkExternalFenceProperties* out_pExternalFenceProperties = pExternalFenceProperties->IsNull() ? nullptr : pExternalFenceProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES, nullptr }); @@ -4848,6 +5180,7 @@ void VulkanReplayConsumer::Process_vkImportFenceWin32HandleKHR( format::HandleId device, StructPointerDecoder* pImportFenceWin32HandleInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkImportFenceWin32HandleInfoKHR* in_pImportFenceWin32HandleInfo = pImportFenceWin32HandleInfo->GetPointer(); MapStructHandles(pImportFenceWin32HandleInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4863,6 +5196,7 @@ void VulkanReplayConsumer::Process_vkGetFenceWin32HandleKHR( StructPointerDecoder* pGetWin32HandleInfo, PointerDecoder* pHandle) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkFenceGetWin32HandleInfoKHR* in_pGetWin32HandleInfo = pGetWin32HandleInfo->GetPointer(); MapStructHandles(pGetWin32HandleInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4880,6 +5214,7 @@ void VulkanReplayConsumer::Process_vkImportFenceFdKHR( format::HandleId device, StructPointerDecoder* pImportFenceFdInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkImportFenceFdInfoKHR* in_pImportFenceFdInfo = pImportFenceFdInfo->GetPointer(); MapStructHandles(pImportFenceFdInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4895,6 +5230,7 @@ void VulkanReplayConsumer::Process_vkGetFenceFdKHR( StructPointerDecoder* pGetFdInfo, PointerDecoder* pFd) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkFenceGetFdInfoKHR* in_pGetFdInfo = pGetFdInfo->GetPointer(); MapStructHandles(pGetFdInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4913,6 +5249,7 @@ void VulkanReplayConsumer::Process_vkEnumeratePhysicalDeviceQueueFamilyPerforman StructPointerDecoder* pCounters, StructPointerDecoder* pCounterDescriptions) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pCounterCount = pCounterCount->IsNull() ? nullptr : pCounterCount->AllocateOutputData(1, GetOutputArrayCount("vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR", returnValue, physicalDevice, kPhysicalDeviceArrayEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR, pCounterCount, pCounterDescriptions, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkPerformanceCounterKHR* out_pCounters = pCounters->IsNull() ? nullptr : pCounters->AllocateOutputData(*out_pCounterCount, VkPerformanceCounterKHR{ VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR, nullptr }); @@ -4931,6 +5268,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceQueueFamilyPerformanceQuer StructPointerDecoder* pPerformanceQueryCreateInfo, PointerDecoder* pNumPasses) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkQueryPoolPerformanceCreateInfoKHR* in_pPerformanceQueryCreateInfo = pPerformanceQueryCreateInfo->GetPointer(); uint32_t* out_pNumPasses = pNumPasses->IsNull() ? nullptr : pNumPasses->AllocateOutputData(1, static_cast(0)); @@ -4944,6 +5282,7 @@ void VulkanReplayConsumer::Process_vkAcquireProfilingLockKHR( format::HandleId device, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); VkResult replay_result = OverrideAcquireProfilingLockKHR(GetDeviceTable(in_device->handle)->AcquireProfilingLockKHR, returnValue, in_device, pInfo); @@ -4954,6 +5293,7 @@ void VulkanReplayConsumer::Process_vkReleaseProfilingLockKHR( const ApiCallInfo& call_info, format::HandleId device) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); GetDeviceTable(in_device)->ReleaseProfilingLockKHR(in_device); @@ -4971,6 +5311,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSurfaceCapabilities2KHR( GFXRECON_LOG_DEBUG("Skip vkGetPhysicalDeviceSurfaceCapabilities2KHR for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); if (pSurfaceInfo->GetPointer()->surface == VK_NULL_HANDLE) { return; } @@ -4997,6 +5338,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSurfaceFormats2KHR( GFXRECON_LOG_DEBUG("Skip vkGetPhysicalDeviceSurfaceFormats2KHR for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceSurfaceInfo2KHR* in_pSurfaceInfo = pSurfaceInfo->GetPointer(); if (pSurfaceInfo->GetPointer()->surface == VK_NULL_HANDLE) { return; } @@ -5019,6 +5361,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceDisplayProperties2KHR( PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceDisplayProperties2KHR", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceDisplayProperties2KHR, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkDisplayProperties2KHR* out_pProperties = pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(*out_pPropertyCount, VkDisplayProperties2KHR{ VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR, nullptr }); @@ -5037,6 +5380,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceDisplayPlaneProperties2KHR PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceDisplayPlaneProperties2KHR", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceDisplayPlaneProperties2KHR, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkDisplayPlaneProperties2KHR* out_pProperties = pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(*out_pPropertyCount, VkDisplayPlaneProperties2KHR{ VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR, nullptr }); @@ -5056,6 +5400,7 @@ void VulkanReplayConsumer::Process_vkGetDisplayModeProperties2KHR( PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkDisplayKHR in_display = MapHandle(display, &VulkanObjectInfoTable::GetDisplayKHRInfo); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetDisplayModeProperties2KHR", returnValue, display, kDisplayKHRArrayGetDisplayModeProperties2KHR, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetDisplayKHRInfo)); @@ -5075,6 +5420,7 @@ void VulkanReplayConsumer::Process_vkGetDisplayPlaneCapabilities2KHR( StructPointerDecoder* pDisplayPlaneInfo, StructPointerDecoder* pCapabilities) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkDisplayPlaneInfo2KHR* in_pDisplayPlaneInfo = pDisplayPlaneInfo->GetPointer(); MapStructHandles(pDisplayPlaneInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5091,6 +5437,7 @@ void VulkanReplayConsumer::Process_vkGetImageMemoryRequirements2KHR( StructPointerDecoder* pInfo, StructPointerDecoder* pMemoryRequirements) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkImageMemoryRequirementsInfo2* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5106,6 +5453,7 @@ void VulkanReplayConsumer::Process_vkGetBufferMemoryRequirements2KHR( StructPointerDecoder* pInfo, StructPointerDecoder* pMemoryRequirements) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkBufferMemoryRequirementsInfo2* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5122,6 +5470,7 @@ void VulkanReplayConsumer::Process_vkGetImageSparseMemoryRequirements2KHR( PointerDecoder* pSparseMemoryRequirementCount, StructPointerDecoder* pSparseMemoryRequirements) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkImageSparseMemoryRequirementsInfo2* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5141,11 +5490,13 @@ void VulkanReplayConsumer::Process_vkCreateSamplerYcbcrConversionKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pYcbcrConversion) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkSamplerYcbcrConversionCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pYcbcrConversion->IsNull()) { pYcbcrConversion->SetHandleLength(1); } VkSamplerYcbcrConversion* out_pYcbcrConversion = pYcbcrConversion->GetHandlePointer(); +ForwardIdToCaptureLayer(pYcbcrConversion->GetPointer(), VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION); VkResult replay_result = GetDeviceTable(in_device)->CreateSamplerYcbcrConversionKHR(in_device, in_pCreateInfo, in_pAllocator, out_pYcbcrConversion); CheckResult("vkCreateSamplerYcbcrConversionKHR", returnValue, replay_result, call_info); @@ -5159,6 +5510,7 @@ void VulkanReplayConsumer::Process_vkDestroySamplerYcbcrConversionKHR( format::HandleId ycbcrConversion, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSamplerYcbcrConversion in_ycbcrConversion = MapHandle(ycbcrConversion, &VulkanObjectInfoTable::GetSamplerYcbcrConversionInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -5174,6 +5526,7 @@ void VulkanReplayConsumer::Process_vkBindBufferMemory2KHR( uint32_t bindInfoCount, StructPointerDecoder* pBindInfos) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructArrayHandles(pBindInfos->GetMetaStructPointer(), pBindInfos->GetLength(), GetObjectInfoTable()); @@ -5189,6 +5542,7 @@ void VulkanReplayConsumer::Process_vkBindImageMemory2KHR( uint32_t bindInfoCount, StructPointerDecoder* pBindInfos) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructArrayHandles(pBindInfos->GetMetaStructPointer(), pBindInfos->GetLength(), GetObjectInfoTable()); @@ -5203,6 +5557,7 @@ void VulkanReplayConsumer::Process_vkGetDescriptorSetLayoutSupportKHR( StructPointerDecoder* pCreateInfo, StructPointerDecoder* pSupport) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDescriptorSetLayoutCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5222,6 +5577,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawIndirectCountKHR( uint32_t maxDrawCount, uint32_t stride) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); VkBuffer in_countBuffer = MapHandle(countBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -5244,6 +5600,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawIndexedIndirectCountKHR( uint32_t maxDrawCount, uint32_t stride) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); VkBuffer in_countBuffer = MapHandle(countBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -5263,6 +5620,7 @@ void VulkanReplayConsumer::Process_vkGetSemaphoreCounterValueKHR( format::HandleId semaphore, PointerDecoder* pValue) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSemaphore in_semaphore = MapHandle(semaphore, &VulkanObjectInfoTable::GetSemaphoreInfo); uint64_t* out_pValue = pValue->IsNull() ? nullptr : pValue->AllocateOutputData(1, static_cast(0)); @@ -5278,6 +5636,7 @@ void VulkanReplayConsumer::Process_vkWaitSemaphoresKHR( StructPointerDecoder* pWaitInfo, uint64_t timeout) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkSemaphoreWaitInfo* in_pWaitInfo = pWaitInfo->GetPointer(); MapStructHandles(pWaitInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5292,6 +5651,7 @@ void VulkanReplayConsumer::Process_vkSignalSemaphoreKHR( format::HandleId device, StructPointerDecoder* pSignalInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkSemaphoreSignalInfo* in_pSignalInfo = pSignalInfo->GetPointer(); MapStructHandles(pSignalInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5307,6 +5667,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceFragmentShadingRatesKHR( PointerDecoder* pFragmentShadingRateCount, StructPointerDecoder* pFragmentShadingRates) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pFragmentShadingRateCount = pFragmentShadingRateCount->IsNull() ? nullptr : pFragmentShadingRateCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceFragmentShadingRatesKHR", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceFragmentShadingRatesKHR, pFragmentShadingRateCount, pFragmentShadingRates, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkPhysicalDeviceFragmentShadingRateKHR* out_pFragmentShadingRates = pFragmentShadingRates->IsNull() ? nullptr : pFragmentShadingRates->AllocateOutputData(*out_pFragmentShadingRateCount, VkPhysicalDeviceFragmentShadingRateKHR{ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR, nullptr }); @@ -5323,6 +5684,7 @@ void VulkanReplayConsumer::Process_vkCmdSetFragmentShadingRateKHR( StructPointerDecoder* pFragmentSize, PointerDecoder* combinerOps) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkExtent2D* in_pFragmentSize = pFragmentSize->GetPointer(); const VkFragmentShadingRateCombinerOpKHR* in_combinerOps = combinerOps->GetPointer(); @@ -5340,6 +5702,7 @@ void VulkanReplayConsumer::Process_vkCmdSetRenderingAttachmentLocationsKHR( format::HandleId commandBuffer, StructPointerDecoder* pLocationInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkRenderingAttachmentLocationInfoKHR* in_pLocationInfo = pLocationInfo->GetPointer(); @@ -5356,6 +5719,7 @@ void VulkanReplayConsumer::Process_vkCmdSetRenderingInputAttachmentIndicesKHR( format::HandleId commandBuffer, StructPointerDecoder* pInputAttachmentIndexInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkRenderingInputAttachmentIndexInfoKHR* in_pInputAttachmentIndexInfo = pInputAttachmentIndexInfo->GetPointer(); @@ -5380,6 +5744,7 @@ void VulkanReplayConsumer::Process_vkWaitForPresentKHR( GFXRECON_LOG_DEBUG("Skip vkWaitForPresentKHR for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_swapchain = GetObjectInfoTable().GetSwapchainKHRInfo(swapchain); @@ -5393,6 +5758,7 @@ void VulkanReplayConsumer::Process_vkGetBufferDeviceAddressKHR( format::HandleId device, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5406,6 +5772,7 @@ void VulkanReplayConsumer::Process_vkGetBufferOpaqueCaptureAddressKHR( format::HandleId device, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkBufferDeviceAddressInfo* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5419,6 +5786,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceMemoryOpaqueCaptureAddressKHR( format::HandleId device, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDeviceMemoryOpaqueCaptureAddressInfo* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5433,10 +5801,12 @@ void VulkanReplayConsumer::Process_vkCreateDeferredOperationKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pDeferredOperation) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pDeferredOperation->IsNull()) { pDeferredOperation->SetHandleLength(1); } VkDeferredOperationKHR* out_pDeferredOperation = pDeferredOperation->GetHandlePointer(); +ForwardIdToCaptureLayer(pDeferredOperation->GetPointer(), VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR); VkResult replay_result = GetDeviceTable(in_device)->CreateDeferredOperationKHR(in_device, in_pAllocator, out_pDeferredOperation); CheckResult("vkCreateDeferredOperationKHR", returnValue, replay_result, call_info); @@ -5450,6 +5820,7 @@ void VulkanReplayConsumer::Process_vkDestroyDeferredOperationKHR( format::HandleId operation, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeferredOperationKHR in_operation = MapHandle(operation, &VulkanObjectInfoTable::GetDeferredOperationKHRInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -5464,6 +5835,7 @@ void VulkanReplayConsumer::Process_vkGetDeferredOperationMaxConcurrencyKHR( format::HandleId device, format::HandleId operation) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeferredOperationKHR in_operation = MapHandle(operation, &VulkanObjectInfoTable::GetDeferredOperationKHRInfo); @@ -5476,6 +5848,7 @@ void VulkanReplayConsumer::Process_vkGetDeferredOperationResultKHR( format::HandleId device, format::HandleId operation) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeferredOperationKHR in_operation = MapHandle(operation, &VulkanObjectInfoTable::GetDeferredOperationKHRInfo); @@ -5489,6 +5862,7 @@ void VulkanReplayConsumer::Process_vkDeferredOperationJoinKHR( format::HandleId device, format::HandleId operation) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_operation = GetObjectInfoTable().GetDeferredOperationKHRInfo(operation); @@ -5504,6 +5878,7 @@ void VulkanReplayConsumer::Process_vkGetPipelineExecutablePropertiesKHR( PointerDecoder* pExecutableCount, StructPointerDecoder* pProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkPipelineInfoKHR* in_pPipelineInfo = pPipelineInfo->GetPointer(); MapStructHandles(pPipelineInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5524,6 +5899,7 @@ void VulkanReplayConsumer::Process_vkGetPipelineExecutableStatisticsKHR( PointerDecoder* pStatisticCount, StructPointerDecoder* pStatistics) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkPipelineExecutableInfoKHR* in_pExecutableInfo = pExecutableInfo->GetPointer(); MapStructHandles(pExecutableInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5544,6 +5920,7 @@ void VulkanReplayConsumer::Process_vkGetPipelineExecutableInternalRepresentation PointerDecoder* pInternalRepresentationCount, StructPointerDecoder* pInternalRepresentations) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkPipelineExecutableInfoKHR* in_pExecutableInfo = pExecutableInfo->GetPointer(); MapStructHandles(pExecutableInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5563,6 +5940,7 @@ void VulkanReplayConsumer::Process_vkMapMemory2KHR( StructPointerDecoder* pMemoryMapInfo, PointerDecoder* ppData) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMemoryMapInfoKHR* in_pMemoryMapInfo = pMemoryMapInfo->GetPointer(); MapStructHandles(pMemoryMapInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5580,6 +5958,7 @@ void VulkanReplayConsumer::Process_vkUnmapMemory2KHR( format::HandleId device, StructPointerDecoder* pMemoryUnmapInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMemoryUnmapInfoKHR* in_pMemoryUnmapInfo = pMemoryUnmapInfo->GetPointer(); MapStructHandles(pMemoryUnmapInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5595,6 +5974,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceVideoEncodeQualityLevelPro StructPointerDecoder* pQualityLevelInfo, StructPointerDecoder* pQualityLevelProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* in_pQualityLevelInfo = pQualityLevelInfo->GetPointer(); VkVideoEncodeQualityLevelPropertiesKHR* out_pQualityLevelProperties = pQualityLevelProperties->IsNull() ? nullptr : pQualityLevelProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_PROPERTIES_KHR, nullptr }); @@ -5613,6 +5993,7 @@ void VulkanReplayConsumer::Process_vkGetEncodedVideoSessionParametersKHR( PointerDecoder* pDataSize, PointerDecoder* pData) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkVideoEncodeSessionParametersGetInfoKHR* in_pVideoSessionParametersInfo = pVideoSessionParametersInfo->GetPointer(); MapStructHandles(pVideoSessionParametersInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5632,6 +6013,7 @@ void VulkanReplayConsumer::Process_vkCmdEncodeVideoKHR( format::HandleId commandBuffer, StructPointerDecoder* pEncodeInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkVideoEncodeInfoKHR* in_pEncodeInfo = pEncodeInfo->GetPointer(); MapStructHandles(pEncodeInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5650,6 +6032,7 @@ void VulkanReplayConsumer::Process_vkCmdSetEvent2KHR( format::HandleId event, StructPointerDecoder* pDependencyInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkEvent in_event = MapHandle(event, &VulkanObjectInfoTable::GetEventInfo); const VkDependencyInfo* in_pDependencyInfo = pDependencyInfo->GetPointer(); @@ -5669,6 +6052,7 @@ void VulkanReplayConsumer::Process_vkCmdResetEvent2KHR( format::HandleId event, VkPipelineStageFlags2 stageMask) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkEvent in_event = MapHandle(event, &VulkanObjectInfoTable::GetEventInfo); @@ -5687,6 +6071,7 @@ void VulkanReplayConsumer::Process_vkCmdWaitEvents2KHR( HandlePointerDecoder* pEvents, StructPointerDecoder* pDependencyInfos) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkEvent* in_pEvents = MapHandles(pEvents, eventCount, &VulkanObjectInfoTable::GetEventInfo); const VkDependencyInfo* in_pDependencyInfos = pDependencyInfos->GetPointer(); @@ -5705,6 +6090,7 @@ void VulkanReplayConsumer::Process_vkCmdPipelineBarrier2KHR( format::HandleId commandBuffer, StructPointerDecoder* pDependencyInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_commandBuffer = GetObjectInfoTable().GetCommandBufferInfo(commandBuffer); MapStructHandles(pDependencyInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5724,6 +6110,7 @@ void VulkanReplayConsumer::Process_vkCmdWriteTimestamp2KHR( format::HandleId queryPool, uint32_t query) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -5743,6 +6130,7 @@ void VulkanReplayConsumer::Process_vkQueueSubmit2KHR( StructPointerDecoder* pSubmits, format::HandleId fence) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_queue = GetObjectInfoTable().GetQueueInfo(queue); MapStructArrayHandles(pSubmits->GetMetaStructPointer(), pSubmits->GetLength(), GetObjectInfoTable()); @@ -5760,6 +6148,7 @@ void VulkanReplayConsumer::Process_vkCmdWriteBufferMarker2AMD( VkDeviceSize dstOffset, uint32_t marker) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_dstBuffer = MapHandle(dstBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -5777,6 +6166,7 @@ void VulkanReplayConsumer::Process_vkGetQueueCheckpointData2NV( PointerDecoder* pCheckpointDataCount, StructPointerDecoder* pCheckpointData) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkQueue in_queue = MapHandle(queue, &VulkanObjectInfoTable::GetQueueInfo); uint32_t* out_pCheckpointDataCount = pCheckpointDataCount->IsNull() ? nullptr : pCheckpointDataCount->AllocateOutputData(1, GetOutputArrayCount("vkGetQueueCheckpointData2NV", VK_SUCCESS, queue, kQueueArrayGetQueueCheckpointData2NV, pCheckpointDataCount, pCheckpointData, &VulkanObjectInfoTable::GetQueueInfo)); VkCheckpointData2NV* out_pCheckpointData = pCheckpointData->IsNull() ? nullptr : pCheckpointData->AllocateOutputData(*out_pCheckpointDataCount, VkCheckpointData2NV{ VK_STRUCTURE_TYPE_CHECKPOINT_DATA_2_NV, nullptr }); @@ -5791,6 +6181,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyBuffer2KHR( format::HandleId commandBuffer, StructPointerDecoder* pCopyBufferInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyBufferInfo2* in_pCopyBufferInfo = pCopyBufferInfo->GetPointer(); MapStructHandles(pCopyBufferInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5808,6 +6199,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyImage2KHR( format::HandleId commandBuffer, StructPointerDecoder* pCopyImageInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyImageInfo2* in_pCopyImageInfo = pCopyImageInfo->GetPointer(); MapStructHandles(pCopyImageInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5825,6 +6217,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyBufferToImage2KHR( format::HandleId commandBuffer, StructPointerDecoder* pCopyBufferToImageInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyBufferToImageInfo2* in_pCopyBufferToImageInfo = pCopyBufferToImageInfo->GetPointer(); MapStructHandles(pCopyBufferToImageInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5842,6 +6235,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyImageToBuffer2KHR( format::HandleId commandBuffer, StructPointerDecoder* pCopyImageToBufferInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyImageToBufferInfo2* in_pCopyImageToBufferInfo = pCopyImageToBufferInfo->GetPointer(); MapStructHandles(pCopyImageToBufferInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5859,6 +6253,7 @@ void VulkanReplayConsumer::Process_vkCmdBlitImage2KHR( format::HandleId commandBuffer, StructPointerDecoder* pBlitImageInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBlitImageInfo2* in_pBlitImageInfo = pBlitImageInfo->GetPointer(); MapStructHandles(pBlitImageInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5876,6 +6271,7 @@ void VulkanReplayConsumer::Process_vkCmdResolveImage2KHR( format::HandleId commandBuffer, StructPointerDecoder* pResolveImageInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkResolveImageInfo2* in_pResolveImageInfo = pResolveImageInfo->GetPointer(); MapStructHandles(pResolveImageInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5893,6 +6289,7 @@ void VulkanReplayConsumer::Process_vkCmdTraceRaysIndirect2KHR( format::HandleId commandBuffer, VkDeviceAddress indirectDeviceAddress) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdTraceRaysIndirect2KHR(in_commandBuffer, indirectDeviceAddress); @@ -5909,6 +6306,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceBufferMemoryRequirementsKHR( StructPointerDecoder* pInfo, StructPointerDecoder* pMemoryRequirements) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDeviceBufferMemoryRequirements* in_pInfo = pInfo->GetPointer(); VkMemoryRequirements2* out_pMemoryRequirements = pMemoryRequirements->IsNull() ? nullptr : pMemoryRequirements->AllocateOutputData(1, { VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2, nullptr }); @@ -5923,6 +6321,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceImageMemoryRequirementsKHR( StructPointerDecoder* pInfo, StructPointerDecoder* pMemoryRequirements) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDeviceImageMemoryRequirements* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5939,6 +6338,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceImageSparseMemoryRequirementsKHR( PointerDecoder* pSparseMemoryRequirementCount, StructPointerDecoder* pSparseMemoryRequirements) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDeviceImageMemoryRequirements* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5958,6 +6358,7 @@ void VulkanReplayConsumer::Process_vkCmdBindIndexBuffer2KHR( VkDeviceSize size, VkIndexType indexType) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -5975,6 +6376,7 @@ void VulkanReplayConsumer::Process_vkGetRenderingAreaGranularityKHR( StructPointerDecoder* pRenderingAreaInfo, StructPointerDecoder* pGranularity) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkRenderingAreaInfoKHR* in_pRenderingAreaInfo = pRenderingAreaInfo->GetPointer(); VkExtent2D* out_pGranularity = pGranularity->IsNull() ? nullptr : pGranularity->AllocateOutputData(1); @@ -5988,6 +6390,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceImageSubresourceLayoutKHR( StructPointerDecoder* pInfo, StructPointerDecoder* pLayout) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDeviceImageSubresourceInfoKHR* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6004,6 +6407,7 @@ void VulkanReplayConsumer::Process_vkGetImageSubresourceLayout2KHR( StructPointerDecoder* pSubresource, StructPointerDecoder* pLayout) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkImage in_image = MapHandle(image, &VulkanObjectInfoTable::GetImageInfo); const VkImageSubresource2KHR* in_pSubresource = pSubresource->GetPointer(); @@ -6020,6 +6424,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceCooperativeMatrixPropertie PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceCooperativeMatrixPropertiesKHR, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkCooperativeMatrixPropertiesKHR* out_pProperties = pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(*out_pPropertyCount, VkCooperativeMatrixPropertiesKHR{ VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_KHR, nullptr }); @@ -6036,6 +6441,7 @@ void VulkanReplayConsumer::Process_vkCmdSetLineStippleKHR( uint32_t lineStippleFactor, uint16_t lineStipplePattern) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetLineStippleKHR(in_commandBuffer, lineStippleFactor, lineStipplePattern); @@ -6053,6 +6459,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceCalibrateableTimeDomainsKH PointerDecoder* pTimeDomainCount, PointerDecoder* pTimeDomains) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pTimeDomainCount = pTimeDomainCount->IsNull() ? nullptr : pTimeDomainCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceCalibrateableTimeDomainsKHR", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceCalibrateableTimeDomainsKHR, pTimeDomainCount, pTimeDomains, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkTimeDomainKHR* out_pTimeDomains = pTimeDomains->IsNull() ? nullptr : pTimeDomains->AllocateOutputData(*out_pTimeDomainCount); @@ -6072,6 +6479,7 @@ void VulkanReplayConsumer::Process_vkGetCalibratedTimestampsKHR( PointerDecoder* pTimestamps, PointerDecoder* pMaxDeviation) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkCalibratedTimestampInfoKHR* in_pTimestampInfos = pTimestampInfos->GetPointer(); uint64_t* out_pTimestamps = pTimestamps->IsNull() ? nullptr : pTimestamps->AllocateOutputData(timestampCount); @@ -6086,6 +6494,7 @@ void VulkanReplayConsumer::Process_vkCmdBindDescriptorSets2KHR( format::HandleId commandBuffer, StructPointerDecoder* pBindDescriptorSetsInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBindDescriptorSetsInfoKHR* in_pBindDescriptorSetsInfo = pBindDescriptorSetsInfo->GetPointer(); MapStructHandles(pBindDescriptorSetsInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6103,6 +6512,7 @@ void VulkanReplayConsumer::Process_vkCmdPushConstants2KHR( format::HandleId commandBuffer, StructPointerDecoder* pPushConstantsInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkPushConstantsInfoKHR* in_pPushConstantsInfo = pPushConstantsInfo->GetPointer(); MapStructHandles(pPushConstantsInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6120,6 +6530,7 @@ void VulkanReplayConsumer::Process_vkCmdPushDescriptorSet2KHR( format::HandleId commandBuffer, StructPointerDecoder* pPushDescriptorSetInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkPushDescriptorSetInfoKHR* in_pPushDescriptorSetInfo = pPushDescriptorSetInfo->GetPointer(); MapStructHandles(pPushDescriptorSetInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6137,6 +6548,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDescriptorBufferOffsets2EXT( format::HandleId commandBuffer, StructPointerDecoder* pSetDescriptorBufferOffsetsInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkSetDescriptorBufferOffsetsInfoEXT* in_pSetDescriptorBufferOffsetsInfo = pSetDescriptorBufferOffsetsInfo->GetPointer(); MapStructHandles(pSetDescriptorBufferOffsetsInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6154,6 +6566,7 @@ void VulkanReplayConsumer::Process_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT format::HandleId commandBuffer, StructPointerDecoder* pBindDescriptorBufferEmbeddedSamplersInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* in_pBindDescriptorBufferEmbeddedSamplersInfo = pBindDescriptorBufferEmbeddedSamplersInfo->GetPointer(); MapStructHandles(pBindDescriptorBufferEmbeddedSamplersInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6172,6 +6585,7 @@ void VulkanReplayConsumer::Process_vkFrameBoundaryANDROID( format::HandleId semaphore, format::HandleId image) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_semaphore = GetObjectInfoTable().GetSemaphoreInfo(semaphore); auto in_image = GetObjectInfoTable().GetImageInfo(image); @@ -6187,10 +6601,12 @@ void VulkanReplayConsumer::Process_vkCreateDebugReportCallbackEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pCallback) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); if (!pCallback->IsNull()) { pCallback->SetHandleLength(1); } DebugReportCallbackEXTInfo handle_info; pCallback->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pCallback->GetPointer(), VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT); VkResult replay_result = OverrideCreateDebugReportCallbackEXT(GetInstanceTable(in_instance->handle)->CreateDebugReportCallbackEXT, returnValue, in_instance, pCreateInfo, pAllocator, pCallback); CheckResult("vkCreateDebugReportCallbackEXT", returnValue, replay_result, call_info); @@ -6204,6 +6620,7 @@ void VulkanReplayConsumer::Process_vkDestroyDebugReportCallbackEXT( format::HandleId callback, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); VkDebugReportCallbackEXT in_callback = MapHandle(callback, &VulkanObjectInfoTable::GetDebugReportCallbackEXTInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -6223,6 +6640,7 @@ void VulkanReplayConsumer::Process_vkDebugReportMessageEXT( StringDecoder* pLayerPrefix, StringDecoder* pMessage) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); uint64_t in_object = MapHandle(object, objectType); const char* in_pLayerPrefix = pLayerPrefix->GetPointer(); @@ -6237,6 +6655,7 @@ void VulkanReplayConsumer::Process_vkDebugMarkerSetObjectTagEXT( format::HandleId device, StructPointerDecoder* pTagInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDebugMarkerObjectTagInfoEXT* in_pTagInfo = pTagInfo->GetPointer(); MapStructHandles(pTagInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6251,6 +6670,7 @@ void VulkanReplayConsumer::Process_vkDebugMarkerSetObjectNameEXT( format::HandleId device, StructPointerDecoder* pNameInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDebugMarkerObjectNameInfoEXT* in_pNameInfo = pNameInfo->GetPointer(); MapStructHandles(pNameInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6264,6 +6684,7 @@ void VulkanReplayConsumer::Process_vkCmdDebugMarkerBeginEXT( format::HandleId commandBuffer, StructPointerDecoder* pMarkerInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkDebugMarkerMarkerInfoEXT* in_pMarkerInfo = pMarkerInfo->GetPointer(); @@ -6279,6 +6700,7 @@ void VulkanReplayConsumer::Process_vkCmdDebugMarkerEndEXT( const ApiCallInfo& call_info, format::HandleId commandBuffer) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdDebugMarkerEndEXT(in_commandBuffer); @@ -6294,6 +6716,7 @@ void VulkanReplayConsumer::Process_vkCmdDebugMarkerInsertEXT( format::HandleId commandBuffer, StructPointerDecoder* pMarkerInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_commandBuffer = GetObjectInfoTable().GetCommandBufferInfo(commandBuffer); OverrideCmdDebugMarkerInsertEXT(GetDeviceTable(in_commandBuffer->handle)->CmdDebugMarkerInsertEXT, in_commandBuffer, pMarkerInfo); @@ -6313,6 +6736,7 @@ void VulkanReplayConsumer::Process_vkCmdBindTransformFeedbackBuffersEXT( PointerDecoder* pOffsets, PointerDecoder* pSizes) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBuffer* in_pBuffers = MapHandles(pBuffers, bindingCount, &VulkanObjectInfoTable::GetBufferInfo); const VkDeviceSize* in_pOffsets = pOffsets->GetPointer(); @@ -6334,6 +6758,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginTransformFeedbackEXT( HandlePointerDecoder* pCounterBuffers, PointerDecoder* pCounterBufferOffsets) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBuffer* in_pCounterBuffers = MapHandles(pCounterBuffers, counterBufferCount, &VulkanObjectInfoTable::GetBufferInfo); const VkDeviceSize* in_pCounterBufferOffsets = pCounterBufferOffsets->GetPointer(); @@ -6354,6 +6779,7 @@ void VulkanReplayConsumer::Process_vkCmdEndTransformFeedbackEXT( HandlePointerDecoder* pCounterBuffers, PointerDecoder* pCounterBufferOffsets) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBuffer* in_pCounterBuffers = MapHandles(pCounterBuffers, counterBufferCount, &VulkanObjectInfoTable::GetBufferInfo); const VkDeviceSize* in_pCounterBufferOffsets = pCounterBufferOffsets->GetPointer(); @@ -6374,6 +6800,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginQueryIndexedEXT( VkQueryControlFlags flags, uint32_t index) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -6392,6 +6819,7 @@ void VulkanReplayConsumer::Process_vkCmdEndQueryIndexedEXT( uint32_t query, uint32_t index) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -6413,6 +6841,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawIndirectByteCountEXT( uint32_t counterOffset, uint32_t vertexStride) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_counterBuffer = MapHandle(counterBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -6430,6 +6859,7 @@ void VulkanReplayConsumer::Process_vkGetImageViewHandleNVX( format::HandleId device, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkImageViewHandleInfoNVX* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6444,6 +6874,7 @@ void VulkanReplayConsumer::Process_vkGetImageViewAddressNVX( format::HandleId imageView, StructPointerDecoder* pProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkImageView in_imageView = MapHandle(imageView, &VulkanObjectInfoTable::GetImageViewInfo); VkImageViewAddressPropertiesNVX* out_pProperties = pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_IMAGE_VIEW_ADDRESS_PROPERTIES_NVX, nullptr }); @@ -6463,6 +6894,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawIndirectCountAMD( uint32_t maxDrawCount, uint32_t stride) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); VkBuffer in_countBuffer = MapHandle(countBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -6485,6 +6917,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawIndexedIndirectCountAMD( uint32_t maxDrawCount, uint32_t stride) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); VkBuffer in_countBuffer = MapHandle(countBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -6507,6 +6940,7 @@ void VulkanReplayConsumer::Process_vkGetShaderInfoAMD( PointerDecoder* pInfoSize, PointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPipeline in_pipeline = MapHandle(pipeline, &VulkanObjectInfoTable::GetPipelineInfo); size_t* out_pInfoSize = pInfoSize->IsNull() ? nullptr : pInfoSize->AllocateOutputData(1, GetOutputArrayCount("vkGetShaderInfoAMD", returnValue, pipeline, kPipelineArrayGetShaderInfoAMD, pInfoSize, pInfo, &VulkanObjectInfoTable::GetPipelineInfo)); @@ -6526,11 +6960,13 @@ void VulkanReplayConsumer::Process_vkCreateStreamDescriptorSurfaceGGP( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); const VkStreamDescriptorSurfaceCreateInfoGGP* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } VkSurfaceKHR* out_pSurface = pSurface->GetHandlePointer(); +ForwardIdToCaptureLayer(pSurface->GetPointer(), VK_OBJECT_TYPE_SURFACE_KHR); VkResult replay_result = GetInstanceTable(in_instance)->CreateStreamDescriptorSurfaceGGP(in_instance, in_pCreateInfo, in_pAllocator, out_pSurface); CheckResult("vkCreateStreamDescriptorSurfaceGGP", returnValue, replay_result, call_info); @@ -6550,6 +6986,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceExternalImageFormatPropert VkExternalMemoryHandleTypeFlagsNV externalHandleType, StructPointerDecoder* pExternalImageFormatProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkExternalImageFormatPropertiesNV* out_pExternalImageFormatProperties = pExternalImageFormatProperties->IsNull() ? nullptr : pExternalImageFormatProperties->AllocateOutputData(1); @@ -6565,6 +7002,7 @@ void VulkanReplayConsumer::Process_vkGetMemoryWin32HandleNV( VkExternalMemoryHandleTypeFlagsNV handleType, PointerDecoder* pHandle) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeviceMemory in_memory = MapHandle(memory, &VulkanObjectInfoTable::GetDeviceMemoryInfo); HANDLE* out_pHandle = pHandle->IsNull() ? nullptr : reinterpret_cast(pHandle->AllocateOutputData(1)); @@ -6583,11 +7021,13 @@ void VulkanReplayConsumer::Process_vkCreateViSurfaceNN( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); const VkViSurfaceCreateInfoNN* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } VkSurfaceKHR* out_pSurface = pSurface->GetHandlePointer(); +ForwardIdToCaptureLayer(pSurface->GetPointer(), VK_OBJECT_TYPE_SURFACE_KHR); VkResult replay_result = GetInstanceTable(in_instance)->CreateViSurfaceNN(in_instance, in_pCreateInfo, in_pAllocator, out_pSurface); CheckResult("vkCreateViSurfaceNN", returnValue, replay_result, call_info); @@ -6600,6 +7040,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginConditionalRenderingEXT( format::HandleId commandBuffer, StructPointerDecoder* pConditionalRenderingBegin) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkConditionalRenderingBeginInfoEXT* in_pConditionalRenderingBegin = pConditionalRenderingBegin->GetPointer(); MapStructHandles(pConditionalRenderingBegin->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6616,6 +7057,7 @@ void VulkanReplayConsumer::Process_vkCmdEndConditionalRenderingEXT( const ApiCallInfo& call_info, format::HandleId commandBuffer) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdEndConditionalRenderingEXT(in_commandBuffer); @@ -6633,6 +7075,7 @@ void VulkanReplayConsumer::Process_vkCmdSetViewportWScalingNV( uint32_t viewportCount, StructPointerDecoder* pViewportWScalings) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkViewportWScalingNV* in_pViewportWScalings = pViewportWScalings->GetPointer(); @@ -6650,6 +7093,7 @@ void VulkanReplayConsumer::Process_vkReleaseDisplayEXT( format::HandleId physicalDevice, format::HandleId display) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkDisplayKHR in_display = MapHandle(display, &VulkanObjectInfoTable::GetDisplayKHRInfo); @@ -6664,6 +7108,7 @@ void VulkanReplayConsumer::Process_vkAcquireXlibDisplayEXT( uint64_t dpy, format::HandleId display) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); Display* in_dpy = static_cast(PreProcessExternalObject(dpy, format::ApiCallId::ApiCall_vkAcquireXlibDisplayEXT, "vkAcquireXlibDisplayEXT")); VkDisplayKHR in_display = MapHandle(display, &VulkanObjectInfoTable::GetDisplayKHRInfo); @@ -6680,11 +7125,13 @@ void VulkanReplayConsumer::Process_vkGetRandROutputDisplayEXT( size_t rrOutput, HandlePointerDecoder* pDisplay) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); Display* in_dpy = static_cast(PreProcessExternalObject(dpy, format::ApiCallId::ApiCall_vkGetRandROutputDisplayEXT, "vkGetRandROutputDisplayEXT")); if (!pDisplay->IsNull()) { pDisplay->SetHandleLength(1); } DisplayKHRInfo handle_info; pDisplay->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pDisplay->GetPointer(), VK_OBJECT_TYPE_DISPLAY_KHR); VkResult replay_result = OverrideGetRandROutputDisplayEXT(GetInstanceTable(in_physicalDevice->handle)->GetRandROutputDisplayEXT, returnValue, in_physicalDevice, in_dpy, rrOutput, pDisplay); CheckResult("vkGetRandROutputDisplayEXT", returnValue, replay_result, call_info); @@ -6704,6 +7151,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSurfaceCapabilities2EXT( GFXRECON_LOG_DEBUG("Skip vkGetPhysicalDeviceSurfaceCapabilities2EXT for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkSurfaceKHR in_surface = MapHandle(surface, &VulkanObjectInfoTable::GetSurfaceKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(surface) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(surface)->surface_creation_skipped) { return; } @@ -6721,6 +7169,7 @@ void VulkanReplayConsumer::Process_vkDisplayPowerControlEXT( format::HandleId display, StructPointerDecoder* pDisplayPowerInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDisplayKHR in_display = MapHandle(display, &VulkanObjectInfoTable::GetDisplayKHRInfo); const VkDisplayPowerInfoEXT* in_pDisplayPowerInfo = pDisplayPowerInfo->GetPointer(); @@ -6737,11 +7186,13 @@ void VulkanReplayConsumer::Process_vkRegisterDeviceEventEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pFence) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDeviceEventInfoEXT* in_pDeviceEventInfo = pDeviceEventInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pFence->IsNull()) { pFence->SetHandleLength(1); } VkFence* out_pFence = pFence->GetHandlePointer(); +ForwardIdToCaptureLayer(pFence->GetPointer(), VK_OBJECT_TYPE_FENCE); VkResult replay_result = GetDeviceTable(in_device)->RegisterDeviceEventEXT(in_device, in_pDeviceEventInfo, in_pAllocator, out_pFence); CheckResult("vkRegisterDeviceEventEXT", returnValue, replay_result, call_info); @@ -6758,12 +7209,14 @@ void VulkanReplayConsumer::Process_vkRegisterDisplayEventEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pFence) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDisplayKHR in_display = MapHandle(display, &VulkanObjectInfoTable::GetDisplayKHRInfo); const VkDisplayEventInfoEXT* in_pDisplayEventInfo = pDisplayEventInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pFence->IsNull()) { pFence->SetHandleLength(1); } VkFence* out_pFence = pFence->GetHandlePointer(); +ForwardIdToCaptureLayer(pFence->GetPointer(), VK_OBJECT_TYPE_FENCE); VkResult replay_result = GetDeviceTable(in_device)->RegisterDisplayEventEXT(in_device, in_display, in_pDisplayEventInfo, in_pAllocator, out_pFence); CheckResult("vkRegisterDisplayEventEXT", returnValue, replay_result, call_info); @@ -6784,6 +7237,7 @@ void VulkanReplayConsumer::Process_vkGetSwapchainCounterEXT( GFXRECON_LOG_DEBUG("Skip vkGetSwapchainCounterEXT for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapchain = MapHandle(swapchain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id)->surface_creation_skipped) { return; } @@ -6805,6 +7259,7 @@ void VulkanReplayConsumer::Process_vkGetRefreshCycleDurationGOOGLE( GFXRECON_LOG_DEBUG("Skip vkGetRefreshCycleDurationGOOGLE for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapchain = MapHandle(swapchain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id)->surface_creation_skipped) { return; } @@ -6827,6 +7282,7 @@ void VulkanReplayConsumer::Process_vkGetPastPresentationTimingGOOGLE( GFXRECON_LOG_DEBUG("Skip vkGetPastPresentationTimingGOOGLE for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapchain = MapHandle(swapchain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id)->surface_creation_skipped) { return; } @@ -6846,6 +7302,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDiscardRectangleEXT( uint32_t discardRectangleCount, StructPointerDecoder* pDiscardRectangles) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkRect2D* in_pDiscardRectangles = pDiscardRectangles->GetPointer(); @@ -6862,6 +7319,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDiscardRectangleEnableEXT( format::HandleId commandBuffer, VkBool32 discardRectangleEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDiscardRectangleEnableEXT(in_commandBuffer, discardRectangleEnable); @@ -6877,6 +7335,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDiscardRectangleModeEXT( format::HandleId commandBuffer, VkDiscardRectangleModeEXT discardRectangleMode) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDiscardRectangleModeEXT(in_commandBuffer, discardRectangleMode); @@ -6899,6 +7358,7 @@ void VulkanReplayConsumer::Process_vkSetHdrMetadataEXT( GFXRECON_LOG_DEBUG("Skip vkSetHdrMetadataEXT for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkSwapchainKHR* in_pSwapchains = MapHandles(pSwapchains, swapchainCount, &VulkanObjectInfoTable::GetSwapchainKHRInfo); const VkHdrMetadataEXT* in_pMetadata = pMetadata->GetPointer(); @@ -6914,11 +7374,13 @@ void VulkanReplayConsumer::Process_vkCreateIOSSurfaceMVK( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); const VkIOSSurfaceCreateInfoMVK* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } VkSurfaceKHR* out_pSurface = pSurface->GetHandlePointer(); +ForwardIdToCaptureLayer(pSurface->GetPointer(), VK_OBJECT_TYPE_SURFACE_KHR); VkResult replay_result = GetInstanceTable(in_instance)->CreateIOSSurfaceMVK(in_instance, in_pCreateInfo, in_pAllocator, out_pSurface); CheckResult("vkCreateIOSSurfaceMVK", returnValue, replay_result, call_info); @@ -6934,11 +7396,13 @@ void VulkanReplayConsumer::Process_vkCreateMacOSSurfaceMVK( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); const VkMacOSSurfaceCreateInfoMVK* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } VkSurfaceKHR* out_pSurface = pSurface->GetHandlePointer(); +ForwardIdToCaptureLayer(pSurface->GetPointer(), VK_OBJECT_TYPE_SURFACE_KHR); VkResult replay_result = GetInstanceTable(in_instance)->CreateMacOSSurfaceMVK(in_instance, in_pCreateInfo, in_pAllocator, out_pSurface); CheckResult("vkCreateMacOSSurfaceMVK", returnValue, replay_result, call_info); @@ -6952,6 +7416,7 @@ void VulkanReplayConsumer::Process_vkSetDebugUtilsObjectNameEXT( format::HandleId device, StructPointerDecoder* pNameInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDebugUtilsObjectNameInfoEXT* in_pNameInfo = pNameInfo->GetPointer(); MapStructHandles(pNameInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6968,6 +7433,7 @@ void VulkanReplayConsumer::Process_vkSetDebugUtilsObjectTagEXT( format::HandleId device, StructPointerDecoder* pTagInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDebugUtilsObjectTagInfoEXT* in_pTagInfo = pTagInfo->GetPointer(); MapStructHandles(pTagInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6983,6 +7449,7 @@ void VulkanReplayConsumer::Process_vkQueueBeginDebugUtilsLabelEXT( format::HandleId queue, StructPointerDecoder* pLabelInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkQueue in_queue = MapHandle(queue, &VulkanObjectInfoTable::GetQueueInfo); const VkDebugUtilsLabelEXT* in_pLabelInfo = pLabelInfo->GetPointer(); @@ -6993,6 +7460,7 @@ void VulkanReplayConsumer::Process_vkQueueEndDebugUtilsLabelEXT( const ApiCallInfo& call_info, format::HandleId queue) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkQueue in_queue = MapHandle(queue, &VulkanObjectInfoTable::GetQueueInfo); GetDeviceTable(in_queue)->QueueEndDebugUtilsLabelEXT(in_queue); @@ -7003,6 +7471,7 @@ void VulkanReplayConsumer::Process_vkQueueInsertDebugUtilsLabelEXT( format::HandleId queue, StructPointerDecoder* pLabelInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkQueue in_queue = MapHandle(queue, &VulkanObjectInfoTable::GetQueueInfo); const VkDebugUtilsLabelEXT* in_pLabelInfo = pLabelInfo->GetPointer(); @@ -7014,6 +7483,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginDebugUtilsLabelEXT( format::HandleId commandBuffer, StructPointerDecoder* pLabelInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkDebugUtilsLabelEXT* in_pLabelInfo = pLabelInfo->GetPointer(); @@ -7029,6 +7499,7 @@ void VulkanReplayConsumer::Process_vkCmdEndDebugUtilsLabelEXT( const ApiCallInfo& call_info, format::HandleId commandBuffer) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdEndDebugUtilsLabelEXT(in_commandBuffer); @@ -7044,6 +7515,7 @@ void VulkanReplayConsumer::Process_vkCmdInsertDebugUtilsLabelEXT( format::HandleId commandBuffer, StructPointerDecoder* pLabelInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_commandBuffer = GetObjectInfoTable().GetCommandBufferInfo(commandBuffer); OverrideCmdInsertDebugUtilsLabelEXT(GetDeviceTable(in_commandBuffer->handle)->CmdInsertDebugUtilsLabelEXT, in_commandBuffer, pLabelInfo); @@ -7062,10 +7534,12 @@ void VulkanReplayConsumer::Process_vkCreateDebugUtilsMessengerEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pMessenger) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); if (!pMessenger->IsNull()) { pMessenger->SetHandleLength(1); } DebugUtilsMessengerEXTInfo handle_info; pMessenger->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pMessenger->GetPointer(), VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT); VkResult replay_result = OverrideCreateDebugUtilsMessengerEXT(GetInstanceTable(in_instance->handle)->CreateDebugUtilsMessengerEXT, returnValue, in_instance, pCreateInfo, pAllocator, pMessenger); CheckResult("vkCreateDebugUtilsMessengerEXT", returnValue, replay_result, call_info); @@ -7079,6 +7553,7 @@ void VulkanReplayConsumer::Process_vkDestroyDebugUtilsMessengerEXT( format::HandleId messenger, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); VkDebugUtilsMessengerEXT in_messenger = MapHandle(messenger, &VulkanObjectInfoTable::GetDebugUtilsMessengerEXTInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -7094,6 +7569,7 @@ void VulkanReplayConsumer::Process_vkSubmitDebugUtilsMessageEXT( VkDebugUtilsMessageTypeFlagsEXT messageTypes, StructPointerDecoder* pCallbackData) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); const VkDebugUtilsMessengerCallbackDataEXT* in_pCallbackData = pCallbackData->GetPointer(); @@ -7107,6 +7583,7 @@ void VulkanReplayConsumer::Process_vkGetAndroidHardwareBufferPropertiesANDROID( uint64_t buffer, StructPointerDecoder* pProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); const struct AHardwareBuffer* in_buffer = static_cast(PreProcessExternalObject(buffer, format::ApiCallId::ApiCall_vkGetAndroidHardwareBufferPropertiesANDROID, "vkGetAndroidHardwareBufferPropertiesANDROID")); pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID, nullptr }); @@ -7123,6 +7600,7 @@ void VulkanReplayConsumer::Process_vkGetMemoryAndroidHardwareBufferANDROID( StructPointerDecoder* pInfo, PointerDecoder* pBuffer) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMemoryGetAndroidHardwareBufferInfoANDROID* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -7139,6 +7617,7 @@ void VulkanReplayConsumer::Process_vkCmdSetSampleLocationsEXT( format::HandleId commandBuffer, StructPointerDecoder* pSampleLocationsInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkSampleLocationsInfoEXT* in_pSampleLocationsInfo = pSampleLocationsInfo->GetPointer(); @@ -7156,6 +7635,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceMultisamplePropertiesEXT( VkSampleCountFlagBits samples, StructPointerDecoder* pMultisampleProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkMultisamplePropertiesEXT* out_pMultisampleProperties = pMultisampleProperties->IsNull() ? nullptr : pMultisampleProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT, nullptr }); InitializeOutputStructPNext(pMultisampleProperties); @@ -7170,6 +7650,7 @@ void VulkanReplayConsumer::Process_vkGetImageDrmFormatModifierPropertiesEXT( format::HandleId image, StructPointerDecoder* pProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkImage in_image = MapHandle(image, &VulkanObjectInfoTable::GetImageInfo); VkImageDrmFormatModifierPropertiesEXT* out_pProperties = pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT, nullptr }); @@ -7187,11 +7668,13 @@ void VulkanReplayConsumer::Process_vkCreateValidationCacheEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pValidationCache) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkValidationCacheCreateInfoEXT* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pValidationCache->IsNull()) { pValidationCache->SetHandleLength(1); } VkValidationCacheEXT* out_pValidationCache = pValidationCache->GetHandlePointer(); +ForwardIdToCaptureLayer(pValidationCache->GetPointer(), VK_OBJECT_TYPE_VALIDATION_CACHE_EXT); VkResult replay_result = GetDeviceTable(in_device)->CreateValidationCacheEXT(in_device, in_pCreateInfo, in_pAllocator, out_pValidationCache); CheckResult("vkCreateValidationCacheEXT", returnValue, replay_result, call_info); @@ -7205,6 +7688,7 @@ void VulkanReplayConsumer::Process_vkDestroyValidationCacheEXT( format::HandleId validationCache, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkValidationCacheEXT in_validationCache = MapHandle(validationCache, &VulkanObjectInfoTable::GetValidationCacheEXTInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -7221,6 +7705,7 @@ void VulkanReplayConsumer::Process_vkMergeValidationCachesEXT( uint32_t srcCacheCount, HandlePointerDecoder* pSrcCaches) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkValidationCacheEXT in_dstCache = MapHandle(dstCache, &VulkanObjectInfoTable::GetValidationCacheEXTInfo); const VkValidationCacheEXT* in_pSrcCaches = MapHandles(pSrcCaches, srcCacheCount, &VulkanObjectInfoTable::GetValidationCacheEXTInfo); @@ -7237,6 +7722,7 @@ void VulkanReplayConsumer::Process_vkGetValidationCacheDataEXT( PointerDecoder* pDataSize, PointerDecoder* pData) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkValidationCacheEXT in_validationCache = MapHandle(validationCache, &VulkanObjectInfoTable::GetValidationCacheEXTInfo); size_t* out_pDataSize = pDataSize->IsNull() ? nullptr : pDataSize->AllocateOutputData(1, GetOutputArrayCount("vkGetValidationCacheDataEXT", returnValue, validationCache, kValidationCacheEXTArrayGetValidationCacheDataEXT, pDataSize, pData, &VulkanObjectInfoTable::GetValidationCacheEXTInfo)); @@ -7254,6 +7740,7 @@ void VulkanReplayConsumer::Process_vkCmdBindShadingRateImageNV( format::HandleId imageView, VkImageLayout imageLayout) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkImageView in_imageView = MapHandle(imageView, &VulkanObjectInfoTable::GetImageViewInfo); @@ -7272,6 +7759,7 @@ void VulkanReplayConsumer::Process_vkCmdSetViewportShadingRatePaletteNV( uint32_t viewportCount, StructPointerDecoder* pShadingRatePalettes) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkShadingRatePaletteNV* in_pShadingRatePalettes = pShadingRatePalettes->GetPointer(); @@ -7290,6 +7778,7 @@ void VulkanReplayConsumer::Process_vkCmdSetCoarseSampleOrderNV( uint32_t customSampleOrderCount, StructPointerDecoder* pCustomSampleOrders) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCoarseSampleOrderCustomNV* in_pCustomSampleOrders = pCustomSampleOrders->GetPointer(); @@ -7309,12 +7798,14 @@ void VulkanReplayConsumer::Process_vkCreateAccelerationStructureNV( StructPointerDecoder* pAllocator, HandlePointerDecoder* pAccelerationStructure) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkAccelerationStructureCreateInfoNV* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pAccelerationStructure->IsNull()) { pAccelerationStructure->SetHandleLength(1); } VkAccelerationStructureNV* out_pAccelerationStructure = pAccelerationStructure->GetHandlePointer(); +ForwardIdToCaptureLayer(pAccelerationStructure->GetPointer(), VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV); VkResult replay_result = GetDeviceTable(in_device)->CreateAccelerationStructureNV(in_device, in_pCreateInfo, in_pAllocator, out_pAccelerationStructure); CheckResult("vkCreateAccelerationStructureNV", returnValue, replay_result, call_info); @@ -7328,6 +7819,7 @@ void VulkanReplayConsumer::Process_vkDestroyAccelerationStructureNV( format::HandleId accelerationStructure, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkAccelerationStructureNV in_accelerationStructure = MapHandle(accelerationStructure, &VulkanObjectInfoTable::GetAccelerationStructureNVInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -7342,6 +7834,7 @@ void VulkanReplayConsumer::Process_vkGetAccelerationStructureMemoryRequirementsN StructPointerDecoder* pInfo, StructPointerDecoder* pMemoryRequirements) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkAccelerationStructureMemoryRequirementsInfoNV* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -7357,6 +7850,7 @@ void VulkanReplayConsumer::Process_vkBindAccelerationStructureMemoryNV( uint32_t bindInfoCount, StructPointerDecoder* pBindInfos) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkBindAccelerationStructureMemoryInfoNV* in_pBindInfos = pBindInfos->GetPointer(); MapStructArrayHandles(pBindInfos->GetMetaStructPointer(), pBindInfos->GetLength(), GetObjectInfoTable()); @@ -7377,6 +7871,7 @@ void VulkanReplayConsumer::Process_vkCmdBuildAccelerationStructureNV( format::HandleId scratch, VkDeviceSize scratchOffset) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkAccelerationStructureInfoNV* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -7400,6 +7895,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyAccelerationStructureNV( format::HandleId src, VkCopyAccelerationStructureModeKHR mode) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkAccelerationStructureNV in_dst = MapHandle(dst, &VulkanObjectInfoTable::GetAccelerationStructureNVInfo); VkAccelerationStructureNV in_src = MapHandle(src, &VulkanObjectInfoTable::GetAccelerationStructureNVInfo); @@ -7430,6 +7926,7 @@ void VulkanReplayConsumer::Process_vkCmdTraceRaysNV( uint32_t height, uint32_t depth) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_raygenShaderBindingTableBuffer = MapHandle(raygenShaderBindingTableBuffer, &VulkanObjectInfoTable::GetBufferInfo); VkBuffer in_missShaderBindingTableBuffer = MapHandle(missShaderBindingTableBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -7454,6 +7951,7 @@ void VulkanReplayConsumer::Process_vkCreateRayTracingPipelinesNV( StructPointerDecoder* pAllocator, HandlePointerDecoder* pPipelines) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPipelineCache in_pipelineCache = MapHandle(pipelineCache, &VulkanObjectInfoTable::GetPipelineCacheInfo); const VkRayTracingPipelineCreateInfoNV* in_pCreateInfos = pCreateInfos->GetPointer(); @@ -7462,6 +7960,7 @@ void VulkanReplayConsumer::Process_vkCreateRayTracingPipelinesNV( if (!pPipelines->IsNull()) { pPipelines->SetHandleLength(createInfoCount); } if (omitted_pipeline_cache_data_) {AllowCompileDuringPipelineCreation(createInfoCount, pCreateInfos->GetPointer());} VkPipeline* out_pPipelines = pPipelines->GetHandlePointer(); +ForwardIdsToCaptureLayer(pPipelines->GetPointer(), pPipelines->GetLength(), pPipelines->GetHandlePointer(), createInfoCount, VK_OBJECT_TYPE_PIPELINE); VkResult replay_result = GetDeviceTable(in_device)->CreateRayTracingPipelinesNV(in_device, in_pipelineCache, createInfoCount, in_pCreateInfos, in_pAllocator, out_pPipelines); CheckResult("vkCreateRayTracingPipelinesNV", returnValue, replay_result, call_info); @@ -7479,6 +7978,7 @@ void VulkanReplayConsumer::Process_vkGetRayTracingShaderGroupHandlesKHR( size_t dataSize, PointerDecoder* pData) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_pipeline = GetObjectInfoTable().GetPipelineInfo(pipeline); if (!pData->IsNull()) { pData->AllocateOutputData(dataSize); } @@ -7497,6 +7997,7 @@ void VulkanReplayConsumer::Process_vkGetRayTracingShaderGroupHandlesNV( size_t dataSize, PointerDecoder* pData) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPipeline in_pipeline = MapHandle(pipeline, &VulkanObjectInfoTable::GetPipelineInfo); void* out_pData = pData->IsNull() ? nullptr : pData->AllocateOutputData(dataSize); @@ -7513,6 +8014,7 @@ void VulkanReplayConsumer::Process_vkGetAccelerationStructureHandleNV( size_t dataSize, PointerDecoder* pData) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkAccelerationStructureNV in_accelerationStructure = MapHandle(accelerationStructure, &VulkanObjectInfoTable::GetAccelerationStructureNVInfo); void* out_pData = pData->IsNull() ? nullptr : pData->AllocateOutputData(dataSize); @@ -7530,6 +8032,7 @@ void VulkanReplayConsumer::Process_vkCmdWriteAccelerationStructuresPropertiesNV( format::HandleId queryPool, uint32_t firstQuery) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkAccelerationStructureNV* in_pAccelerationStructures = MapHandles(pAccelerationStructures, accelerationStructureCount, &VulkanObjectInfoTable::GetAccelerationStructureNVInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -7549,6 +8052,7 @@ void VulkanReplayConsumer::Process_vkCompileDeferredNV( format::HandleId pipeline, uint32_t shader) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPipeline in_pipeline = MapHandle(pipeline, &VulkanObjectInfoTable::GetPipelineInfo); @@ -7564,6 +8068,7 @@ void VulkanReplayConsumer::Process_vkGetMemoryHostPointerPropertiesEXT( uint64_t pHostPointer, StructPointerDecoder* pMemoryHostPointerProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const void* in_pHostPointer = PreProcessExternalObject(pHostPointer, format::ApiCallId::ApiCall_vkGetMemoryHostPointerPropertiesEXT, "vkGetMemoryHostPointerPropertiesEXT"); VkMemoryHostPointerPropertiesEXT* out_pMemoryHostPointerProperties = pMemoryHostPointerProperties->IsNull() ? nullptr : pMemoryHostPointerProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT, nullptr }); @@ -7581,6 +8086,7 @@ void VulkanReplayConsumer::Process_vkCmdWriteBufferMarkerAMD( VkDeviceSize dstOffset, uint32_t marker) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_dstBuffer = MapHandle(dstBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -7599,6 +8105,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceCalibrateableTimeDomainsEX PointerDecoder* pTimeDomainCount, PointerDecoder* pTimeDomains) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pTimeDomainCount = pTimeDomainCount->IsNull() ? nullptr : pTimeDomainCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceCalibrateableTimeDomainsEXT", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceCalibrateableTimeDomainsEXT, pTimeDomainCount, pTimeDomains, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkTimeDomainKHR* out_pTimeDomains = pTimeDomains->IsNull() ? nullptr : pTimeDomains->AllocateOutputData(*out_pTimeDomainCount); @@ -7618,6 +8125,7 @@ void VulkanReplayConsumer::Process_vkGetCalibratedTimestampsEXT( PointerDecoder* pTimestamps, PointerDecoder* pMaxDeviation) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkCalibratedTimestampInfoKHR* in_pTimestampInfos = pTimestampInfos->GetPointer(); uint64_t* out_pTimestamps = pTimestamps->IsNull() ? nullptr : pTimestamps->AllocateOutputData(timestampCount); @@ -7633,6 +8141,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawMeshTasksNV( uint32_t taskCount, uint32_t firstTask) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdDrawMeshTasksNV(in_commandBuffer, taskCount, firstTask); @@ -7651,6 +8160,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawMeshTasksIndirectNV( uint32_t drawCount, uint32_t stride) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -7672,6 +8182,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawMeshTasksIndirectCountNV( uint32_t maxDrawCount, uint32_t stride) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); VkBuffer in_countBuffer = MapHandle(countBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -7691,6 +8202,7 @@ void VulkanReplayConsumer::Process_vkCmdSetExclusiveScissorEnableNV( uint32_t exclusiveScissorCount, PointerDecoder* pExclusiveScissorEnables) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBool32* in_pExclusiveScissorEnables = pExclusiveScissorEnables->GetPointer(); @@ -7709,6 +8221,7 @@ void VulkanReplayConsumer::Process_vkCmdSetExclusiveScissorNV( uint32_t exclusiveScissorCount, StructPointerDecoder* pExclusiveScissors) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkRect2D* in_pExclusiveScissors = pExclusiveScissors->GetPointer(); @@ -7725,6 +8238,7 @@ void VulkanReplayConsumer::Process_vkCmdSetCheckpointNV( format::HandleId commandBuffer, uint64_t pCheckpointMarker) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const void* in_pCheckpointMarker = PreProcessExternalObject(pCheckpointMarker, format::ApiCallId::ApiCall_vkCmdSetCheckpointNV, "vkCmdSetCheckpointNV"); @@ -7742,6 +8256,7 @@ void VulkanReplayConsumer::Process_vkGetQueueCheckpointDataNV( PointerDecoder* pCheckpointDataCount, StructPointerDecoder* pCheckpointData) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkQueue in_queue = MapHandle(queue, &VulkanObjectInfoTable::GetQueueInfo); uint32_t* out_pCheckpointDataCount = pCheckpointDataCount->IsNull() ? nullptr : pCheckpointDataCount->AllocateOutputData(1, GetOutputArrayCount("vkGetQueueCheckpointDataNV", VK_SUCCESS, queue, kQueueArrayGetQueueCheckpointDataNV, pCheckpointDataCount, pCheckpointData, &VulkanObjectInfoTable::GetQueueInfo)); VkCheckpointDataNV* out_pCheckpointData = pCheckpointData->IsNull() ? nullptr : pCheckpointData->AllocateOutputData(*out_pCheckpointDataCount, VkCheckpointDataNV{ VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV, nullptr }); @@ -7757,6 +8272,7 @@ void VulkanReplayConsumer::Process_vkInitializePerformanceApiINTEL( format::HandleId device, StructPointerDecoder* pInitializeInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkInitializePerformanceApiInfoINTEL* in_pInitializeInfo = pInitializeInfo->GetPointer(); @@ -7768,6 +8284,7 @@ void VulkanReplayConsumer::Process_vkUninitializePerformanceApiINTEL( const ApiCallInfo& call_info, format::HandleId device) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); GetDeviceTable(in_device)->UninitializePerformanceApiINTEL(in_device); @@ -7779,6 +8296,7 @@ void VulkanReplayConsumer::Process_vkCmdSetPerformanceMarkerINTEL( format::HandleId commandBuffer, StructPointerDecoder* pMarkerInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkPerformanceMarkerInfoINTEL* in_pMarkerInfo = pMarkerInfo->GetPointer(); @@ -7797,6 +8315,7 @@ void VulkanReplayConsumer::Process_vkCmdSetPerformanceStreamMarkerINTEL( format::HandleId commandBuffer, StructPointerDecoder* pMarkerInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkPerformanceStreamMarkerInfoINTEL* in_pMarkerInfo = pMarkerInfo->GetPointer(); @@ -7815,6 +8334,7 @@ void VulkanReplayConsumer::Process_vkCmdSetPerformanceOverrideINTEL( format::HandleId commandBuffer, StructPointerDecoder* pOverrideInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkPerformanceOverrideInfoINTEL* in_pOverrideInfo = pOverrideInfo->GetPointer(); @@ -7834,10 +8354,12 @@ void VulkanReplayConsumer::Process_vkAcquirePerformanceConfigurationINTEL( StructPointerDecoder* pAcquireInfo, HandlePointerDecoder* pConfiguration) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkPerformanceConfigurationAcquireInfoINTEL* in_pAcquireInfo = pAcquireInfo->GetPointer(); if (!pConfiguration->IsNull()) { pConfiguration->SetHandleLength(1); } VkPerformanceConfigurationINTEL* out_pConfiguration = pConfiguration->GetHandlePointer(); +ForwardIdToCaptureLayer(pConfiguration->GetPointer(), VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL); VkResult replay_result = GetDeviceTable(in_device)->AcquirePerformanceConfigurationINTEL(in_device, in_pAcquireInfo, out_pConfiguration); CheckResult("vkAcquirePerformanceConfigurationINTEL", returnValue, replay_result, call_info); @@ -7851,6 +8373,7 @@ void VulkanReplayConsumer::Process_vkReleasePerformanceConfigurationINTEL( format::HandleId device, format::HandleId configuration) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPerformanceConfigurationINTEL in_configuration = MapHandle(configuration, &VulkanObjectInfoTable::GetPerformanceConfigurationINTELInfo); @@ -7864,6 +8387,7 @@ void VulkanReplayConsumer::Process_vkQueueSetPerformanceConfigurationINTEL( format::HandleId queue, format::HandleId configuration) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkQueue in_queue = MapHandle(queue, &VulkanObjectInfoTable::GetQueueInfo); VkPerformanceConfigurationINTEL in_configuration = MapHandle(configuration, &VulkanObjectInfoTable::GetPerformanceConfigurationINTELInfo); @@ -7878,6 +8402,7 @@ void VulkanReplayConsumer::Process_vkGetPerformanceParameterINTEL( VkPerformanceParameterTypeINTEL parameter, StructPointerDecoder* pValue) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPerformanceValueINTEL* out_pValue = pValue->IsNull() ? nullptr : pValue->AllocateOutputData(1); @@ -7896,6 +8421,7 @@ void VulkanReplayConsumer::Process_vkSetLocalDimmingAMD( GFXRECON_LOG_DEBUG("Skip vkSetLocalDimmingAMD for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapChain = MapHandle(swapChain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); @@ -7910,11 +8436,13 @@ void VulkanReplayConsumer::Process_vkCreateImagePipeSurfaceFUCHSIA( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); const VkImagePipeSurfaceCreateInfoFUCHSIA* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } VkSurfaceKHR* out_pSurface = pSurface->GetHandlePointer(); +ForwardIdToCaptureLayer(pSurface->GetPointer(), VK_OBJECT_TYPE_SURFACE_KHR); VkResult replay_result = GetInstanceTable(in_instance)->CreateImagePipeSurfaceFUCHSIA(in_instance, in_pCreateInfo, in_pAllocator, out_pSurface); CheckResult("vkCreateImagePipeSurfaceFUCHSIA", returnValue, replay_result, call_info); @@ -7930,10 +8458,12 @@ void VulkanReplayConsumer::Process_vkCreateMetalSurfaceEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } SurfaceKHRInfo handle_info; pSurface->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pSurface->GetPointer(), VK_OBJECT_TYPE_SURFACE_KHR); VkResult replay_result = OverrideCreateMetalSurfaceEXT(GetInstanceTable(in_instance->handle)->CreateMetalSurfaceEXT, returnValue, in_instance, pCreateInfo, pAllocator, pSurface); CheckResult("vkCreateMetalSurfaceEXT", returnValue, replay_result, call_info); @@ -7947,6 +8477,7 @@ void VulkanReplayConsumer::Process_vkGetBufferDeviceAddressEXT( format::HandleId device, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkBufferDeviceAddressInfo* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -7961,6 +8492,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceToolPropertiesEXT( PointerDecoder* pToolCount, StructPointerDecoder* pToolProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); pToolCount->IsNull() ? nullptr : pToolCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceToolPropertiesEXT", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceToolPropertiesEXT, pToolCount, pToolProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); if (!pToolProperties->IsNull()) { pToolProperties->AllocateOutputData(*pToolCount->GetOutputPointer(), VkPhysicalDeviceToolProperties{ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES, nullptr }); } @@ -7978,6 +8510,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceCooperativeMatrixPropertie PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceCooperativeMatrixPropertiesNV", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceCooperativeMatrixPropertiesNV, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkCooperativeMatrixPropertiesNV* out_pProperties = pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(*out_pPropertyCount, VkCooperativeMatrixPropertiesNV{ VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV, nullptr }); @@ -7995,6 +8528,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSupportedFramebufferMixedS PointerDecoder* pCombinationCount, StructPointerDecoder* pCombinations) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pCombinationCount = pCombinationCount->IsNull() ? nullptr : pCombinationCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV, pCombinationCount, pCombinations, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkFramebufferMixedSamplesCombinationNV* out_pCombinations = pCombinations->IsNull() ? nullptr : pCombinations->AllocateOutputData(*out_pCombinationCount, VkFramebufferMixedSamplesCombinationNV{ VK_STRUCTURE_TYPE_FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV, nullptr }); @@ -8018,6 +8552,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSurfacePresentModes2EXT( GFXRECON_LOG_DEBUG("Skip vkGetPhysicalDeviceSurfacePresentModes2EXT for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceSurfaceInfo2KHR* in_pSurfaceInfo = pSurfaceInfo->GetPointer(); if (pSurfaceInfo->GetPointer()->surface == VK_NULL_HANDLE) { return; } @@ -8044,6 +8579,7 @@ void VulkanReplayConsumer::Process_vkAcquireFullScreenExclusiveModeEXT( GFXRECON_LOG_DEBUG("Skip vkAcquireFullScreenExclusiveModeEXT for offscreen or force windowed mode."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapchain = MapHandle(swapchain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id)->surface_creation_skipped) { return; } @@ -8063,6 +8599,7 @@ void VulkanReplayConsumer::Process_vkReleaseFullScreenExclusiveModeEXT( GFXRECON_LOG_DEBUG("Skip vkReleaseFullScreenExclusiveModeEXT for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapchain = MapHandle(swapchain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id)->surface_creation_skipped) { return; } @@ -8083,6 +8620,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceGroupSurfacePresentModes2EXT( GFXRECON_LOG_DEBUG("Skip vkGetDeviceGroupSurfacePresentModes2EXT for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkPhysicalDeviceSurfaceInfo2KHR* in_pSurfaceInfo = pSurfaceInfo->GetPointer(); if (pSurfaceInfo->GetPointer()->surface == VK_NULL_HANDLE) { return; } @@ -8103,10 +8641,12 @@ void VulkanReplayConsumer::Process_vkCreateHeadlessSurfaceEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } SurfaceKHRInfo handle_info; pSurface->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pSurface->GetPointer(), VK_OBJECT_TYPE_SURFACE_KHR); VkResult replay_result = OverrideCreateHeadlessSurfaceEXT(GetInstanceTable(in_instance->handle)->CreateHeadlessSurfaceEXT, returnValue, in_instance, pCreateInfo, pAllocator, pSurface); CheckResult("vkCreateHeadlessSurfaceEXT", returnValue, replay_result, call_info); @@ -8120,6 +8660,7 @@ void VulkanReplayConsumer::Process_vkCmdSetLineStippleEXT( uint32_t lineStippleFactor, uint16_t lineStipplePattern) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetLineStippleEXT(in_commandBuffer, lineStippleFactor, lineStipplePattern); @@ -8137,6 +8678,7 @@ void VulkanReplayConsumer::Process_vkResetQueryPoolEXT( uint32_t firstQuery, uint32_t queryCount) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -8148,6 +8690,7 @@ void VulkanReplayConsumer::Process_vkCmdSetCullModeEXT( format::HandleId commandBuffer, VkCullModeFlags cullMode) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetCullModeEXT(in_commandBuffer, cullMode); @@ -8163,6 +8706,7 @@ void VulkanReplayConsumer::Process_vkCmdSetFrontFaceEXT( format::HandleId commandBuffer, VkFrontFace frontFace) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetFrontFaceEXT(in_commandBuffer, frontFace); @@ -8178,6 +8722,7 @@ void VulkanReplayConsumer::Process_vkCmdSetPrimitiveTopologyEXT( format::HandleId commandBuffer, VkPrimitiveTopology primitiveTopology) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetPrimitiveTopologyEXT(in_commandBuffer, primitiveTopology); @@ -8194,6 +8739,7 @@ void VulkanReplayConsumer::Process_vkCmdSetViewportWithCountEXT( uint32_t viewportCount, StructPointerDecoder* pViewports) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkViewport* in_pViewports = pViewports->GetPointer(); @@ -8211,6 +8757,7 @@ void VulkanReplayConsumer::Process_vkCmdSetScissorWithCountEXT( uint32_t scissorCount, StructPointerDecoder* pScissors) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkRect2D* in_pScissors = pScissors->GetPointer(); @@ -8232,6 +8779,7 @@ void VulkanReplayConsumer::Process_vkCmdBindVertexBuffers2EXT( PointerDecoder* pSizes, PointerDecoder* pStrides) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBuffer* in_pBuffers = MapHandles(pBuffers, bindingCount, &VulkanObjectInfoTable::GetBufferInfo); const VkDeviceSize* in_pOffsets = pOffsets->GetPointer(); @@ -8251,6 +8799,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthTestEnableEXT( format::HandleId commandBuffer, VkBool32 depthTestEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthTestEnableEXT(in_commandBuffer, depthTestEnable); @@ -8266,6 +8815,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthWriteEnableEXT( format::HandleId commandBuffer, VkBool32 depthWriteEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthWriteEnableEXT(in_commandBuffer, depthWriteEnable); @@ -8281,6 +8831,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthCompareOpEXT( format::HandleId commandBuffer, VkCompareOp depthCompareOp) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthCompareOpEXT(in_commandBuffer, depthCompareOp); @@ -8296,6 +8847,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthBoundsTestEnableEXT( format::HandleId commandBuffer, VkBool32 depthBoundsTestEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthBoundsTestEnableEXT(in_commandBuffer, depthBoundsTestEnable); @@ -8311,6 +8863,7 @@ void VulkanReplayConsumer::Process_vkCmdSetStencilTestEnableEXT( format::HandleId commandBuffer, VkBool32 stencilTestEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetStencilTestEnableEXT(in_commandBuffer, stencilTestEnable); @@ -8330,6 +8883,7 @@ void VulkanReplayConsumer::Process_vkCmdSetStencilOpEXT( VkStencilOp depthFailOp, VkCompareOp compareOp) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetStencilOpEXT(in_commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp); @@ -8346,6 +8900,7 @@ void VulkanReplayConsumer::Process_vkCopyMemoryToImageEXT( format::HandleId device, StructPointerDecoder* pCopyMemoryToImageInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkCopyMemoryToImageInfoEXT* in_pCopyMemoryToImageInfo = pCopyMemoryToImageInfo->GetPointer(); MapStructHandles(pCopyMemoryToImageInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -8360,6 +8915,7 @@ void VulkanReplayConsumer::Process_vkCopyImageToMemoryEXT( format::HandleId device, StructPointerDecoder* pCopyImageToMemoryInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkCopyImageToMemoryInfoEXT* in_pCopyImageToMemoryInfo = pCopyImageToMemoryInfo->GetPointer(); MapStructHandles(pCopyImageToMemoryInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -8374,6 +8930,7 @@ void VulkanReplayConsumer::Process_vkCopyImageToImageEXT( format::HandleId device, StructPointerDecoder* pCopyImageToImageInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkCopyImageToImageInfoEXT* in_pCopyImageToImageInfo = pCopyImageToImageInfo->GetPointer(); MapStructHandles(pCopyImageToImageInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -8389,6 +8946,7 @@ void VulkanReplayConsumer::Process_vkTransitionImageLayoutEXT( uint32_t transitionCount, StructPointerDecoder* pTransitions) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkHostImageLayoutTransitionInfoEXT* in_pTransitions = pTransitions->GetPointer(); MapStructArrayHandles(pTransitions->GetMetaStructPointer(), pTransitions->GetLength(), GetObjectInfoTable()); @@ -8404,6 +8962,7 @@ void VulkanReplayConsumer::Process_vkGetImageSubresourceLayout2EXT( StructPointerDecoder* pSubresource, StructPointerDecoder* pLayout) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkImage in_image = MapHandle(image, &VulkanObjectInfoTable::GetImageInfo); const VkImageSubresource2KHR* in_pSubresource = pSubresource->GetPointer(); @@ -8424,6 +8983,7 @@ void VulkanReplayConsumer::Process_vkReleaseSwapchainImagesEXT( GFXRECON_LOG_DEBUG("Skip vkReleaseSwapchainImagesEXT for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkReleaseSwapchainImagesInfoEXT* in_pReleaseInfo = pReleaseInfo->GetPointer(); MapStructHandles(pReleaseInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -8438,6 +8998,7 @@ void VulkanReplayConsumer::Process_vkGetGeneratedCommandsMemoryRequirementsNV( StructPointerDecoder* pInfo, StructPointerDecoder* pMemoryRequirements) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkGeneratedCommandsMemoryRequirementsInfoNV* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -8452,6 +9013,7 @@ void VulkanReplayConsumer::Process_vkCmdPreprocessGeneratedCommandsNV( format::HandleId commandBuffer, StructPointerDecoder* pGeneratedCommandsInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkGeneratedCommandsInfoNV* in_pGeneratedCommandsInfo = pGeneratedCommandsInfo->GetPointer(); MapStructHandles(pGeneratedCommandsInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -8470,6 +9032,7 @@ void VulkanReplayConsumer::Process_vkCmdExecuteGeneratedCommandsNV( VkBool32 isPreprocessed, StructPointerDecoder* pGeneratedCommandsInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkGeneratedCommandsInfoNV* in_pGeneratedCommandsInfo = pGeneratedCommandsInfo->GetPointer(); MapStructHandles(pGeneratedCommandsInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -8489,6 +9052,7 @@ void VulkanReplayConsumer::Process_vkCmdBindPipelineShaderGroupNV( format::HandleId pipeline, uint32_t groupIndex) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkPipeline in_pipeline = MapHandle(pipeline, &VulkanObjectInfoTable::GetPipelineInfo); @@ -8508,12 +9072,14 @@ void VulkanReplayConsumer::Process_vkCreateIndirectCommandsLayoutNV( StructPointerDecoder* pAllocator, HandlePointerDecoder* pIndirectCommandsLayout) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkIndirectCommandsLayoutCreateInfoNV* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pIndirectCommandsLayout->IsNull()) { pIndirectCommandsLayout->SetHandleLength(1); } VkIndirectCommandsLayoutNV* out_pIndirectCommandsLayout = pIndirectCommandsLayout->GetHandlePointer(); +ForwardIdToCaptureLayer(pIndirectCommandsLayout->GetPointer(), VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV); VkResult replay_result = GetDeviceTable(in_device)->CreateIndirectCommandsLayoutNV(in_device, in_pCreateInfo, in_pAllocator, out_pIndirectCommandsLayout); CheckResult("vkCreateIndirectCommandsLayoutNV", returnValue, replay_result, call_info); @@ -8527,6 +9093,7 @@ void VulkanReplayConsumer::Process_vkDestroyIndirectCommandsLayoutNV( format::HandleId indirectCommandsLayout, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkIndirectCommandsLayoutNV in_indirectCommandsLayout = MapHandle(indirectCommandsLayout, &VulkanObjectInfoTable::GetIndirectCommandsLayoutNVInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -8540,6 +9107,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthBias2EXT( format::HandleId commandBuffer, StructPointerDecoder* pDepthBiasInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkDepthBiasInfoEXT* in_pDepthBiasInfo = pDepthBiasInfo->GetPointer(); @@ -8558,6 +9126,7 @@ void VulkanReplayConsumer::Process_vkAcquireDrmDisplayEXT( int32_t drmFd, format::HandleId display) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkDisplayKHR in_display = MapHandle(display, &VulkanObjectInfoTable::GetDisplayKHRInfo); @@ -8573,9 +9142,11 @@ void VulkanReplayConsumer::Process_vkGetDrmDisplayEXT( uint32_t connectorId, HandlePointerDecoder* display) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); if (!display->IsNull()) { display->SetHandleLength(1); } VkDisplayKHR* out_display = display->GetHandlePointer(); +ForwardIdToCaptureLayer(display->GetPointer(), VK_OBJECT_TYPE_DISPLAY_KHR); VkResult replay_result = GetInstanceTable(in_physicalDevice)->GetDrmDisplayEXT(in_physicalDevice, drmFd, connectorId, out_display); CheckResult("vkGetDrmDisplayEXT", returnValue, replay_result, call_info); @@ -8591,11 +9162,13 @@ void VulkanReplayConsumer::Process_vkCreatePrivateDataSlotEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pPrivateDataSlot) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkPrivateDataSlotCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pPrivateDataSlot->IsNull()) { pPrivateDataSlot->SetHandleLength(1); } VkPrivateDataSlot* out_pPrivateDataSlot = pPrivateDataSlot->GetHandlePointer(); +ForwardIdToCaptureLayer(pPrivateDataSlot->GetPointer(), VK_OBJECT_TYPE_PRIVATE_DATA_SLOT); VkResult replay_result = GetDeviceTable(in_device)->CreatePrivateDataSlotEXT(in_device, in_pCreateInfo, in_pAllocator, out_pPrivateDataSlot); CheckResult("vkCreatePrivateDataSlotEXT", returnValue, replay_result, call_info); @@ -8609,6 +9182,7 @@ void VulkanReplayConsumer::Process_vkDestroyPrivateDataSlotEXT( format::HandleId privateDataSlot, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPrivateDataSlot in_privateDataSlot = MapHandle(privateDataSlot, &VulkanObjectInfoTable::GetPrivateDataSlotInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -8626,6 +9200,7 @@ void VulkanReplayConsumer::Process_vkSetPrivateDataEXT( format::HandleId privateDataSlot, uint64_t data) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); uint64_t in_objectHandle = MapHandle(objectHandle, objectType); VkPrivateDataSlot in_privateDataSlot = MapHandle(privateDataSlot, &VulkanObjectInfoTable::GetPrivateDataSlotInfo); @@ -8642,6 +9217,7 @@ void VulkanReplayConsumer::Process_vkGetPrivateDataEXT( format::HandleId privateDataSlot, PointerDecoder* pData) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); uint64_t in_objectHandle = MapHandle(objectHandle, objectType); VkPrivateDataSlot in_privateDataSlot = MapHandle(privateDataSlot, &VulkanObjectInfoTable::GetPrivateDataSlotInfo); @@ -8656,6 +9232,7 @@ void VulkanReplayConsumer::Process_vkCmdSetFragmentShadingRateEnumNV( VkFragmentShadingRateNV shadingRate, PointerDecoder* combinerOps) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkFragmentShadingRateCombinerOpKHR* in_combinerOps = combinerOps->GetPointer(); @@ -8674,6 +9251,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceFaultInfoEXT( StructPointerDecoder* pFaultCounts, StructPointerDecoder* pFaultInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeviceFaultCountsEXT* out_pFaultCounts = pFaultCounts->IsNull() ? nullptr : pFaultCounts->AllocateOutputData(1, { VK_STRUCTURE_TYPE_DEVICE_FAULT_COUNTS_EXT, nullptr }); InitializeOutputStructPNext(pFaultCounts); @@ -8690,6 +9268,7 @@ void VulkanReplayConsumer::Process_vkAcquireWinrtDisplayNV( format::HandleId physicalDevice, format::HandleId display) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkDisplayKHR in_display = MapHandle(display, &VulkanObjectInfoTable::GetDisplayKHRInfo); @@ -8704,9 +9283,11 @@ void VulkanReplayConsumer::Process_vkGetWinrtDisplayNV( uint32_t deviceRelativeId, HandlePointerDecoder* pDisplay) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); if (!pDisplay->IsNull()) { pDisplay->SetHandleLength(1); } VkDisplayKHR* out_pDisplay = pDisplay->GetHandlePointer(); +ForwardIdToCaptureLayer(pDisplay->GetPointer(), VK_OBJECT_TYPE_DISPLAY_KHR); VkResult replay_result = GetInstanceTable(in_physicalDevice)->GetWinrtDisplayNV(in_physicalDevice, deviceRelativeId, out_pDisplay); CheckResult("vkGetWinrtDisplayNV", returnValue, replay_result, call_info); @@ -8722,11 +9303,13 @@ void VulkanReplayConsumer::Process_vkCreateDirectFBSurfaceEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); const VkDirectFBSurfaceCreateInfoEXT* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } VkSurfaceKHR* out_pSurface = pSurface->GetHandlePointer(); +ForwardIdToCaptureLayer(pSurface->GetPointer(), VK_OBJECT_TYPE_SURFACE_KHR); VkResult replay_result = GetInstanceTable(in_instance)->CreateDirectFBSurfaceEXT(in_instance, in_pCreateInfo, in_pAllocator, out_pSurface); CheckResult("vkCreateDirectFBSurfaceEXT", returnValue, replay_result, call_info); @@ -8741,6 +9324,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceDirectFBPresentationSuppor uint32_t queueFamilyIndex, uint64_t dfb) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); IDirectFB* in_dfb = static_cast(PreProcessExternalObject(dfb, format::ApiCallId::ApiCall_vkGetPhysicalDeviceDirectFBPresentationSupportEXT, "vkGetPhysicalDeviceDirectFBPresentationSupportEXT")); @@ -8755,6 +9339,7 @@ void VulkanReplayConsumer::Process_vkCmdSetVertexInputEXT( uint32_t vertexAttributeDescriptionCount, StructPointerDecoder* pVertexAttributeDescriptions) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkVertexInputBindingDescription2EXT* in_pVertexBindingDescriptions = pVertexBindingDescriptions->GetPointer(); const VkVertexInputAttributeDescription2EXT* in_pVertexAttributeDescriptions = pVertexAttributeDescriptions->GetPointer(); @@ -8774,6 +9359,7 @@ void VulkanReplayConsumer::Process_vkGetMemoryZirconHandleFUCHSIA( StructPointerDecoder* pGetZirconHandleInfo, PointerDecoder* pZirconHandle) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMemoryGetZirconHandleInfoFUCHSIA* in_pGetZirconHandleInfo = pGetZirconHandleInfo->GetPointer(); MapStructHandles(pGetZirconHandleInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -8791,6 +9377,7 @@ void VulkanReplayConsumer::Process_vkGetMemoryZirconHandlePropertiesFUCHSIA( uint32_t zirconHandle, StructPointerDecoder* pMemoryZirconHandleProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkMemoryZirconHandlePropertiesFUCHSIA* out_pMemoryZirconHandleProperties = pMemoryZirconHandleProperties->IsNull() ? nullptr : pMemoryZirconHandleProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA, nullptr }); InitializeOutputStructPNext(pMemoryZirconHandleProperties); @@ -8805,6 +9392,7 @@ void VulkanReplayConsumer::Process_vkImportSemaphoreZirconHandleFUCHSIA( format::HandleId device, StructPointerDecoder* pImportSemaphoreZirconHandleInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkImportSemaphoreZirconHandleInfoFUCHSIA* in_pImportSemaphoreZirconHandleInfo = pImportSemaphoreZirconHandleInfo->GetPointer(); MapStructHandles(pImportSemaphoreZirconHandleInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -8820,6 +9408,7 @@ void VulkanReplayConsumer::Process_vkGetSemaphoreZirconHandleFUCHSIA( StructPointerDecoder* pGetZirconHandleInfo, PointerDecoder* pZirconHandle) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkSemaphoreGetZirconHandleInfoFUCHSIA* in_pGetZirconHandleInfo = pGetZirconHandleInfo->GetPointer(); MapStructHandles(pGetZirconHandleInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -8835,6 +9424,7 @@ void VulkanReplayConsumer::Process_vkCmdBindInvocationMaskHUAWEI( format::HandleId imageView, VkImageLayout imageLayout) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkImageView in_imageView = MapHandle(imageView, &VulkanObjectInfoTable::GetImageViewInfo); @@ -8853,6 +9443,7 @@ void VulkanReplayConsumer::Process_vkGetMemoryRemoteAddressNV( StructPointerDecoder* pMemoryGetRemoteAddressInfo, PointerDecoder* pAddress) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMemoryGetRemoteAddressInfoNV* in_pMemoryGetRemoteAddressInfo = pMemoryGetRemoteAddressInfo->GetPointer(); MapStructHandles(pMemoryGetRemoteAddressInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -8869,6 +9460,7 @@ void VulkanReplayConsumer::Process_vkCmdSetPatchControlPointsEXT( format::HandleId commandBuffer, uint32_t patchControlPoints) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetPatchControlPointsEXT(in_commandBuffer, patchControlPoints); @@ -8884,6 +9476,7 @@ void VulkanReplayConsumer::Process_vkCmdSetRasterizerDiscardEnableEXT( format::HandleId commandBuffer, VkBool32 rasterizerDiscardEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetRasterizerDiscardEnableEXT(in_commandBuffer, rasterizerDiscardEnable); @@ -8899,6 +9492,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthBiasEnableEXT( format::HandleId commandBuffer, VkBool32 depthBiasEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthBiasEnableEXT(in_commandBuffer, depthBiasEnable); @@ -8914,6 +9508,7 @@ void VulkanReplayConsumer::Process_vkCmdSetLogicOpEXT( format::HandleId commandBuffer, VkLogicOp logicOp) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetLogicOpEXT(in_commandBuffer, logicOp); @@ -8929,6 +9524,7 @@ void VulkanReplayConsumer::Process_vkCmdSetPrimitiveRestartEnableEXT( format::HandleId commandBuffer, VkBool32 primitiveRestartEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetPrimitiveRestartEnableEXT(in_commandBuffer, primitiveRestartEnable); @@ -8947,11 +9543,13 @@ void VulkanReplayConsumer::Process_vkCreateScreenSurfaceQNX( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); const VkScreenSurfaceCreateInfoQNX* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } VkSurfaceKHR* out_pSurface = pSurface->GetHandlePointer(); +ForwardIdToCaptureLayer(pSurface->GetPointer(), VK_OBJECT_TYPE_SURFACE_KHR); VkResult replay_result = GetInstanceTable(in_instance)->CreateScreenSurfaceQNX(in_instance, in_pCreateInfo, in_pAllocator, out_pSurface); CheckResult("vkCreateScreenSurfaceQNX", returnValue, replay_result, call_info); @@ -8966,6 +9564,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceScreenPresentationSupportQ uint32_t queueFamilyIndex, uint64_t window) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); struct _screen_window* in_window = static_cast(PreProcessExternalObject(window, format::ApiCallId::ApiCall_vkGetPhysicalDeviceScreenPresentationSupportQNX, "vkGetPhysicalDeviceScreenPresentationSupportQNX")); @@ -8978,6 +9577,7 @@ void VulkanReplayConsumer::Process_vkCmdSetColorWriteEnableEXT( uint32_t attachmentCount, PointerDecoder* pColorWriteEnables) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBool32* in_pColorWriteEnables = pColorWriteEnables->GetPointer(); @@ -8998,6 +9598,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawMultiEXT( uint32_t firstInstance, uint32_t stride) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkMultiDrawInfoEXT* in_pVertexInfo = pVertexInfo->GetPointer(); @@ -9019,6 +9620,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawMultiIndexedEXT( uint32_t stride, PointerDecoder* pVertexOffset) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkMultiDrawIndexedInfoEXT* in_pIndexInfo = pIndexInfo->GetPointer(); const int32_t* in_pVertexOffset = pVertexOffset->GetPointer(); @@ -9039,12 +9641,14 @@ void VulkanReplayConsumer::Process_vkCreateMicromapEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pMicromap) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMicromapCreateInfoEXT* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pMicromap->IsNull()) { pMicromap->SetHandleLength(1); } VkMicromapEXT* out_pMicromap = pMicromap->GetHandlePointer(); +ForwardIdToCaptureLayer(pMicromap->GetPointer(), VK_OBJECT_TYPE_MICROMAP_EXT); VkResult replay_result = GetDeviceTable(in_device)->CreateMicromapEXT(in_device, in_pCreateInfo, in_pAllocator, out_pMicromap); CheckResult("vkCreateMicromapEXT", returnValue, replay_result, call_info); @@ -9058,6 +9662,7 @@ void VulkanReplayConsumer::Process_vkDestroyMicromapEXT( format::HandleId micromap, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkMicromapEXT in_micromap = MapHandle(micromap, &VulkanObjectInfoTable::GetMicromapEXTInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -9072,6 +9677,7 @@ void VulkanReplayConsumer::Process_vkCmdBuildMicromapsEXT( uint32_t infoCount, StructPointerDecoder* pInfos) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkMicromapBuildInfoEXT* in_pInfos = pInfos->GetPointer(); MapStructArrayHandles(pInfos->GetMetaStructPointer(), pInfos->GetLength(), GetObjectInfoTable()); @@ -9092,6 +9698,7 @@ void VulkanReplayConsumer::Process_vkBuildMicromapsEXT( uint32_t infoCount, StructPointerDecoder* pInfos) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeferredOperationKHR in_deferredOperation = MapHandle(deferredOperation, &VulkanObjectInfoTable::GetDeferredOperationKHRInfo); const VkMicromapBuildInfoEXT* in_pInfos = pInfos->GetPointer(); @@ -9108,6 +9715,7 @@ void VulkanReplayConsumer::Process_vkCopyMicromapEXT( format::HandleId deferredOperation, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeferredOperationKHR in_deferredOperation = MapHandle(deferredOperation, &VulkanObjectInfoTable::GetDeferredOperationKHRInfo); const VkCopyMicromapInfoEXT* in_pInfo = pInfo->GetPointer(); @@ -9124,6 +9732,7 @@ void VulkanReplayConsumer::Process_vkCopyMicromapToMemoryEXT( format::HandleId deferredOperation, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeferredOperationKHR in_deferredOperation = MapHandle(deferredOperation, &VulkanObjectInfoTable::GetDeferredOperationKHRInfo); const VkCopyMicromapToMemoryInfoEXT* in_pInfo = pInfo->GetPointer(); @@ -9140,6 +9749,7 @@ void VulkanReplayConsumer::Process_vkCopyMemoryToMicromapEXT( format::HandleId deferredOperation, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeferredOperationKHR in_deferredOperation = MapHandle(deferredOperation, &VulkanObjectInfoTable::GetDeferredOperationKHRInfo); const VkCopyMemoryToMicromapInfoEXT* in_pInfo = pInfo->GetPointer(); @@ -9160,6 +9770,7 @@ void VulkanReplayConsumer::Process_vkWriteMicromapsPropertiesEXT( PointerDecoder* pData, size_t stride) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMicromapEXT* in_pMicromaps = MapHandles(pMicromaps, micromapCount, &VulkanObjectInfoTable::GetMicromapEXTInfo); void* out_pData = pData->IsNull() ? nullptr : pData->AllocateOutputData(dataSize); @@ -9173,6 +9784,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyMicromapEXT( format::HandleId commandBuffer, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyMicromapInfoEXT* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9190,6 +9802,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyMicromapToMemoryEXT( format::HandleId commandBuffer, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyMicromapToMemoryInfoEXT* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9207,6 +9820,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyMemoryToMicromapEXT( format::HandleId commandBuffer, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyMemoryToMicromapInfoEXT* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9228,6 +9842,7 @@ void VulkanReplayConsumer::Process_vkCmdWriteMicromapsPropertiesEXT( format::HandleId queryPool, uint32_t firstQuery) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkMicromapEXT* in_pMicromaps = MapHandles(pMicromaps, micromapCount, &VulkanObjectInfoTable::GetMicromapEXTInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -9246,6 +9861,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceMicromapCompatibilityEXT( StructPointerDecoder* pVersionInfo, PointerDecoder* pCompatibility) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMicromapVersionInfoEXT* in_pVersionInfo = pVersionInfo->GetPointer(); VkAccelerationStructureCompatibilityKHR* out_pCompatibility = pCompatibility->IsNull() ? nullptr : pCompatibility->AllocateOutputData(1, static_cast(0)); @@ -9260,6 +9876,7 @@ void VulkanReplayConsumer::Process_vkGetMicromapBuildSizesEXT( StructPointerDecoder* pBuildInfo, StructPointerDecoder* pSizeInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMicromapBuildInfoEXT* in_pBuildInfo = pBuildInfo->GetPointer(); MapStructHandles(pBuildInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9276,6 +9893,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawClusterHUAWEI( uint32_t groupCountY, uint32_t groupCountZ) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdDrawClusterHUAWEI(in_commandBuffer, groupCountX, groupCountY, groupCountZ); @@ -9292,6 +9910,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawClusterIndirectHUAWEI( format::HandleId buffer, VkDeviceSize offset) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -9309,6 +9928,7 @@ void VulkanReplayConsumer::Process_vkSetDeviceMemoryPriorityEXT( format::HandleId memory, float priority) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeviceMemory in_memory = MapHandle(memory, &VulkanObjectInfoTable::GetDeviceMemoryInfo); @@ -9321,6 +9941,7 @@ void VulkanReplayConsumer::Process_vkGetDescriptorSetLayoutHostMappingInfoVALVE( StructPointerDecoder* pBindingReference, StructPointerDecoder* pHostMapping) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDescriptorSetBindingReferenceVALVE* in_pBindingReference = pBindingReference->GetPointer(); MapStructHandles(pBindingReference->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9336,6 +9957,7 @@ void VulkanReplayConsumer::Process_vkGetDescriptorSetHostMappingVALVE( format::HandleId descriptorSet, PointerDecoder* ppData) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDescriptorSet in_descriptorSet = MapHandle(descriptorSet, &VulkanObjectInfoTable::GetDescriptorSetInfo); void** out_ppData = ppData->IsNull() ? nullptr : ppData->AllocateOutputData(1); @@ -9351,6 +9973,7 @@ void VulkanReplayConsumer::Process_vkGetPipelineIndirectMemoryRequirementsNV( StructPointerDecoder* pCreateInfo, StructPointerDecoder* pMemoryRequirements) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkComputePipelineCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9366,6 +9989,7 @@ void VulkanReplayConsumer::Process_vkCmdUpdatePipelineIndirectBufferNV( VkPipelineBindPoint pipelineBindPoint, format::HandleId pipeline) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkPipeline in_pipeline = MapHandle(pipeline, &VulkanObjectInfoTable::GetPipelineInfo); @@ -9383,6 +10007,7 @@ void VulkanReplayConsumer::Process_vkGetPipelineIndirectDeviceAddressNV( format::HandleId device, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkPipelineIndirectDeviceAddressInfoNV* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9395,6 +10020,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthClampEnableEXT( format::HandleId commandBuffer, VkBool32 depthClampEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthClampEnableEXT(in_commandBuffer, depthClampEnable); @@ -9410,6 +10036,7 @@ void VulkanReplayConsumer::Process_vkCmdSetPolygonModeEXT( format::HandleId commandBuffer, VkPolygonMode polygonMode) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetPolygonModeEXT(in_commandBuffer, polygonMode); @@ -9425,6 +10052,7 @@ void VulkanReplayConsumer::Process_vkCmdSetRasterizationSamplesEXT( format::HandleId commandBuffer, VkSampleCountFlagBits rasterizationSamples) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetRasterizationSamplesEXT(in_commandBuffer, rasterizationSamples); @@ -9441,6 +10069,7 @@ void VulkanReplayConsumer::Process_vkCmdSetSampleMaskEXT( VkSampleCountFlagBits samples, PointerDecoder* pSampleMask) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkSampleMask* in_pSampleMask = pSampleMask->GetPointer(); @@ -9457,6 +10086,7 @@ void VulkanReplayConsumer::Process_vkCmdSetAlphaToCoverageEnableEXT( format::HandleId commandBuffer, VkBool32 alphaToCoverageEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetAlphaToCoverageEnableEXT(in_commandBuffer, alphaToCoverageEnable); @@ -9472,6 +10102,7 @@ void VulkanReplayConsumer::Process_vkCmdSetAlphaToOneEnableEXT( format::HandleId commandBuffer, VkBool32 alphaToOneEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetAlphaToOneEnableEXT(in_commandBuffer, alphaToOneEnable); @@ -9487,6 +10118,7 @@ void VulkanReplayConsumer::Process_vkCmdSetLogicOpEnableEXT( format::HandleId commandBuffer, VkBool32 logicOpEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetLogicOpEnableEXT(in_commandBuffer, logicOpEnable); @@ -9504,6 +10136,7 @@ void VulkanReplayConsumer::Process_vkCmdSetColorBlendEnableEXT( uint32_t attachmentCount, PointerDecoder* pColorBlendEnables) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBool32* in_pColorBlendEnables = pColorBlendEnables->GetPointer(); @@ -9522,6 +10155,7 @@ void VulkanReplayConsumer::Process_vkCmdSetColorBlendEquationEXT( uint32_t attachmentCount, StructPointerDecoder* pColorBlendEquations) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkColorBlendEquationEXT* in_pColorBlendEquations = pColorBlendEquations->GetPointer(); @@ -9540,6 +10174,7 @@ void VulkanReplayConsumer::Process_vkCmdSetColorWriteMaskEXT( uint32_t attachmentCount, PointerDecoder* pColorWriteMasks) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkColorComponentFlags* in_pColorWriteMasks = pColorWriteMasks->GetPointer(); @@ -9556,6 +10191,7 @@ void VulkanReplayConsumer::Process_vkCmdSetTessellationDomainOriginEXT( format::HandleId commandBuffer, VkTessellationDomainOrigin domainOrigin) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetTessellationDomainOriginEXT(in_commandBuffer, domainOrigin); @@ -9571,6 +10207,7 @@ void VulkanReplayConsumer::Process_vkCmdSetRasterizationStreamEXT( format::HandleId commandBuffer, uint32_t rasterizationStream) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetRasterizationStreamEXT(in_commandBuffer, rasterizationStream); @@ -9586,6 +10223,7 @@ void VulkanReplayConsumer::Process_vkCmdSetConservativeRasterizationModeEXT( format::HandleId commandBuffer, VkConservativeRasterizationModeEXT conservativeRasterizationMode) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetConservativeRasterizationModeEXT(in_commandBuffer, conservativeRasterizationMode); @@ -9601,6 +10239,7 @@ void VulkanReplayConsumer::Process_vkCmdSetExtraPrimitiveOverestimationSizeEXT( format::HandleId commandBuffer, float extraPrimitiveOverestimationSize) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetExtraPrimitiveOverestimationSizeEXT(in_commandBuffer, extraPrimitiveOverestimationSize); @@ -9616,6 +10255,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthClipEnableEXT( format::HandleId commandBuffer, VkBool32 depthClipEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthClipEnableEXT(in_commandBuffer, depthClipEnable); @@ -9631,6 +10271,7 @@ void VulkanReplayConsumer::Process_vkCmdSetSampleLocationsEnableEXT( format::HandleId commandBuffer, VkBool32 sampleLocationsEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetSampleLocationsEnableEXT(in_commandBuffer, sampleLocationsEnable); @@ -9648,6 +10289,7 @@ void VulkanReplayConsumer::Process_vkCmdSetColorBlendAdvancedEXT( uint32_t attachmentCount, StructPointerDecoder* pColorBlendAdvanced) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkColorBlendAdvancedEXT* in_pColorBlendAdvanced = pColorBlendAdvanced->GetPointer(); @@ -9664,6 +10306,7 @@ void VulkanReplayConsumer::Process_vkCmdSetProvokingVertexModeEXT( format::HandleId commandBuffer, VkProvokingVertexModeEXT provokingVertexMode) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetProvokingVertexModeEXT(in_commandBuffer, provokingVertexMode); @@ -9679,6 +10322,7 @@ void VulkanReplayConsumer::Process_vkCmdSetLineRasterizationModeEXT( format::HandleId commandBuffer, VkLineRasterizationModeEXT lineRasterizationMode) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetLineRasterizationModeEXT(in_commandBuffer, lineRasterizationMode); @@ -9694,6 +10338,7 @@ void VulkanReplayConsumer::Process_vkCmdSetLineStippleEnableEXT( format::HandleId commandBuffer, VkBool32 stippledLineEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetLineStippleEnableEXT(in_commandBuffer, stippledLineEnable); @@ -9709,6 +10354,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthClipNegativeOneToOneEXT( format::HandleId commandBuffer, VkBool32 negativeOneToOne) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthClipNegativeOneToOneEXT(in_commandBuffer, negativeOneToOne); @@ -9724,6 +10370,7 @@ void VulkanReplayConsumer::Process_vkCmdSetViewportWScalingEnableNV( format::HandleId commandBuffer, VkBool32 viewportWScalingEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetViewportWScalingEnableNV(in_commandBuffer, viewportWScalingEnable); @@ -9741,6 +10388,7 @@ void VulkanReplayConsumer::Process_vkCmdSetViewportSwizzleNV( uint32_t viewportCount, StructPointerDecoder* pViewportSwizzles) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkViewportSwizzleNV* in_pViewportSwizzles = pViewportSwizzles->GetPointer(); @@ -9757,6 +10405,7 @@ void VulkanReplayConsumer::Process_vkCmdSetCoverageToColorEnableNV( format::HandleId commandBuffer, VkBool32 coverageToColorEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetCoverageToColorEnableNV(in_commandBuffer, coverageToColorEnable); @@ -9772,6 +10421,7 @@ void VulkanReplayConsumer::Process_vkCmdSetCoverageToColorLocationNV( format::HandleId commandBuffer, uint32_t coverageToColorLocation) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetCoverageToColorLocationNV(in_commandBuffer, coverageToColorLocation); @@ -9787,6 +10437,7 @@ void VulkanReplayConsumer::Process_vkCmdSetCoverageModulationModeNV( format::HandleId commandBuffer, VkCoverageModulationModeNV coverageModulationMode) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetCoverageModulationModeNV(in_commandBuffer, coverageModulationMode); @@ -9802,6 +10453,7 @@ void VulkanReplayConsumer::Process_vkCmdSetCoverageModulationTableEnableNV( format::HandleId commandBuffer, VkBool32 coverageModulationTableEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetCoverageModulationTableEnableNV(in_commandBuffer, coverageModulationTableEnable); @@ -9818,6 +10470,7 @@ void VulkanReplayConsumer::Process_vkCmdSetCoverageModulationTableNV( uint32_t coverageModulationTableCount, PointerDecoder* pCoverageModulationTable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const float* in_pCoverageModulationTable = pCoverageModulationTable->GetPointer(); @@ -9834,6 +10487,7 @@ void VulkanReplayConsumer::Process_vkCmdSetShadingRateImageEnableNV( format::HandleId commandBuffer, VkBool32 shadingRateImageEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetShadingRateImageEnableNV(in_commandBuffer, shadingRateImageEnable); @@ -9849,6 +10503,7 @@ void VulkanReplayConsumer::Process_vkCmdSetRepresentativeFragmentTestEnableNV( format::HandleId commandBuffer, VkBool32 representativeFragmentTestEnable) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetRepresentativeFragmentTestEnableNV(in_commandBuffer, representativeFragmentTestEnable); @@ -9864,6 +10519,7 @@ void VulkanReplayConsumer::Process_vkCmdSetCoverageReductionModeNV( format::HandleId commandBuffer, VkCoverageReductionModeNV coverageReductionMode) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetCoverageReductionModeNV(in_commandBuffer, coverageReductionMode); @@ -9880,6 +10536,7 @@ void VulkanReplayConsumer::Process_vkGetShaderModuleIdentifierEXT( format::HandleId shaderModule, StructPointerDecoder* pIdentifier) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkShaderModule in_shaderModule = MapHandle(shaderModule, &VulkanObjectInfoTable::GetShaderModuleInfo); VkShaderModuleIdentifierEXT* out_pIdentifier = pIdentifier->IsNull() ? nullptr : pIdentifier->AllocateOutputData(1, { VK_STRUCTURE_TYPE_SHADER_MODULE_IDENTIFIER_EXT, nullptr }); @@ -9894,6 +10551,7 @@ void VulkanReplayConsumer::Process_vkGetShaderModuleCreateInfoIdentifierEXT( StructPointerDecoder* pCreateInfo, StructPointerDecoder* pIdentifier) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkShaderModuleCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9911,6 +10569,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceOpticalFlowImageFormatsNV( PointerDecoder* pFormatCount, StructPointerDecoder* pImageFormatProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkOpticalFlowImageFormatInfoNV* in_pOpticalFlowImageFormatInfo = pOpticalFlowImageFormatInfo->GetPointer(); uint32_t* out_pFormatCount = pFormatCount->IsNull() ? nullptr : pFormatCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceOpticalFlowImageFormatsNV", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceOpticalFlowImageFormatsNV, pFormatCount, pImageFormatProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); @@ -9930,11 +10589,13 @@ void VulkanReplayConsumer::Process_vkCreateOpticalFlowSessionNV( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSession) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkOpticalFlowSessionCreateInfoNV* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pSession->IsNull()) { pSession->SetHandleLength(1); } VkOpticalFlowSessionNV* out_pSession = pSession->GetHandlePointer(); +ForwardIdToCaptureLayer(pSession->GetPointer(), VK_OBJECT_TYPE_OPTICAL_FLOW_SESSION_NV); VkResult replay_result = GetDeviceTable(in_device)->CreateOpticalFlowSessionNV(in_device, in_pCreateInfo, in_pAllocator, out_pSession); CheckResult("vkCreateOpticalFlowSessionNV", returnValue, replay_result, call_info); @@ -9948,6 +10609,7 @@ void VulkanReplayConsumer::Process_vkDestroyOpticalFlowSessionNV( format::HandleId session, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkOpticalFlowSessionNV in_session = MapHandle(session, &VulkanObjectInfoTable::GetOpticalFlowSessionNVInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -9965,6 +10627,7 @@ void VulkanReplayConsumer::Process_vkBindOpticalFlowSessionImageNV( format::HandleId view, VkImageLayout layout) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkOpticalFlowSessionNV in_session = MapHandle(session, &VulkanObjectInfoTable::GetOpticalFlowSessionNVInfo); VkImageView in_view = MapHandle(view, &VulkanObjectInfoTable::GetImageViewInfo); @@ -9979,6 +10642,7 @@ void VulkanReplayConsumer::Process_vkCmdOpticalFlowExecuteNV( format::HandleId session, StructPointerDecoder* pExecuteInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkOpticalFlowSessionNV in_session = MapHandle(session, &VulkanObjectInfoTable::GetOpticalFlowSessionNVInfo); const VkOpticalFlowExecuteInfoNV* in_pExecuteInfo = pExecuteInfo->GetPointer(); @@ -10000,12 +10664,15 @@ void VulkanReplayConsumer::Process_vkCreateShadersEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pShaders) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructArrayHandles(pCreateInfos->GetMetaStructPointer(), pCreateInfos->GetLength(), GetObjectInfoTable()); if (!pShaders->IsNull()) { pShaders->SetHandleLength(createInfoCount); } std::vector handle_info(createInfoCount); + ForwardIdsToCaptureLayer(pShaders->GetPointer(), pShaders->GetLength(), pShaders->GetHandlePointer(), createInfoCount, VK_OBJECT_TYPE_SHADER_EXT); for (size_t i = 0; i < createInfoCount; ++i) { pShaders->SetConsumerData(i, &handle_info[i]); } +ForwardIdsToCaptureLayer(pShaders->GetPointer(), pShaders->GetLength(), VK_OBJECT_TYPE_SHADER_EXT); if (UseAsyncOperations()) { @@ -10028,6 +10695,7 @@ void VulkanReplayConsumer::Process_vkDestroyShaderEXT( format::HandleId shader, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkShaderEXT in_shader = MapHandle(shader, &VulkanObjectInfoTable::GetShaderEXTInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -10044,6 +10712,7 @@ void VulkanReplayConsumer::Process_vkGetShaderBinaryDataEXT( PointerDecoder* pDataSize, PointerDecoder* pData) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkShaderEXT in_shader = MapHandle(shader, &VulkanObjectInfoTable::GetShaderEXTInfo); size_t* out_pDataSize = pDataSize->IsNull() ? nullptr : pDataSize->AllocateOutputData(1, GetOutputArrayCount("vkGetShaderBinaryDataEXT", returnValue, shader, kShaderEXTArrayGetShaderBinaryDataEXT, pDataSize, pData, &VulkanObjectInfoTable::GetShaderEXTInfo)); @@ -10062,6 +10731,7 @@ void VulkanReplayConsumer::Process_vkCmdBindShadersEXT( PointerDecoder* pStages, HandlePointerDecoder* pShaders) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkShaderStageFlagBits* in_pStages = pStages->GetPointer(); const VkShaderEXT* in_pShaders = MapHandles(pShaders, stageCount, &VulkanObjectInfoTable::GetShaderEXTInfo); @@ -10082,6 +10752,7 @@ void VulkanReplayConsumer::Process_vkGetFramebufferTilePropertiesQCOM( PointerDecoder* pPropertiesCount, StructPointerDecoder* pProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkFramebuffer in_framebuffer = MapHandle(framebuffer, &VulkanObjectInfoTable::GetFramebufferInfo); uint32_t* out_pPropertiesCount = pPropertiesCount->IsNull() ? nullptr : pPropertiesCount->AllocateOutputData(1, GetOutputArrayCount("vkGetFramebufferTilePropertiesQCOM", returnValue, framebuffer, kFramebufferArrayGetFramebufferTilePropertiesQCOM, pPropertiesCount, pProperties, &VulkanObjectInfoTable::GetFramebufferInfo)); @@ -10100,6 +10771,7 @@ void VulkanReplayConsumer::Process_vkGetDynamicRenderingTilePropertiesQCOM( StructPointerDecoder* pRenderingInfo, StructPointerDecoder* pProperties) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkRenderingInfo* in_pRenderingInfo = pRenderingInfo->GetPointer(); MapStructHandles(pRenderingInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -10122,6 +10794,7 @@ void VulkanReplayConsumer::Process_vkSetLatencySleepModeNV( GFXRECON_LOG_DEBUG("Skip vkSetLatencySleepModeNV for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapchain = MapHandle(swapchain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id)->surface_creation_skipped) { return; } @@ -10143,6 +10816,7 @@ void VulkanReplayConsumer::Process_vkLatencySleepNV( GFXRECON_LOG_DEBUG("Skip vkLatencySleepNV for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapchain = MapHandle(swapchain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id)->surface_creation_skipped) { return; } @@ -10164,6 +10838,7 @@ void VulkanReplayConsumer::Process_vkSetLatencyMarkerNV( GFXRECON_LOG_DEBUG("Skip vkSetLatencyMarkerNV for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapchain = MapHandle(swapchain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id)->surface_creation_skipped) { return; } @@ -10183,6 +10858,7 @@ void VulkanReplayConsumer::Process_vkGetLatencyTimingsNV( GFXRECON_LOG_DEBUG("Skip vkGetLatencyTimingsNV for offscreen."); return; } + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapchain = MapHandle(swapchain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id)->surface_creation_skipped) { return; } @@ -10197,6 +10873,7 @@ void VulkanReplayConsumer::Process_vkQueueNotifyOutOfBandNV( format::HandleId queue, StructPointerDecoder* pQueueTypeInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkQueue in_queue = MapHandle(queue, &VulkanObjectInfoTable::GetQueueInfo); const VkOutOfBandQueueTypeInfoNV* in_pQueueTypeInfo = pQueueTypeInfo->GetPointer(); @@ -10208,6 +10885,7 @@ void VulkanReplayConsumer::Process_vkCmdSetAttachmentFeedbackLoopEnableEXT( format::HandleId commandBuffer, VkImageAspectFlags aspectMask) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetAttachmentFeedbackLoopEnableEXT(in_commandBuffer, aspectMask); @@ -10226,12 +10904,14 @@ void VulkanReplayConsumer::Process_vkCreateAccelerationStructureKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pAccelerationStructure) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); if (!pAccelerationStructure->IsNull()) { pAccelerationStructure->SetHandleLength(1); } AccelerationStructureKHRInfo handle_info; pAccelerationStructure->SetConsumerData(0, &handle_info); +ForwardIdToCaptureLayer(pAccelerationStructure->GetPointer(), VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR); VkResult replay_result = OverrideCreateAccelerationStructureKHR(GetDeviceTable(in_device->handle)->CreateAccelerationStructureKHR, returnValue, in_device, pCreateInfo, pAllocator, pAccelerationStructure); CheckResult("vkCreateAccelerationStructureKHR", returnValue, replay_result, call_info); @@ -10245,6 +10925,7 @@ void VulkanReplayConsumer::Process_vkDestroyAccelerationStructureKHR( format::HandleId accelerationStructure, StructPointerDecoder* pAllocator) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkAccelerationStructureKHR in_accelerationStructure = MapHandle(accelerationStructure, &VulkanObjectInfoTable::GetAccelerationStructureKHRInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -10260,6 +10941,7 @@ void VulkanReplayConsumer::Process_vkCmdBuildAccelerationStructuresKHR( StructPointerDecoder* pInfos, StructPointerDecoder* ppBuildRangeInfos) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkAccelerationStructureBuildGeometryInfoKHR* in_pInfos = pInfos->GetPointer(); MapStructArrayHandles(pInfos->GetMetaStructPointer(), pInfos->GetLength(), GetObjectInfoTable()); @@ -10282,6 +10964,7 @@ void VulkanReplayConsumer::Process_vkCmdBuildAccelerationStructuresIndirectKHR( PointerDecoder* pIndirectStrides, PointerDecoder* ppMaxPrimitiveCounts) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkAccelerationStructureBuildGeometryInfoKHR* in_pInfos = pInfos->GetPointer(); MapStructArrayHandles(pInfos->GetMetaStructPointer(), pInfos->GetLength(), GetObjectInfoTable()); @@ -10304,6 +10987,7 @@ void VulkanReplayConsumer::Process_vkCopyAccelerationStructureToMemoryKHR( format::HandleId deferredOperation, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeferredOperationKHR in_deferredOperation = MapHandle(deferredOperation, &VulkanObjectInfoTable::GetDeferredOperationKHRInfo); const VkCopyAccelerationStructureToMemoryInfoKHR* in_pInfo = pInfo->GetPointer(); @@ -10320,6 +11004,7 @@ void VulkanReplayConsumer::Process_vkCopyMemoryToAccelerationStructureKHR( format::HandleId deferredOperation, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeferredOperationKHR in_deferredOperation = MapHandle(deferredOperation, &VulkanObjectInfoTable::GetDeferredOperationKHRInfo); const VkCopyMemoryToAccelerationStructureInfoKHR* in_pInfo = pInfo->GetPointer(); @@ -10340,6 +11025,7 @@ void VulkanReplayConsumer::Process_vkWriteAccelerationStructuresPropertiesKHR( PointerDecoder* pData, size_t stride) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkAccelerationStructureKHR* in_pAccelerationStructures = MapHandles(pAccelerationStructures, accelerationStructureCount, &VulkanObjectInfoTable::GetAccelerationStructureKHRInfo); void* out_pData = pData->IsNull() ? nullptr : pData->AllocateOutputData(dataSize); @@ -10353,6 +11039,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyAccelerationStructureKHR( format::HandleId commandBuffer, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyAccelerationStructureInfoKHR* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -10370,6 +11057,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyAccelerationStructureToMemoryKHR( format::HandleId commandBuffer, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyAccelerationStructureToMemoryInfoKHR* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -10387,6 +11075,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyMemoryToAccelerationStructureKHR( format::HandleId commandBuffer, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyMemoryToAccelerationStructureInfoKHR* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -10405,6 +11094,7 @@ void VulkanReplayConsumer::Process_vkGetAccelerationStructureDeviceAddressKHR( format::HandleId device, StructPointerDecoder* pInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -10421,6 +11111,7 @@ void VulkanReplayConsumer::Process_vkCmdWriteAccelerationStructuresPropertiesKHR format::HandleId queryPool, uint32_t firstQuery) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkAccelerationStructureKHR* in_pAccelerationStructures = MapHandles(pAccelerationStructures, accelerationStructureCount, &VulkanObjectInfoTable::GetAccelerationStructureKHRInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -10439,6 +11130,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceAccelerationStructureCompatibility StructPointerDecoder* pVersionInfo, PointerDecoder* pCompatibility) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkAccelerationStructureVersionInfoKHR* in_pVersionInfo = pVersionInfo->GetPointer(); VkAccelerationStructureCompatibilityKHR* out_pCompatibility = pCompatibility->IsNull() ? nullptr : pCompatibility->AllocateOutputData(1, static_cast(0)); @@ -10454,6 +11146,7 @@ void VulkanReplayConsumer::Process_vkGetAccelerationStructureBuildSizesKHR( PointerDecoder* pMaxPrimitiveCounts, StructPointerDecoder* pSizeInfo) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkAccelerationStructureBuildGeometryInfoKHR* in_pBuildInfo = pBuildInfo->GetPointer(); MapStructHandles(pBuildInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -10475,6 +11168,7 @@ void VulkanReplayConsumer::Process_vkCmdTraceRaysKHR( uint32_t height, uint32_t depth) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkStridedDeviceAddressRegionKHR* in_pRaygenShaderBindingTable = pRaygenShaderBindingTable->GetPointer(); const VkStridedDeviceAddressRegionKHR* in_pMissShaderBindingTable = pMissShaderBindingTable->GetPointer(); @@ -10499,6 +11193,7 @@ void VulkanReplayConsumer::Process_vkGetRayTracingCaptureReplayShaderGroupHandle size_t dataSize, PointerDecoder* pData) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPipeline in_pipeline = MapHandle(pipeline, &VulkanObjectInfoTable::GetPipelineInfo); void* out_pData = pData->IsNull() ? nullptr : pData->AllocateOutputData(dataSize); @@ -10516,6 +11211,7 @@ void VulkanReplayConsumer::Process_vkCmdTraceRaysIndirectKHR( StructPointerDecoder* pCallableShaderBindingTable, VkDeviceAddress indirectDeviceAddress) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkStridedDeviceAddressRegionKHR* in_pRaygenShaderBindingTable = pRaygenShaderBindingTable->GetPointer(); const VkStridedDeviceAddressRegionKHR* in_pMissShaderBindingTable = pMissShaderBindingTable->GetPointer(); @@ -10538,6 +11234,7 @@ void VulkanReplayConsumer::Process_vkGetRayTracingShaderGroupStackSizeKHR( uint32_t group, VkShaderGroupShaderKHR groupShader) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPipeline in_pipeline = MapHandle(pipeline, &VulkanObjectInfoTable::GetPipelineInfo); @@ -10549,6 +11246,7 @@ void VulkanReplayConsumer::Process_vkCmdSetRayTracingPipelineStackSizeKHR( format::HandleId commandBuffer, uint32_t pipelineStackSize) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetRayTracingPipelineStackSizeKHR(in_commandBuffer, pipelineStackSize); @@ -10566,6 +11264,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawMeshTasksEXT( uint32_t groupCountY, uint32_t groupCountZ) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdDrawMeshTasksEXT(in_commandBuffer, groupCountX, groupCountY, groupCountZ); @@ -10584,6 +11283,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawMeshTasksIndirectEXT( uint32_t drawCount, uint32_t stride) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -10605,6 +11305,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawMeshTasksIndirectCountEXT( uint32_t maxDrawCount, uint32_t stride) { + GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); VkBuffer in_countBuffer = MapHandle(countBuffer, &VulkanObjectInfoTable::GetBufferInfo); diff --git a/framework/generated/generated_vulkan_replay_consumer.h b/framework/generated/generated_vulkan_replay_consumer.h index 9948d52d2b..52fb9e53cd 100644 --- a/framework/generated/generated_vulkan_replay_consumer.h +++ b/framework/generated/generated_vulkan_replay_consumer.h @@ -48,7 +48,7 @@ GFXRECON_BEGIN_NAMESPACE(decode) class VulkanReplayConsumer : public VulkanReplayConsumerBase { public: - VulkanReplayConsumer(std::shared_ptr application, const VulkanReplayOptions& options) : VulkanReplayConsumerBase(application, options) { } + VulkanReplayConsumer(std::shared_ptr application, const VulkanReplayOptions& options, const gfxrecon::format::AssetFileOffsets* offsets = nullptr) : VulkanReplayConsumerBase(application, options, offsets) { } virtual ~VulkanReplayConsumer() override { } diff --git a/framework/generated/vulkan_generators/vulkan_api_call_encoders_body_generator.py b/framework/generated/vulkan_generators/vulkan_api_call_encoders_body_generator.py index 7d006837b9..99e0c57a26 100644 --- a/framework/generated/vulkan_generators/vulkan_api_call_encoders_body_generator.py +++ b/framework/generated/vulkan_generators/vulkan_api_call_encoders_body_generator.py @@ -233,7 +233,7 @@ def make_cmd_body(self, return_type, name, values): capture_manager = 'manager' if name == "vkCreateInstance": capture_manager = 'VulkanCaptureManager::Get()' - body = '' + body = 'GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__)\n' if name != "vkCreateInstance": body += indent + 'VulkanCaptureManager* manager = VulkanCaptureManager::Get();\n' body += indent + 'GFXRECON_ASSERT(manager != nullptr);\n' @@ -702,7 +702,7 @@ def make_handle_unwrapping(self, name, values, indent): if value.is_array: expr += indent + '{} {name}_unwrapped = {}::UnwrapStructArrayHandles({name}, {}, handle_unwrap_memory);\n'.format( value.full_type, - wrapper_prefix, + wrapper_prefix, value.array_length, name=value.name ) diff --git a/framework/generated/vulkan_generators/vulkan_replay_consumer_body_generator.py b/framework/generated/vulkan_generators/vulkan_replay_consumer_body_generator.py index a53200d39e..ba48e63fc9 100644 --- a/framework/generated/vulkan_generators/vulkan_replay_consumer_body_generator.py +++ b/framework/generated/vulkan_generators/vulkan_replay_consumer_body_generator.py @@ -482,6 +482,61 @@ def make_body_expressions(self, return_type, name, values, is_override): postexpr = [ ] # Expressions to add new handles to the handle map and delete temporary allocations. +# "" : "VK_OBJECT_TYPE_UNKNOWN", + vulkan_types_to_object_types = { + "VkInstance" : "VK_OBJECT_TYPE_INSTANCE", + "VkPhysicalDevice" : "VK_OBJECT_TYPE_PHYSICAL_DEVICE", + "VkDevice" : "VK_OBJECT_TYPE_DEVICE", + "VkQueue" : "VK_OBJECT_TYPE_QUEUE", + "VkSemaphore" : "VK_OBJECT_TYPE_SEMAPHORE", + "VkCommandBuffer" : "VK_OBJECT_TYPE_COMMAND_BUFFER", + "VkFence" : "VK_OBJECT_TYPE_FENCE", + "VkDeviceMemory" : "VK_OBJECT_TYPE_DEVICE_MEMORY", + "VkBuffer" : "VK_OBJECT_TYPE_BUFFER", + "VkImage" : "VK_OBJECT_TYPE_IMAGE", + "VkEvent" : "VK_OBJECT_TYPE_EVENT", + "VkQueryPool" : "VK_OBJECT_TYPE_QUERY_POOL", + "VkBufferView" : "VK_OBJECT_TYPE_BUFFER_VIEW", + "VkImageView" : "VK_OBJECT_TYPE_IMAGE_VIEW", + "VkShaderModule" : "VK_OBJECT_TYPE_SHADER_MODULE", + "VkPipelineCache" : "VK_OBJECT_TYPE_PIPELINE_CACHE", + "VkPipelineLayout" : "VK_OBJECT_TYPE_PIPELINE_LAYOUT", + "VkRenderPass" : "VK_OBJECT_TYPE_RENDER_PASS", + "VkPipeline" : "VK_OBJECT_TYPE_PIPELINE", + "VkDescriptorSetLayout" : "VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT", + "VkSampler" : "VK_OBJECT_TYPE_SAMPLER", + "VkDescriptorPool" : "VK_OBJECT_TYPE_DESCRIPTOR_POOL", + "VkDescriptorSet" : "VK_OBJECT_TYPE_DESCRIPTOR_SET", + "VkFramebuffer" : "VK_OBJECT_TYPE_FRAMEBUFFER", + "VkCommandPool" : "VK_OBJECT_TYPE_COMMAND_POOL", + "VkSamplerYcbcrConversion" : "VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION", + "VkDescriptorUpdateTemplate" : "VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE", + "VkPrivateDataSlot" : "VK_OBJECT_TYPE_PRIVATE_DATA_SLOT", + "VkSurfaceKHR" : "VK_OBJECT_TYPE_SURFACE_KHR", + "VkSwapchainKHR" : "VK_OBJECT_TYPE_SWAPCHAIN_KHR", + "VkDisplayKHR" : "VK_OBJECT_TYPE_DISPLAY_KHR", + "VkDisplayModeKHR" : "VK_OBJECT_TYPE_DISPLAY_MODE_KHR", + "VkDebugReportCallbackEXT" : "VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT", + "VkVideoSessionKHR" : "VK_OBJECT_TYPE_VIDEO_SESSION_KHR", + "VkVideoSessionParametersKHR" : "VK_OBJECT_TYPE_VIDEO_SESSION_PARAMETERS_KHR", + "VkCuModuleNVX" : "VK_OBJECT_TYPE_CU_MODULE_NVX", + "VkCuFunctionNVX" : "VK_OBJECT_TYPE_CU_FUNCTION_NVX", + "VkDebugUtilsMessengerEXT" : "VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT", + "VkAccelerationStructureKHR" : "VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR", + "VkValidationCacheEXT" : "VK_OBJECT_TYPE_VALIDATION_CACHE_EXT", + "VkAccelerationStructureNV" : "VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV", + "VkPerformanceConfigurationINTEL" : "VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL", + "VkDeferredOperationKHR" : "VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR", + "VkIndirectCommandsLayoutNV" : "VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV", + "VkCudaModuleNV" : "VK_OBJECT_TYPE_CUDA_MODULE_NV", + "VkCudaFunctionNV" : "VK_OBJECT_TYPE_CUDA_FUNCTION_NV", + # "" : "VK_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA", + "VkMicromapEXT" : "VK_OBJECT_TYPE_MICROMAP_EXT", + "VkOpticalFlowSessionNV" : "VK_OBJECT_TYPE_OPTICAL_FLOW_SESSION_NV", + "VkShaderEXT" : "VK_OBJECT_TYPE_SHADER_EXT" + } + + preexpr.append('GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__)') for value in values: need_initialize_output_pnext_struct = '' if value.is_pointer or value.is_array: @@ -489,6 +544,8 @@ def make_body_expressions(self, return_type, name, values, is_override): is_input = self.is_input_pointer(value) is_extenal_object = False need_temp_value = True + vk_obj_type = vulkan_types_to_object_types[value.base_type] if value.base_type in vulkan_types_to_object_types else "VK_OBJECT_TYPE_UNKNOWN" + expr = '' if ( @@ -644,10 +701,11 @@ def make_body_expressions(self, return_type, name, values, is_override): if name == 'vkCreateGraphicsPipelines' or name == 'vkCreateComputePipelines' or name == 'vkCreateRayTracingPipelinesNV': preexpr.append('if (omitted_pipeline_cache_data_) {{AllowCompileDuringPipelineCreation({}, pCreateInfos->GetPointer());}}'.format(length_name)) if need_temp_value: - expr += '{}->GetHandlePointer();'.format( + expr += '{}->GetHandlePointer();\n'.format( value.name ) if self.is_pool_allocation(name): + expr += 'ForwardIdsToCaptureLayer<{basetype}Info>({paramname}->GetPointer(), {paramname}->GetLength(), {paramname}->GetHandlePointer(), {}, {});'.format(length_name, vk_obj_type, basetype=value.base_type[2:], paramname=value.name) postexpr.append( 'AddPoolHandles<{pooltype}Info, {basetype}Info>({}, handle_mapping::GetPoolId({}->GetMetaStructPointer()), {paramname}->GetPointer(), {paramname}->GetLength(), {}, {}, &VulkanObjectInfoTable::Get{pooltype}Info, &VulkanObjectInfoTable::Add{basetype}Info);' .format( @@ -657,12 +715,11 @@ def make_body_expressions(self, return_type, name, values, is_override): length_name, paramname=value.name, basetype=value.base_type[2:], - pooltype=self. - POOL_OBJECT_ASSOCIATIONS[ - value.base_type][2:] + pooltype=self.POOL_OBJECT_ASSOCIATIONS[value.base_type][2:] ) ) else: + expr += 'ForwardIdsToCaptureLayer<{basetype}Info>({paramname}->GetPointer(), {paramname}->GetLength(), {paramname}->GetHandlePointer(), {}, {});'.format(length_name, vk_obj_type, basetype=value.base_type[2:], paramname=value.name) postexpr.append( 'AddHandles<{basetype}Info>({}, {paramname}->GetPointer(), {paramname}->GetLength(), {}, {}, &VulkanObjectInfoTable::Add{basetype}Info);' .format( @@ -682,6 +739,7 @@ def make_body_expressions(self, return_type, name, values, is_override): length_name, value.name ) if self.is_pool_allocation(name): + expr += '\nForwardIdsToCaptureLayer<{basetype}Info>({paramname}->GetPointer(), {paramname}->GetLength(), {paramname}->GetHandlePointer(), {}, {});'.format(length_name, vk_obj_type, basetype=value.base_type[2:], paramname=value.name) postexpr.append( 'AddPoolHandles<{pooltype}Info, {basetype}Info>({}, handle_mapping::GetPoolId({}->GetMetaStructPointer()), {paramname}->GetPointer(), {paramname}->GetLength(), {paramname}->GetHandlePointer(), {}, std::move(handle_info), &VulkanObjectInfoTable::Get{pooltype}Info, &VulkanObjectInfoTable::Add{basetype}Info);' .format( @@ -698,6 +756,7 @@ def make_body_expressions(self, return_type, name, values, is_override): else: # additionally add an asynchronous flavour to postexpr, so both are available later if name in self.REPLAY_ASYNC_OVERRIDES: + expr += '\nForwardIdsToCaptureLayer({paramname}->GetPointer(), {paramname}->GetLength(), {});'.format(vk_obj_type, paramname=value.name) postexpr.append( 'AddHandlesAsync<{basetype}Info>({}, {paramname}->GetPointer(), {paramname}->GetLength(), std::move(handle_info), &VulkanObjectInfoTable::Add{basetype}Info, std::move(task));' .format( @@ -708,6 +767,7 @@ def make_body_expressions(self, return_type, name, values, is_override): basetype=value.base_type[2:] ) ) + preexpr.append('ForwardIdsToCaptureLayer<{basetype}Info>({paramname}->GetPointer(), {paramname}->GetLength(), {paramname}->GetHandlePointer(), {}, {});'.format(length_name, vk_obj_type, basetype=value.base_type[2:], paramname=value.name)) postexpr.append( 'AddHandles<{basetype}Info>({}, {paramname}->GetPointer(), {paramname}->GetLength(), {paramname}->GetHandlePointer(), {}, std::move(handle_info), &VulkanObjectInfoTable::Add{basetype}Info);' .format( @@ -747,6 +807,7 @@ def make_body_expressions(self, return_type, name, values, is_override): paramname=value.name ) ) + # expr += '\nForwardIdsToCaptureLayer({paramname}->GetMetaStructPointer(), {paramname}->GetLength(), {paramname}->GetOutputPointer(), {}, {});'.format(length_name, vk_obj_type, basetype=value.base_type, paramname=value.name) postexpr.append( 'AddStructArrayHandles({}, {paramname}->GetMetaStructPointer(), {paramname}->GetLength(), {}, {}, &GetObjectInfoTable());' .format( @@ -771,6 +832,7 @@ def make_body_expressions(self, return_type, name, values, is_override): paramname=value.name ) ) + # expr += '\nForwardIdsToCaptureLayer({paramname}->GetMetaStructPointer(), {paramname}->GetLength(), {paramname}->GetOutputPointer(), {}, {});'.format(length_name, vk_obj_type, basetype=value.base_type, paramname=value.name) postexpr.append( 'AddStructArrayHandles({}, {paramname}->GetMetaStructPointer(), {paramname}->GetLength(), {paramname}->GetOutputPointer(), {}, &GetObjectInfoTable());' .format( @@ -830,6 +892,7 @@ def make_body_expressions(self, return_type, name, values, is_override): expr += '{}->GetHandlePointer();'.format( value.name ) + expr += '\nForwardIdToCaptureLayer({paramname}->GetPointer(), {});'.format(vk_obj_type, paramname=value.name) postexpr.append( 'AddHandle<{basetype}Info>({}, {}->GetPointer(), {}, &VulkanObjectInfoTable::Add{basetype}Info);' .format( @@ -848,6 +911,7 @@ def make_body_expressions(self, return_type, name, values, is_override): expr = '{}->SetConsumerData(0, &handle_info);'.format( value.name ) + expr += '\nForwardIdToCaptureLayer({paramname}->GetPointer(), {});'.format(vk_obj_type, paramname=value.name) postexpr.append( 'AddHandle<{basetype}Info>({}, {paramname}->GetPointer(), {paramname}->GetHandlePointer(), std::move(handle_info), &VulkanObjectInfoTable::Add{basetype}Info);' .format( diff --git a/layer/trace_layer.cpp b/layer/trace_layer.cpp index 1364aa14c4..2ccc0455ba 100644 --- a/layer/trace_layer.cpp +++ b/layer/trace_layer.cpp @@ -21,6 +21,7 @@ ** DEALINGS IN THE SOFTWARE. */ +#include "util/logging.h" #include PROJECT_VERSION_HEADER_FILE #include "layer/trace_layer.h" diff --git a/tools/convert/main.cpp b/tools/convert/main.cpp index d6281030ea..b30f593f54 100644 --- a/tools/convert/main.cpp +++ b/tools/convert/main.cpp @@ -31,6 +31,8 @@ #include "util/file_path.h" #include "util/platform.h" +#include "decode/asset_file_consumer.h" + #include "generated/generated_vulkan_json_consumer.h" #include "decode/marker_json_consumer.h" #include "decode/metadata_json_consumer.h" @@ -174,8 +176,8 @@ int main(int argc, const char** argv) bool file_per_frame = arg_parser.IsOptionSet(kFilePerFrameOption); bool output_to_stdout = output_filename == "stdout"; - bool is_asset_file = false; - size_t last_dot_pos = input_filename.find_last_of("."); + bool is_asset_file = false; + size_t last_dot_pos = input_filename.find_last_of("."); if (last_dot_pos != std::string::npos) { if (!input_filename.compare(last_dot_pos, 5, ".gfxa")) @@ -240,72 +242,17 @@ int main(int argc, const char** argv) else { gfxrecon::util::FileNoLockOutputStream out_stream{ out_file_handle, false }; - VulkanJsonConsumer json_consumer; - gfxrecon::util::JsonOptions json_options; + gfxrecon::decode::AssetFileConsumer asset_file_consumer; gfxrecon::decode::VulkanDecoder decoder; - decoder.AddConsumer(&json_consumer); + decoder.AddConsumer(&asset_file_consumer); file_processor.AddDecoder(&decoder); - json_options.root_dir = output_dir; - json_options.data_sub_dir = filename_stem; - json_options.format = output_format; - json_options.dump_binaries = dump_binaries; - json_options.expand_flags = expand_flags; - - gfxrecon::decode::JsonWriter json_writer{ json_options, GFXRECON_PROJECT_VERSION_STRING, input_filename }; - file_processor.SetAnnotationProcessor(&json_writer); - - bool success = true; - const std::string vulkan_version{ std::to_string(VK_VERSION_MAJOR(VK_HEADER_VERSION_COMPLETE)) + "." + - std::to_string(VK_VERSION_MINOR(VK_HEADER_VERSION_COMPLETE)) + "." + - std::to_string(VK_VERSION_PATCH(VK_HEADER_VERSION_COMPLETE)) }; - json_consumer.Initialize(&json_writer, vulkan_version); - json_writer.StartStream(&out_stream); - - // If CONVERT_EXPERIMENTAL_D3D12 was set, then add DX12 consumer/decoder -#ifdef D3D12_SUPPORT - Dx12JsonConsumer dx12_json_consumer; - gfxrecon::decode::Dx12Decoder dx12_decoder; - - dx12_decoder.AddConsumer(&dx12_json_consumer); - file_processor.AddDecoder(&dx12_decoder); - auto dx12_json_flags = output_format == JsonFormat::JSON ? gfxrecon::util::kToString_Formatted - : gfxrecon::util::kToString_Unformatted; - dx12_json_consumer.Initialize(&json_writer); -#endif - + bool success = true; while (success) { success = file_processor.ProcessNextFrame(); - if (success && file_per_frame) - { - json_writer.EndStream(); - gfxrecon::util::platform::FileClose(out_file_handle); - json_filename = gfxrecon::util::filepath::InsertFilenamePostfix( - output_filename, +"_" + FormatFrameNumber(file_processor.GetCurrentFrameNumber())); - gfxrecon::util::platform::FileOpen(&out_file_handle, json_filename.c_str(), "w"); - success = out_file_handle != nullptr; - if (success) - { - out_stream.Reset(out_file_handle); - json_writer.StartStream(&out_stream); - } - else - { - GFXRECON_LOG_ERROR("Failed to create file: '%s'.", json_filename.c_str()); - ret_code = 1; - } - } - } - json_consumer.Destroy(); - // If CONVERT_EXPERIMENTAL_D3D12 was set, then cleanup DX12 consumer -#ifdef D3D12_SUPPORT - dx12_json_consumer.Destroy(); -#endif - if (!output_to_stdout) - { - gfxrecon::util::platform::FileClose(out_file_handle); } + if (file_processor.GetErrorState() != gfxrecon::decode::FileProcessor::kErrorNone) { GFXRECON_LOG_ERROR("Failed to process trace."); diff --git a/tools/replay/android_main.cpp b/tools/replay/android_main.cpp index c30abb08ca..e2888cace9 100644 --- a/tools/replay/android_main.cpp +++ b/tools/replay/android_main.cpp @@ -32,11 +32,14 @@ #include "format/format.h" #include "generated/generated_vulkan_decoder.h" #include "generated/generated_vulkan_replay_consumer.h" +#include "decode/asset_file_consumer.h" #include "util/argument_parser.h" #include "util/logging.h" #include "util/platform.h" #include "parse_dump_resources_cli.h" +#include "format/format.h" + #include #include #include @@ -100,6 +103,40 @@ void android_main(struct android_app* app) filename = positional_arguments[0]; } + gfxrecon::format::AssetFileOffsets asset_file_offsets; + const std::string reuse_asset_file = arg_parser.GetArgumentValue(kReuseAssetFileArgument); + GFXRECON_WRITE_CONSOLE("%s()", __func__) + GFXRECON_WRITE_CONSOLE(" reuse_asset_file: %s", reuse_asset_file.c_str()) + + if (!reuse_asset_file.empty()) + { + gfxrecon::decode::FileProcessor file_processor; + if (file_processor.Initialize(reuse_asset_file)) + { + gfxrecon::decode::AssetFileConsumer asset_file_consumer; + gfxrecon::decode::VulkanDecoder decoder; + + decoder.AddConsumer(&asset_file_consumer); + file_processor.AddDecoder(&decoder); + + bool success = true; + while (success) + { + success = file_processor.ProcessNextFrame(); + } + + if (file_processor.GetErrorState() != gfxrecon::decode::FileProcessor::kErrorNone) + { + GFXRECON_LOG_ERROR("Failed to process asset file %s.", reuse_asset_file.c_str()); + } + else + { + asset_file_offsets = asset_file_consumer.GetFrameAssetFileOffsets(); + const gfxrecon::format::HandleId greatest_id = asset_file_consumer.GetGreatestId(); + } + } + } + try { std::unique_ptr file_processor = @@ -129,11 +166,12 @@ void android_main(struct android_app* app) return; } - gfxrecon::decode::VulkanReplayConsumer replay_consumer(application, replay_options); - gfxrecon::decode::VulkanDecoder decoder; - uint32_t start_frame, end_frame; - bool has_mfr = GetMeasurementFrameRange(arg_parser, start_frame, end_frame); - std::string measurement_file_name; + gfxrecon::decode::VulkanReplayConsumer replay_consumer( + application, replay_options, &asset_file_offsets); + gfxrecon::decode::VulkanDecoder decoder; + uint32_t start_frame, end_frame; + bool has_mfr = GetMeasurementFrameRange(arg_parser, start_frame, end_frame); + std::string measurement_file_name; if (has_mfr) { diff --git a/tools/replay/replay_settings.h b/tools/replay/replay_settings.h index aa40615c48..6f0e6cdc35 100644 --- a/tools/replay/replay_settings.h +++ b/tools/replay/replay_settings.h @@ -43,7 +43,7 @@ const char kArguments[] = "force-windowed,--fwo|--force-windowed-origin,--batching-memory-usage,--measurement-file,--swapchain,--sgfs|--skip-" "get-fence-status,--sgfr|--" "skip-get-fence-ranges,--dump-resources,--dump-resources-scale,--dump-resources-image-format,--dump-resources-dir," - "--dump-resources-dump-color-attachment-index,--pbis,--pcj|--pipeline-creation-jobs"; + "--dump-resources-dump-color-attachment-index,--pbis,--pcj|--pipeline-creation-jobs,--reuse-asset-file"; static void PrintUsage(const char* exe_name) { diff --git a/tools/tool_settings.h b/tools/tool_settings.h index 4a4a51612e..4ed07e5520 100644 --- a/tools/tool_settings.h +++ b/tools/tool_settings.h @@ -141,6 +141,7 @@ const char kDumpResourcesDumpVertexIndexBuffers[] = "--dump-resources-dump-verte const char kDumpResourcesJsonPerCommand[] = "--dump-resources-json-output-per-command"; const char kDumpResourcesDumpImmutableResources[] = "--dump-resources-dump-immutable-resources"; const char kDumpResourcesDumpImageSubresources[] = "--dump-resources-dump-all-image-subresources"; +const char kReuseAssetFileArgument[] = "--reuse-asset-file"; enum class WsiPlatform { @@ -1095,6 +1096,9 @@ GetVulkanReplayOptions(const gfxrecon::util::ArgumentParser& arg_parse replay_options.dump_resources_color_attachment_index = std::stoi(dr_color_att_idx); } + replay_options.reuse_asset_file = arg_parser.GetArgumentValue(kReuseAssetFileArgument); + GFXRECON_WRITE_CONSOLE("%s() reuse_asset_file: %s", __func__, replay_options.reuse_asset_file.c_str()); + return replay_options; } From fe69ffbcdec64a5568e32a7db0bdf23727604af5 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Fri, 6 Sep 2024 16:27:18 +0300 Subject: [PATCH 86/99] Utilize graphics::vulkan_struct_get_pnext --- framework/encode/vulkan_state_tracker.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index 2de5c81ee7..1234eda0b0 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -938,9 +938,8 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w break; case VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV: { - VkWriteDescriptorSetAccelerationStructureNV* write_accel_struct = - graphics::GetPNextStruct( - write, VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV); + const VkWriteDescriptorSetAccelerationStructureNV* write_accel_struct = + graphics::vulkan_struct_get_pnext(write); if (write_accel_struct != nullptr) { From 89533b27e7a22c54f7f4728a16938672869b2084 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Sun, 8 Sep 2024 11:11:51 +0300 Subject: [PATCH 87/99] Fixes in the replay consumer generator --- .../generated_vulkan_replay_consumer.cpp | 15 +++++++++------ .../generated/generated_vulkan_replay_consumer.h | 2 +- framework/generated/vulkan_generators/gencode.py | 2 +- .../vulkan_replay_consumer_body_generator.py | 13 +++++++++---- tools/replay/desktop_main.cpp | 2 +- 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/framework/generated/generated_vulkan_replay_consumer.cpp b/framework/generated/generated_vulkan_replay_consumer.cpp index 7070e9530a..2e6438e002 100644 --- a/framework/generated/generated_vulkan_replay_consumer.cpp +++ b/framework/generated/generated_vulkan_replay_consumer.cpp @@ -1058,12 +1058,11 @@ void VulkanReplayConsumer::Process_vkCreateGraphicsPipelines( if (!pPipelines->IsNull()) { pPipelines->SetHandleLength(createInfoCount); } if (omitted_pipeline_cache_data_) {AllowCompileDuringPipelineCreation(createInfoCount, pCreateInfos->GetPointer());} std::vector handle_info(createInfoCount); - ForwardIdsToCaptureLayer(pPipelines->GetPointer(), pPipelines->GetLength(), pPipelines->GetHandlePointer(), createInfoCount, VK_OBJECT_TYPE_PIPELINE); for (size_t i = 0; i < createInfoCount; ++i) { pPipelines->SetConsumerData(i, &handle_info[i]); } -ForwardIdsToCaptureLayer(pPipelines->GetPointer(), pPipelines->GetLength(), VK_OBJECT_TYPE_PIPELINE); if (UseAsyncOperations()) { + ForwardIdsToCaptureLayer(pPipelines->GetPointer(), pPipelines->GetLength(), VK_OBJECT_TYPE_PIPELINE); auto task = AsyncCreateGraphicsPipelines(call_info, returnValue, in_device, in_pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); if(task) { @@ -1071,6 +1070,8 @@ ForwardIdsToCaptureLayer(pPipelines->GetPointer(), pPipelines->GetLength(), VK_O return; } } + +ForwardIdsToCaptureLayer(pPipelines->GetPointer(), pPipelines->GetLength(), pPipelines->GetHandlePointer(), createInfoCount, VK_OBJECT_TYPE_PIPELINE); VkResult replay_result = OverrideCreateGraphicsPipelines(GetDeviceTable(in_device->handle)->CreateGraphicsPipelines, returnValue, in_device, in_pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); CheckResult("vkCreateGraphicsPipelines", returnValue, replay_result, call_info); @@ -1095,12 +1096,11 @@ void VulkanReplayConsumer::Process_vkCreateComputePipelines( if (!pPipelines->IsNull()) { pPipelines->SetHandleLength(createInfoCount); } if (omitted_pipeline_cache_data_) {AllowCompileDuringPipelineCreation(createInfoCount, pCreateInfos->GetPointer());} std::vector handle_info(createInfoCount); - ForwardIdsToCaptureLayer(pPipelines->GetPointer(), pPipelines->GetLength(), pPipelines->GetHandlePointer(), createInfoCount, VK_OBJECT_TYPE_PIPELINE); for (size_t i = 0; i < createInfoCount; ++i) { pPipelines->SetConsumerData(i, &handle_info[i]); } -ForwardIdsToCaptureLayer(pPipelines->GetPointer(), pPipelines->GetLength(), VK_OBJECT_TYPE_PIPELINE); if (UseAsyncOperations()) { + ForwardIdsToCaptureLayer(pPipelines->GetPointer(), pPipelines->GetLength(), VK_OBJECT_TYPE_PIPELINE); auto task = AsyncCreateComputePipelines(call_info, returnValue, in_device, in_pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); if(task) { @@ -1108,6 +1108,8 @@ ForwardIdsToCaptureLayer(pPipelines->GetPointer(), pPipelines->GetLength(), VK_O return; } } + +ForwardIdsToCaptureLayer(pPipelines->GetPointer(), pPipelines->GetLength(), pPipelines->GetHandlePointer(), createInfoCount, VK_OBJECT_TYPE_PIPELINE); VkResult replay_result = OverrideCreateComputePipelines(GetDeviceTable(in_device->handle)->CreateComputePipelines, returnValue, in_device, in_pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); CheckResult("vkCreateComputePipelines", returnValue, replay_result, call_info); @@ -10670,12 +10672,11 @@ void VulkanReplayConsumer::Process_vkCreateShadersEXT( MapStructArrayHandles(pCreateInfos->GetMetaStructPointer(), pCreateInfos->GetLength(), GetObjectInfoTable()); if (!pShaders->IsNull()) { pShaders->SetHandleLength(createInfoCount); } std::vector handle_info(createInfoCount); - ForwardIdsToCaptureLayer(pShaders->GetPointer(), pShaders->GetLength(), pShaders->GetHandlePointer(), createInfoCount, VK_OBJECT_TYPE_SHADER_EXT); for (size_t i = 0; i < createInfoCount; ++i) { pShaders->SetConsumerData(i, &handle_info[i]); } -ForwardIdsToCaptureLayer(pShaders->GetPointer(), pShaders->GetLength(), VK_OBJECT_TYPE_SHADER_EXT); if (UseAsyncOperations()) { + ForwardIdsToCaptureLayer(pShaders->GetPointer(), pShaders->GetLength(), VK_OBJECT_TYPE_SHADER_EXT); auto task = AsyncCreateShadersEXT(call_info, returnValue, in_device, createInfoCount, pCreateInfos, pAllocator, pShaders); if(task) { @@ -10683,6 +10684,8 @@ ForwardIdsToCaptureLayer(pShaders->GetPointer(), pShaders->GetLength(), VK_OBJEC return; } } + +ForwardIdsToCaptureLayer(pShaders->GetPointer(), pShaders->GetLength(), pShaders->GetHandlePointer(), createInfoCount, VK_OBJECT_TYPE_SHADER_EXT); VkResult replay_result = OverrideCreateShadersEXT(GetDeviceTable(in_device->handle)->CreateShadersEXT, returnValue, in_device, createInfoCount, pCreateInfos, pAllocator, pShaders); CheckResult("vkCreateShadersEXT", returnValue, replay_result, call_info); diff --git a/framework/generated/generated_vulkan_replay_consumer.h b/framework/generated/generated_vulkan_replay_consumer.h index 52fb9e53cd..87c6bfb3c1 100644 --- a/framework/generated/generated_vulkan_replay_consumer.h +++ b/framework/generated/generated_vulkan_replay_consumer.h @@ -48,7 +48,7 @@ GFXRECON_BEGIN_NAMESPACE(decode) class VulkanReplayConsumer : public VulkanReplayConsumerBase { public: - VulkanReplayConsumer(std::shared_ptr application, const VulkanReplayOptions& options, const gfxrecon::format::AssetFileOffsets* offsets = nullptr) : VulkanReplayConsumerBase(application, options, offsets) { } + VulkanReplayConsumer(std::shared_ptr application, const VulkanReplayOptions& options, const gfxrecon::format::AssetFileOffsets* offsets) : VulkanReplayConsumerBase(application, options, offsets) { } virtual ~VulkanReplayConsumer() override { } diff --git a/framework/generated/vulkan_generators/gencode.py b/framework/generated/vulkan_generators/gencode.py index 27fb03e157..7937f9bba3 100644 --- a/framework/generated/vulkan_generators/gencode.py +++ b/framework/generated/vulkan_generators/gencode.py @@ -376,7 +376,7 @@ def make_gen_opts(args): base_class_header='vulkan_replay_consumer_base.h', is_override=True, constructor_args= - 'std::shared_ptr application, const VulkanReplayOptions& options', + 'std::shared_ptr application, const VulkanReplayOptions& options, const gfxrecon::format::AssetFileOffsets* offsets', filename='generated_vulkan_replay_consumer.h', directory=directory, blacklists=blacklists, diff --git a/framework/generated/vulkan_generators/vulkan_replay_consumer_body_generator.py b/framework/generated/vulkan_generators/vulkan_replay_consumer_body_generator.py index ba48e63fc9..011f8f3cb7 100644 --- a/framework/generated/vulkan_generators/vulkan_replay_consumer_body_generator.py +++ b/framework/generated/vulkan_generators/vulkan_replay_consumer_body_generator.py @@ -341,14 +341,17 @@ def make_consumer_func_body(self, return_type, name, values): if is_async: body += ' if (UseAsyncOperations())\n' body += ' {\n' + body += ' {}\n'.format(postexpr[0]) body += ' auto task = {}(call_info, returnValue, {});\n'.format(self.REPLAY_ASYNC_OVERRIDES[name], arglist) body += ' if(task)\n' body += ' {\n' - body += ' {}\n'.format(postexpr[0]) + body += ' {}\n'.format(postexpr[1]) body += ' return;\n' body += ' }\n' body += ' }\n' - postexpr = postexpr[1:] # drop async post-expression, don't repeat later + body += '\n' + body += '{}\n'.format(postexpr[2]) + postexpr = postexpr[3:] # drop async post-expression, don't repeat later body += ' VkResult replay_result = {};\n'.format(call_expr) body += ' CheckResult("{}", returnValue, replay_result, call_info);\n'.format(name) @@ -756,7 +759,7 @@ def make_body_expressions(self, return_type, name, values, is_override): else: # additionally add an asynchronous flavour to postexpr, so both are available later if name in self.REPLAY_ASYNC_OVERRIDES: - expr += '\nForwardIdsToCaptureLayer({paramname}->GetPointer(), {paramname}->GetLength(), {});'.format(vk_obj_type, paramname=value.name) + postexpr.append('ForwardIdsToCaptureLayer({paramname}->GetPointer(), {paramname}->GetLength(), {});'.format(vk_obj_type, paramname=value.name)) postexpr.append( 'AddHandlesAsync<{basetype}Info>({}, {paramname}->GetPointer(), {paramname}->GetLength(), std::move(handle_info), &VulkanObjectInfoTable::Add{basetype}Info, std::move(task));' .format( @@ -767,7 +770,9 @@ def make_body_expressions(self, return_type, name, values, is_override): basetype=value.base_type[2:] ) ) - preexpr.append('ForwardIdsToCaptureLayer<{basetype}Info>({paramname}->GetPointer(), {paramname}->GetLength(), {paramname}->GetHandlePointer(), {}, {});'.format(length_name, vk_obj_type, basetype=value.base_type[2:], paramname=value.name)) + postexpr.append('ForwardIdsToCaptureLayer<{basetype}Info>({paramname}->GetPointer(), {paramname}->GetLength(), {paramname}->GetHandlePointer(), {}, {});'.format(length_name, vk_obj_type, basetype=value.base_type[2:], paramname=value.name)) + else: + preexpr.append('ForwardIdsToCaptureLayer<{basetype}Info>({paramname}->GetPointer(), {paramname}->GetLength(), {paramname}->GetHandlePointer(), {}, {});'.format(length_name, vk_obj_type, basetype=value.base_type[2:], paramname=value.name)) postexpr.append( 'AddHandles<{basetype}Info>({}, {paramname}->GetPointer(), {paramname}->GetLength(), {paramname}->GetHandlePointer(), {}, std::move(handle_info), &VulkanObjectInfoTable::Add{basetype}Info);' .format( diff --git a/tools/replay/desktop_main.cpp b/tools/replay/desktop_main.cpp index 958382026c..7503584411 100644 --- a/tools/replay/desktop_main.cpp +++ b/tools/replay/desktop_main.cpp @@ -216,7 +216,7 @@ int main(int argc, const char** argv) preload_measurement_frame_range, measurement_file_name); - gfxrecon::decode::VulkanReplayConsumer vulkan_replay_consumer(application, vulkan_replay_options); + gfxrecon::decode::VulkanReplayConsumer vulkan_replay_consumer(application, vulkan_replay_options, nullptr); gfxrecon::decode::VulkanDecoder vulkan_decoder; if (vulkan_replay_options.enable_vulkan) From 5193a556eb2743d63d902c4c8a97cdba8c8f0344 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 9 Sep 2024 16:14:44 +0300 Subject: [PATCH 88/99] Things seem to work --- framework/decode/file_processor.cpp | 8 +- framework/decode/vulkan_decoder_base.cpp | 8 +- .../decode/vulkan_replay_consumer_base.cpp | 43 +- .../decode/vulkan_replay_consumer_base.h | 5 + framework/encode/api_capture_manager.h | 7 + framework/encode/capture_manager.cpp | 48 +- framework/encode/capture_manager.h | 16 +- framework/encode/capture_settings.cpp | 15 +- framework/encode/capture_settings.h | 2 +- framework/encode/custom_layer_func_table.h | 5 +- .../custom_vulkan_api_call_encoders.cpp | 7 + framework/encode/vulkan_capture_manager.cpp | 15 +- framework/encode/vulkan_handle_wrapper_util.h | 7 - framework/encode/vulkan_state_tracker.h | 21 +- .../vulkan_state_tracker_initializers.h | 108 +- framework/encode/vulkan_state_writer.cpp | 12 +- framework/encode/vulkan_state_writer.h | 4 +- .../generated_vulkan_api_call_encoders.cpp | 1242 ++++++++-------- .../generated_vulkan_replay_consumer.cpp | 1248 ++++++++--------- 19 files changed, 1482 insertions(+), 1339 deletions(-) diff --git a/framework/decode/file_processor.cpp b/framework/decode/file_processor.cpp index d6bfd86eba..ae859884c4 100644 --- a/framework/decode/file_processor.cpp +++ b/framework/decode/file_processor.cpp @@ -2072,13 +2072,13 @@ bool FileProcessor::ProcessFrameMarker(const format::BlockHeader& block_header, for (auto decoder : decoders_) { - if (marker_type == format::kEndMarker) + if (marker_type == format::kBeginMarker) { - decoder->DispatchFrameEndMarker(frame_number); + decoder->DispatchFrameBeginMarker(frame_number); } - else if (marker_type == format::kBeginMarker) + else if (marker_type == format::kEndMarker) { - decoder->DispatchFrameBeginMarker(frame_number); + decoder->DispatchFrameEndMarker(frame_number); } else { diff --git a/framework/decode/vulkan_decoder_base.cpp b/framework/decode/vulkan_decoder_base.cpp index 154c44e970..38f5c1d956 100644 --- a/framework/decode/vulkan_decoder_base.cpp +++ b/framework/decode/vulkan_decoder_base.cpp @@ -54,19 +54,19 @@ void VulkanDecoderBase::DispatchStateEndMarker(uint64_t frame_number) } } -void VulkanDecoderBase::DispatchFrameEndMarker(uint64_t frame_number) +void VulkanDecoderBase::DispatchFrameBeginMarker(uint64_t frame_number) { for (auto consumer : consumers_) { - consumer->ProcessFrameEndMarker(frame_number); + consumer->ProcessFrameBeginMarker(frame_number); } } -void VulkanDecoderBase::DispatchFrameBeginMarker(uint64_t frame_number) +void VulkanDecoderBase::DispatchFrameEndMarker(uint64_t frame_number) { for (auto consumer : consumers_) { - consumer->ProcessFrameBeginMarker(frame_number); + consumer->ProcessFrameEndMarker(frame_number); } } diff --git a/framework/decode/vulkan_replay_consumer_base.cpp b/framework/decode/vulkan_replay_consumer_base.cpp index bcc60de2fa..aa7bacea3d 100644 --- a/framework/decode/vulkan_replay_consumer_base.cpp +++ b/framework/decode/vulkan_replay_consumer_base.cpp @@ -300,8 +300,36 @@ void VulkanReplayConsumerBase::ProcessStateEndMarker(uint64_t frame_number) fps_info_->ProcessStateEndMarker(frame_number); } + current_frame_ = frame_number; + GFXRECON_WRITE_CONSOLE("%s() current_frame_: %" PRIu64, __func__, current_frame_) + + if (override_frame_number_fp_ != nullptr) + { + override_frame_number_fp_(current_frame_); + } +} + +void VulkanReplayConsumerBase::ProcessFrameBeginMarker(uint64_t frame_number) +{ + GFXRECON_WRITE_CONSOLE("%s() frame_number: %" PRIu64, __func__, frame_number) + current_frame_ = frame_number; + + if (override_frame_number_fp_ != nullptr) + { + override_frame_number_fp_(current_frame_); + } +} + +void VulkanReplayConsumerBase::ProcessFrameEndMarker(uint64_t frame_number) +{ + GFXRECON_WRITE_CONSOLE("%s() frame_number: %" PRIu64, __func__, frame_number) current_frame_ = frame_number + 1; GFXRECON_WRITE_CONSOLE("%s() current_frame_: %" PRIu64, __func__, current_frame_) + + if (override_frame_number_fp_ != nullptr) + { + override_frame_number_fp_(current_frame_); + } } void VulkanReplayConsumerBase::ProcessDisplayMessageCommand(const std::string& message) @@ -2587,7 +2615,7 @@ VulkanReplayConsumerBase::OverrideCreateInstance(VkResult original_result, } else { - GFXRECON_WRITE_CONSOLE("load_asset_file_offsets_fp: %p: ", override_capture_obj_id_fp_) + GFXRECON_WRITE_CONSOLE("load_asset_file_offsets_fp: %p: ", load_asset_file_offsets_fp_) } set_unique_id_offset_fp_ = reinterpret_cast( @@ -2598,7 +2626,18 @@ VulkanReplayConsumerBase::OverrideCreateInstance(VkResult original_result, } else { - GFXRECON_WRITE_CONSOLE("set_unique_id_offset_fp: %p: ", override_capture_obj_id_fp_) + GFXRECON_WRITE_CONSOLE("set_unique_id_offset_fp: %p: ", set_unique_id_offset_fp_) + } + + override_frame_number_fp_ = reinterpret_cast( + instance_table->GetInstanceProcAddr(*replay_instance, "OverrideFrameNumberGFXR")); + if (override_frame_number_fp_ == nullptr) + { + GFXRECON_LOG_WARNING("Failed to discover OverrideFrameNumberGFXR()"); + } + else + { + GFXRECON_WRITE_CONSOLE("set_unique_id_offset_fp: %p: ", override_frame_number_fp_) } if (load_asset_file_offsets_fp_ != nullptr && asset_file_offsets_ != nullptr) diff --git a/framework/decode/vulkan_replay_consumer_base.h b/framework/decode/vulkan_replay_consumer_base.h index a4af0cd39f..edb86752a3 100644 --- a/framework/decode/vulkan_replay_consumer_base.h +++ b/framework/decode/vulkan_replay_consumer_base.h @@ -101,6 +101,10 @@ class VulkanReplayConsumerBase : public VulkanConsumer virtual void ProcessStateEndMarker(uint64_t frame_number) override; + virtual void ProcessFrameBeginMarker(uint64_t frame_number) override; + + virtual void ProcessFrameEndMarker(uint64_t frame_number) override; + virtual void ProcessDisplayMessageCommand(const std::string& message) override; virtual void @@ -1580,6 +1584,7 @@ class VulkanReplayConsumerBase : public VulkanConsumer encode::OverrideCaptureObjectIdFuncPtr override_capture_obj_id_fp_ = nullptr; encode::LoadAssetFileOffsetsGFXRPtr load_asset_file_offsets_fp_ = nullptr; encode::SetUniqueIdOffsetGFXRPtr set_unique_id_offset_fp_ = nullptr; + encode::OverrideFrameNumberGFXRPtr override_frame_number_fp_ = nullptr; }; GFXRECON_END_NAMESPACE(decode) diff --git a/framework/encode/api_capture_manager.h b/framework/encode/api_capture_manager.h index ccf8b1e8a2..281813e3c0 100644 --- a/framework/encode/api_capture_manager.h +++ b/framework/encode/api_capture_manager.h @@ -173,6 +173,7 @@ class ApiCaptureManager const std::string& GetTrimKey() const { return common_manager_->GetTrimKey(); } bool IsTrimEnabled() const { return common_manager_->IsTrimEnabled(); } uint32_t GetCurrentFrame() const { return common_manager_->GetCurrentFrame(); } + uint32_t GetOverrideFrame() const { return common_manager_->GetOverrideFrame(); } CommonCaptureManager::CaptureMode GetCaptureMode() const { return common_manager_->GetCaptureMode(); } bool GetDebugLayerSetting() const { return common_manager_->GetDebugLayerSetting(); } bool GetDebugDeviceLostSetting() const { return common_manager_->GetDebugDeviceLostSetting(); } @@ -211,6 +212,12 @@ class ApiCaptureManager common_manager_->OverrideIdForNextVulkanObject(id, type); } + void OverrideFrameNumber(format::FrameNumber frame) + { + assert(common_manager_ != nullptr); + common_manager_->OverrideFrame(frame); + } + CommonCaptureManager::ThreadData* GetThreadData() { return common_manager_->GetThreadData(); } util::Compressor* GetCompressor() { return common_manager_->GetCompressor(); } std::mutex& GetMappedMemoryLock() { return common_manager_->GetMappedMemoryLock(); } diff --git a/framework/encode/capture_manager.cpp b/framework/encode/capture_manager.cpp index b1dc4ed33e..4da861c822 100644 --- a/framework/encode/capture_manager.cpp +++ b/framework/encode/capture_manager.cpp @@ -59,10 +59,6 @@ extern char** environ; GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(encode) -// One based frame count. -const uint32_t kFirstFrame = 1; -const size_t kFileStreamBufferSize = 256 * 1024; - std::mutex CommonCaptureManager::ThreadData::count_lock_; format::ThreadId CommonCaptureManager::ThreadData::thread_count_ = 0; std::unordered_map CommonCaptureManager::ThreadData::id_map_; @@ -110,7 +106,7 @@ CommonCaptureManager::CommonCaptureManager() : page_guard_track_ahb_memory_(false), page_guard_unblock_sigsegv_(false), page_guard_signal_handler_watcher_(false), page_guard_memory_mode_(kMemoryModeShadowInternal), page_guard_external_memory_(false), trim_enabled_(false), trim_boundary_(CaptureSettings::TrimBoundary::kUnknown), trim_current_range_(0), current_frame_(kFirstFrame), - queue_submit_count_(0), capture_mode_(kModeWrite), previous_hotkey_state_(false), + override_frame_(kInvalidFrame), queue_submit_count_(0), capture_mode_(kModeWrite), previous_hotkey_state_(false), previous_runtime_trigger_state_(CaptureSettings::RuntimeTriggerState::kNotUsed), debug_layer_(false), debug_device_lost_(false), screenshot_prefix_(""), screenshots_enabled_(false), disable_dxr_(false), accel_struct_padding_(0), iunknown_wrapping_(false), force_command_serialization_(false), queue_zero_only_(false), @@ -323,9 +319,11 @@ bool CommonCaptureManager::Initialize(format::ApiFamilyId api_ use_asset_file_ = trace_settings.use_asset_file; write_state_files_ = trace_settings.write_state_files; - if (trace_settings.recapture) + if (!trace_settings.reuse_asset_file.empty()) { SetUniqueIdOffset(UINT64_MAX - static_cast(5000)); + asset_file_name_ = trace_settings.reuse_asset_file; + reuse_asset_file = true; } rv_annotation_info_.gpuva_mask = trace_settings.rv_anotation_info.gpuva_mask; @@ -920,6 +918,8 @@ void CommonCaptureManager::EndFrame(format::ApiFamilyId api_family) GFXRECON_LOG_INFO("All trim ranges have been captured. Quitting."); exit(EXIT_SUCCESS); } + + WriteFrameMarker(format::MarkerType::kBeginMarker); } void CommonCaptureManager::PreQueueSubmit(format::ApiFamilyId api_family) @@ -983,26 +983,26 @@ std::string CommonCaptureManager::CreateTrimFilename(const std::string& base return util::filepath::InsertFilenamePostfix(base_filename, range_string); } -std::string CommonCaptureManager::CreateAssetFile() +void CommonCaptureManager::CreateAssetFile() { std::string asset_file_name = CreateAssetFilename(base_filename_); - if (timestamp_filename_) - { - asset_file_name = util::filepath::GenerateTimestampedFilename(asset_file_name); - } + GFXRECON_WRITE_CONSOLE("%s() asset_file_name: %s", __func__, asset_file_name.c_str()) - asset_file_stream_ = std::make_unique(asset_file_name, kFileStreamBufferSize); + asset_file_stream_ = + std::make_unique(asset_file_name, kFileStreamBufferSize, reuse_asset_file); if (asset_file_stream_->IsValid()) { - WriteFileHeader(asset_file_stream_.get()); + if (!reuse_asset_file) + { + WriteFileHeader(asset_file_stream_.get()); + } } else { + GFXRECON_LOG_ERROR("Failed creating/opening asset file %s", asset_file_name.c_str()); asset_file_stream_ = nullptr; } - - return asset_file_name; } std::string CommonCaptureManager::CreateAssetFilename(const std::string& base_filename) @@ -1027,6 +1027,11 @@ std::string CommonCaptureManager::CreateAssetFilename(const std::string& base_fi asset_file_name_ += std::string("_asset_file.gfxa"); } + if (timestamp_filename_) + { + asset_file_name_ = util::filepath::GenerateTimestampedFilename(asset_file_name_); + } + return asset_file_name_; } @@ -1835,8 +1840,17 @@ static const char* VkObjectTypeToStr(VkObjectType type) void CommonCaptureManager::OverrideIdForNextVulkanObject(format::HandleId id, VkObjectType type) { - handle_ids_override.push(std::make_pair(id, type)); - GFXRECON_WRITE_CONSOLE("[CAPTURE] %s() capture_id: %" PRIu64 " type: %s", __func__, id, VkObjectTypeToStr(type)); + if (id != format::kNullHandleId) + { + GFXRECON_WRITE_CONSOLE("[CAPTURE] %s() capture_id: %" PRIu64 " type: %s", __func__, id, VkObjectTypeToStr(type)); + handle_ids_override.push(std::make_pair(id, type)); + } +} + +void CommonCaptureManager::OverrideFrame(format::FrameNumber frame) +{ + GFXRECON_WRITE_CONSOLE("%s(frame: %" PRIu64 ")", __func__, frame) + override_frame_ = frame; } format::HandleId CommonCaptureManager::GetUniqueId(VkObjectType type) diff --git a/framework/encode/capture_manager.h b/framework/encode/capture_manager.h index a743ecdaa4..29c8f9e4e3 100644 --- a/framework/encode/capture_manager.h +++ b/framework/encode/capture_manager.h @@ -60,6 +60,11 @@ class ApiCaptureManager; class CommonCaptureManager { public: + // One based frame count. + static constexpr format::FrameNumber kInvalidFrame = 0; + static constexpr format::FrameNumber kFirstFrame = 1; + static constexpr size_t kFileStreamBufferSize = 256 * 1024; + typedef std::shared_mutex ApiCallMutexT; static format::HandleId GetUniqueId(VkObjectType type); @@ -255,7 +260,8 @@ class CommonCaptureManager PageGuardMemoryMode GetPageGuardMemoryMode() const { return page_guard_memory_mode_; } const std::string& GetTrimKey() const { return trim_key_; } bool IsTrimEnabled() const { return trim_enabled_; } - uint32_t GetCurrentFrame() const { return current_frame_; } + format::FrameNumber GetCurrentFrame() const { return current_frame_; } + format::FrameNumber GetOverrideFrame() const { return override_frame_; } CaptureMode GetCaptureMode() const { return capture_mode_; } bool GetDebugLayerSetting() const { return debug_layer_; } bool GetDebugDeviceLostSetting() const { return debug_device_lost_; } @@ -269,7 +275,7 @@ class CommonCaptureManager util::ScreenshotFormat GetScreenShotFormat() const { return screenshot_format_; } std::string CreateTrimFilename(const std::string& base_filename, const util::UintRange& trim_range); - std::string CreateAssetFile(); + void CreateAssetFile(); std::string CreateAssetFilename(const std::string& base_filename); std::string CreateFrameStateFilename(const std::string& base_filename) const; bool CreateCaptureFile(format::ApiFamilyId api_family, const std::string& base_filename); @@ -334,6 +340,8 @@ class CommonCaptureManager void OverrideIdForNextVulkanObject(format::HandleId id, VkObjectType type); + void OverrideFrame(format::FrameNumber frame); + private: void WriteExecuteFromFile(util::FileOutputStream& out_stream, const std::string& filename, @@ -399,7 +407,8 @@ class CommonCaptureManager uint32_t trim_key_frames_; uint32_t trim_key_first_frame_; size_t trim_current_range_; - uint32_t current_frame_; + format::FrameNumber current_frame_; + format::FrameNumber override_frame_; uint32_t queue_submit_count_; CaptureMode capture_mode_; bool previous_hotkey_state_; @@ -420,6 +429,7 @@ class CommonCaptureManager bool previous_write_assets_; bool write_state_files_; std::string asset_file_name_; + bool reuse_asset_file{ false }; struct { diff --git a/framework/encode/capture_settings.cpp b/framework/encode/capture_settings.cpp index f0dbc9afd3..fdbdcfb202 100644 --- a/framework/encode/capture_settings.cpp +++ b/framework/encode/capture_settings.cpp @@ -102,8 +102,8 @@ GFXRECON_BEGIN_NAMESPACE(encode) #define CAPTURE_USE_ASSET_FILE_UPPER "CAPTURE_USE_ASSET_FILE" #define CAPTURE_WRITE_STATE_FILES_LOWER "capture_write_state_files" #define CAPTURE_WRITE_STATE_FILES_UPPER "CAPTURE_WRITE_STATE_FILES" -#define CAPTURE_RECAPTURE_LOWER "capture_recapture" -#define CAPTURE_RECAPTURE_UPPER "CAPTURE_RECAPTURE" +#define CAPTURE_REUSE_ASSET_FILE_LOWER "capture_reuse_asset_file" +#define CAPTURE_REUSE_ASSET_FILE_UPPER "CAPTURE_REUSE_ASSET_FILE" #define PAGE_GUARD_COPY_ON_MAP_LOWER "page_guard_copy_on_map" #define PAGE_GUARD_COPY_ON_MAP_UPPER "PAGE_GUARD_COPY_ON_MAP" #define PAGE_GUARD_SEPARATE_READ_LOWER "page_guard_separate_read" @@ -178,7 +178,7 @@ const char kCaptureIUnknownWrappingEnvVar[] = GFXRECON_ENV_VAR_ const char kCaptureQueueSubmitsEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_QUEUE_SUBMITS_LOWER; const char kCaptureUseAssetFileEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_USE_ASSET_FILE_LOWER; const char kCaptureWriteStateFilesEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_WRITE_STATE_FILES_LOWER; -const char kCaptureRecaptureEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_RECAPTURE_LOWER; +const char kCaptureRecaptureEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_REUSE_ASSET_FILE_LOWER; const char kPageGuardCopyOnMapEnvVar[] = GFXRECON_ENV_VAR_PREFIX PAGE_GUARD_COPY_ON_MAP_LOWER; const char kPageGuardSeparateReadEnvVar[] = GFXRECON_ENV_VAR_PREFIX PAGE_GUARD_SEPARATE_READ_LOWER; const char kPageGuardPersistentMemoryEnvVar[] = GFXRECON_ENV_VAR_PREFIX PAGE_GUARD_PERSISTENT_MEMORY_LOWER; @@ -214,7 +214,7 @@ const char kCaptureFileNameEnvVar[] = GFXRECON_ENV_VAR_ const char kCaptureFileUseTimestampEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_FILE_USE_TIMESTAMP_UPPER; const char kCaptureUseAssetFileEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_USE_ASSET_FILE_UPPER; const char kCaptureWriteStateFilesEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_WRITE_STATE_FILES_UPPER; -const char kCaptureRecaptureEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_RECAPTURE_UPPER; +const char kCaptureRecaptureEnvVar[] = GFXRECON_ENV_VAR_PREFIX CAPTURE_REUSE_ASSET_FILE_UPPER; const char kLogAllowIndentsEnvVar[] = GFXRECON_ENV_VAR_PREFIX LOG_ALLOW_INDENTS_UPPER; const char kLogBreakOnErrorEnvVar[] = GFXRECON_ENV_VAR_PREFIX LOG_BREAK_ON_ERROR_UPPER; const char kLogDetailedEnvVar[] = GFXRECON_ENV_VAR_PREFIX LOG_DETAILED_UPPER; @@ -289,7 +289,7 @@ const std::string kOptionKeyCaptureIUnknownWrapping = std::stri const std::string kOptionKeyCaptureQueueSubmits = std::string(kSettingsFilter) + std::string(CAPTURE_QUEUE_SUBMITS_LOWER); const std::string kOptionKeyCaptureUseAssetFile = std::string(kSettingsFilter) + std::string(CAPTURE_USE_ASSET_FILE_LOWER); const std::string kOptionKeyCaptureWriteStateFiles = std::string(kSettingsFilter) + std::string(CAPTURE_WRITE_STATE_FILES_LOWER); -const std::string kOptionKeyCaptureRecapture = std::string(kSettingsFilter) + std::string(CAPTURE_RECAPTURE_LOWER); +const std::string kOptionKeyCaptureRecapture = std::string(kSettingsFilter) + std::string(CAPTURE_REUSE_ASSET_FILE_LOWER); const std::string kOptionKeyPageGuardCopyOnMap = std::string(kSettingsFilter) + std::string(PAGE_GUARD_COPY_ON_MAP_LOWER); const std::string kOptionKeyPageGuardSeparateRead = std::string(kSettingsFilter) + std::string(PAGE_GUARD_SEPARATE_READ_LOWER); const std::string kOptionKeyPageGuardPersistentMemory = std::string(kSettingsFilter) + std::string(PAGE_GUARD_PERSISTENT_MEMORY_LOWER); @@ -584,13 +584,12 @@ void CaptureSettings::ProcessOptions(OptionsMap* options, CaptureSettings* setti settings->trace_settings_.write_state_files = ParseBoolString(FindOption(options, kOptionKeyCaptureWriteStateFiles), settings->trace_settings_.write_state_files); - settings->trace_settings_.recapture = - ParseBoolString(FindOption(options, kOptionKeyCaptureRecapture), settings->trace_settings_.recapture); + settings->trace_settings_.reuse_asset_file = FindOption(options, kOptionKeyCaptureRecapture); GFXRECON_WRITE_CONSOLE("%s()", __func__) GFXRECON_WRITE_CONSOLE(" use_asset_file: %u", settings->trace_settings_.use_asset_file); GFXRECON_WRITE_CONSOLE(" write_state_files: %u", settings->trace_settings_.write_state_files); - GFXRECON_WRITE_CONSOLE(" recapture: %u", settings->trace_settings_.recapture); + GFXRECON_WRITE_CONSOLE(" reuse_asset_file: %s", settings->trace_settings_.reuse_asset_file.c_str()); // Page guard environment variables settings->trace_settings_.page_guard_copy_on_map = ParseBoolString( diff --git a/framework/encode/capture_settings.h b/framework/encode/capture_settings.h index a12f02af7c..12f5a67af8 100644 --- a/framework/encode/capture_settings.h +++ b/framework/encode/capture_settings.h @@ -121,7 +121,7 @@ class CaptureSettings bool quit_after_frame_ranges{ false }; bool use_asset_file{ false }; bool write_state_files{ false }; - bool recapture{ false }; + std::string reuse_asset_file; // An optimization for the page_guard memory tracking mode that eliminates the need for shadow memory by // overriding vkAllocateMemory so that all host visible allocations use the external memory extension with a diff --git a/framework/encode/custom_layer_func_table.h b/framework/encode/custom_layer_func_table.h index a11c6c849b..157c248b0d 100644 --- a/framework/encode/custom_layer_func_table.h +++ b/framework/encode/custom_layer_func_table.h @@ -24,8 +24,8 @@ #ifndef GFXRECON_LAYER_CUSTOM_FUNC_TABLE_H #define GFXRECON_LAYER_CUSTOM_FUNC_TABLE_H +#include "encode/custom_exported_layer_funcs.h" #include "util/defines.h" -#include "custom_vulkan_api_call_encoders.h" #include @@ -36,7 +36,8 @@ const std::unordered_map custom_func_table = { { "DumpAssetsGFXR", reinterpret_cast(encode::DumpAssetsGFXR) }, { "SetUniqueIdOffsetGFXR", reinterpret_cast(encode::SetUniqueIdOffsetGFXR) }, { "LoadAssetFileOffsetsGFXR", reinterpret_cast(encode::LoadAssetFileOffsetsGFXR) }, - { "OverrideIdForNextVulkanObjectGFXR", reinterpret_cast(encode::OverrideIdForNextVulkanObjectGFXR) } + { "OverrideIdForNextVulkanObjectGFXR", reinterpret_cast(encode::OverrideIdForNextVulkanObjectGFXR) }, + { "OverrideFrameNumberGFXR", reinterpret_cast(encode::OverrideFrameNumberGFXR) }, }; GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/custom_vulkan_api_call_encoders.cpp b/framework/encode/custom_vulkan_api_call_encoders.cpp index 7062dde207..c7de299dc8 100644 --- a/framework/encode/custom_vulkan_api_call_encoders.cpp +++ b/framework/encode/custom_vulkan_api_call_encoders.cpp @@ -33,6 +33,7 @@ #include "encode/vulkan_capture_manager.h" #include "encode/vulkan_handle_wrapper_util.h" #include "format/api_call_id.h" +#include "format/format.h" #include "generated/generated_vulkan_struct_encoders.h" #include "generated/generated_vulkan_struct_handle_wrappers.h" #include "util/defines.h" @@ -428,6 +429,12 @@ VKAPI_ATTR void VKAPI_CALL OverrideIdForNextVulkanObjectGFXR(format::HandleId id manager->OverrideIdForNextVulkanObject(id, type); } +VKAPI_ATTR void VKAPI_CALL OverrideFrameNumberGFXR(format::FrameNumber frame) +{ + VulkanCaptureManager* manager = VulkanCaptureManager::Get(); + manager->OverrideFrameNumber(frame); +} + VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, diff --git a/framework/encode/vulkan_capture_manager.cpp b/framework/encode/vulkan_capture_manager.cpp index 042b3baf83..b1fa4c5c0a 100644 --- a/framework/encode/vulkan_capture_manager.cpp +++ b/framework/encode/vulkan_capture_manager.cpp @@ -23,6 +23,7 @@ */ #include "encode/vulkan_handle_wrappers.h" +#include "format/format.h" #include "vulkan/vulkan_core.h" #include #include PROJECT_VERSION_HEADER_FILE @@ -30,6 +31,7 @@ #include "encode/struct_pointer_encoder.h" #include "encode/vulkan_capture_manager.h" +#include "encode/capture_manager.h" #include "encode/vulkan_handle_wrapper_util.h" #include "encode/vulkan_state_writer.h" #include "format/format_util.h" @@ -104,15 +106,22 @@ void VulkanCaptureManager::WriteTrackedState(util::FileOutputStream* file_stream format::ThreadId thread_id, util::FileOutputStream* asset_file_stream) { - uint64_t n_blocks = - state_tracker_->WriteState(file_stream, thread_id, asset_file_stream, GetCompressor(), GetCurrentFrame()); + assert(state_tracker_ != nullptr); + + format::FrameNumber frame = + GetOverrideFrame() != CommonCaptureManager::kInvalidFrame ? GetOverrideFrame() : GetCurrentFrame(); + + uint64_t n_blocks = state_tracker_->WriteState(file_stream, thread_id, asset_file_stream, GetCompressor(), frame); common_manager_->IncrementBlockIndex(n_blocks); } void VulkanCaptureManager::WriteAssets(util::FileOutputStream* asset_file_stream, format::ThreadId thread_id) { assert(state_tracker_ != nullptr); - uint64_t n_blocks = state_tracker_->WriteAssets(asset_file_stream, thread_id, GetCompressor(), GetCurrentFrame()); + format::FrameNumber frame = + GetOverrideFrame() != CommonCaptureManager::kInvalidFrame ? GetOverrideFrame() : GetCurrentFrame(); + + uint64_t n_blocks = state_tracker_->WriteAssets(asset_file_stream, thread_id, GetCompressor(), frame); common_manager_->IncrementBlockIndex(n_blocks); } diff --git a/framework/encode/vulkan_handle_wrapper_util.h b/framework/encode/vulkan_handle_wrapper_util.h index 40d40a2042..f68978d728 100644 --- a/framework/encode/vulkan_handle_wrapper_util.h +++ b/framework/encode/vulkan_handle_wrapper_util.h @@ -212,10 +212,6 @@ void CreateWrappedDispatchHandle(typename ParentWrapper::HandleType parent, template void CreateWrappedNonDispatchHandle(typename Wrapper::HandleType* handle, PFN_GetHandleId get_id) { - GFXRECON_WRITE_CONSOLE("%s()", __func__) - GFXRECON_WRITE_CONSOLE(" handle: %p", handle) - GFXRECON_WRITE_CONSOLE(" *handle: %p", *handle) - ScopedDestroyLock shared_scoped_lock(false); assert(handle != nullptr); if ((*handle) != VK_NULL_HANDLE) @@ -333,9 +329,6 @@ inline void CreateWrappedHandle( } } - GFXRECON_WRITE_CONSOLE("%s()", __func__) - GFXRECON_WRITE_CONSOLE(" wrapper: %p", wrapper) - if (wrapper == nullptr) { CreateWrappedDispatchHandle(parent, handle, get_id); diff --git a/framework/encode/vulkan_state_tracker.h b/framework/encode/vulkan_state_tracker.h index d341242579..7a20a6b76f 100644 --- a/framework/encode/vulkan_state_tracker.h +++ b/framework/encode/vulkan_state_tracker.h @@ -112,7 +112,8 @@ class VulkanStateTracker create_info, create_call_id, std::make_shared(create_parameter_buffer->GetData(), - create_parameter_buffer->GetDataSize())); + create_parameter_buffer->GetDataSize()), + &asset_file_offsets_); } } } @@ -142,7 +143,7 @@ class VulkanStateTracker if (state_table_.InsertWrapper(wrapper->handle_id, wrapper)) { vulkan_state_tracker::InitializePoolObjectState( - parent_handle, wrapper, i, alloc_info, create_call_id, create_parameters); + parent_handle, wrapper, i, alloc_info, create_call_id, create_parameters, &asset_file_offsets_); } } } @@ -686,7 +687,7 @@ class VulkanStateTracker void TrackBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo); - void LoadAssetFileOffsets(const format::AssetFileOffsets& offsets); + void LoadAssetFileOffsets(const format::AssetFileOffsets& offsets) { asset_file_offsets_ = offsets; } private: template @@ -785,14 +786,16 @@ class VulkanStateTracker if (!asset_file_offsets_.empty()) { auto entry = asset_file_offsets_.find(frame_number); - if (entry != asset_file_offsets_.end()) + if (entry == asset_file_offsets_.end()) { - GFXRECON_LOG_ERROR("Dublicate asset file entries for frame %" PRIu64 "?", frame_number); + // Copy all entries from previous frame + auto last_frame_entry = asset_file_offsets_.rbegin(); + asset_file_offsets_[frame_number] = last_frame_entry->second; + } + else + { + GFXRECON_LOG_INFO("Dublicate asset file entries for frame %" PRIu64, frame_number); } - - // Copy all entries from previous frame - auto last_frame_entry = asset_file_offsets_.rbegin(); - asset_file_offsets_[frame_number] = last_frame_entry->second; } } diff --git a/framework/encode/vulkan_state_tracker_initializers.h b/framework/encode/vulkan_state_tracker_initializers.h index dd050fd44e..4eca94e582 100644 --- a/framework/encode/vulkan_state_tracker_initializers.h +++ b/framework/encode/vulkan_state_tracker_initializers.h @@ -69,7 +69,8 @@ void InitializeState(ParentHandle parent_handle, Wrapper* wrapper, const CreateInfo* create_info, format::ApiCallId create_call_id, - vulkan_state_info::CreateParameters create_parameters) + vulkan_state_info::CreateParameters create_parameters, + format::AssetFileOffsets* asset_file_offsets = nullptr) { assert(wrapper != nullptr); assert(create_parameters != nullptr); @@ -87,7 +88,8 @@ void InitializeGroupObjectState(ParentHandle parent_handl Wrapper* wrapper, const CreateInfo* create_info, format::ApiCallId create_call_id, - vulkan_state_info::CreateParameters create_parameters) + vulkan_state_info::CreateParameters create_parameters, + format::AssetFileOffsets* asset_file_offsets = nullptr) { // The secondary handle is only used by sepcializations. GFXRECON_UNREFERENCED_PARAMETER(secondary_handle); @@ -101,7 +103,8 @@ inline void InitializeStatepStages != nullptr)); @@ -532,7 +548,8 @@ InitializeGroupObjectStatepStages != nullptr)); @@ -576,7 +593,8 @@ inline void InitializeStatequeue_family_index = create_info->pQueueFamilyIndices[0]; } + + if (asset_file_offsets != nullptr && !asset_file_offsets->empty()) + { + auto last_frame_entry = asset_file_offsets->rbegin(); + if (last_frame_entry->second.find(wrapper->handle_id) != last_frame_entry->second.end()) + { + wrapper->dirty = false; + } + } } // Images created with vkCreateImage. @@ -624,7 +652,8 @@ inline void InitializeStatehandle != VK_NULL_HANDLE); device_table->GetImageMemoryRequirements(parent_handle, wrapper->handle, &image_mem_reqs); wrapper->size = image_mem_reqs.size; + + if (asset_file_offsets != nullptr && !asset_file_offsets->empty()) + { + auto last_frame_entry = asset_file_offsets->rbegin(); + if (last_frame_entry->second.find(wrapper->handle_id) != last_frame_entry->second.end()) + { + wrapper->dirty = false; + } + } } template <> @@ -662,7 +700,8 @@ inline void InitializeStateset_layout_dependency.handle_id = layout_wrapper->handle_id; wrapper->set_layout_dependency.create_call_id = layout_wrapper->create_call_id; wrapper->set_layout_dependency.create_parameters = layout_wrapper->create_parameters; + + if (asset_file_offsets != nullptr && !asset_file_offsets->empty()) + { + auto last_frame_entry = asset_file_offsets->rbegin(); + if (last_frame_entry->second.find(wrapper->handle_id) != last_frame_entry->second.end()) + { + wrapper->dirty = false; + } + } } GFXRECON_END_NAMESPACE(vulkan_state_tracker) diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index c6216e1ca1..857eb7ed1f 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -29,6 +29,7 @@ #include "format/format.h" #include "format/format_util.h" #include "util/logging.h" +#include "vulkan/vulkan_core.h" #include #include @@ -83,11 +84,11 @@ static bool IsImageReadable(VkMemoryPropertyFlags property (memory_wrapper->mapped_size == VK_WHOLE_SIZE))))); } -VulkanStateWriter::VulkanStateWriter(util::FileOutputStream* output_stream, - util::Compressor* compressor, - format::ThreadId thread_id, - util::FileOutputStream* asset_file_stream, - std::unordered_map* asset_file_offsets) : +VulkanStateWriter::VulkanStateWriter(util::FileOutputStream* output_stream, + util::Compressor* compressor, + format::ThreadId thread_id, + util::FileOutputStream* asset_file_stream, + format::FrameAssetFileOffsets* asset_file_offsets) : output_stream_(output_stream), compressor_(compressor), thread_id_(thread_id), encoder_(¶meter_stream_), asset_file_stream_(asset_file_stream), asset_file_offsets_(asset_file_offsets) @@ -994,6 +995,7 @@ void VulkanStateWriter::WriteDescriptorSetState(const VulkanStateTable& state_ta void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTable& state_table) { assert(asset_file_stream_ != nullptr); + assert(asset_file_offsets_ != nullptr); std::set processed; diff --git a/framework/encode/vulkan_state_writer.h b/framework/encode/vulkan_state_writer.h index a821378cf6..fe0df8f0ca 100644 --- a/framework/encode/vulkan_state_writer.h +++ b/framework/encode/vulkan_state_writer.h @@ -380,8 +380,8 @@ class VulkanStateWriter ParameterEncoder encoder_; uint64_t blocks_written_; - util::FileOutputStream* asset_file_stream_; - std::unordered_map* asset_file_offsets_; + util::FileOutputStream* asset_file_stream_; + format::FrameAssetFileOffsets* asset_file_offsets_; }; GFXRECON_END_NAMESPACE(encode) diff --git a/framework/generated/generated_vulkan_api_call_encoders.cpp b/framework/generated/generated_vulkan_api_call_encoders.cpp index 40b8d37130..f82e3a64fa 100644 --- a/framework/generated/generated_vulkan_api_call_encoders.cpp +++ b/framework/generated/generated_vulkan_api_call_encoders.cpp @@ -58,7 +58,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateInstance( const VkAllocationCallbacks* pAllocator, VkInstance* pInstance) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) auto api_call_lock = VulkanCaptureManager::AcquireExclusiveApiCallLock(); bool omit_output_data = false; @@ -90,7 +90,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyInstance( VkInstance instance, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -128,7 +128,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -177,7 +177,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -212,7 +212,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFormatProperties( VkFormat format, VkFormatProperties* pFormatProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -252,7 +252,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceImageFormatProperties( VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -300,7 +300,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -335,7 +335,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties* pQueueFamilyProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -370,7 +370,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMemoryProperties( VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -406,7 +406,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice( const VkAllocationCallbacks* pAllocator, VkDevice* pDevice) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -451,7 +451,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDevice( VkDevice device, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -490,7 +490,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceQueue( uint32_t queueIndex, VkQueue* pQueue) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -530,7 +530,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit( const VkSubmitInfo* pSubmits, VkFence fence) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -571,7 +571,7 @@ GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VKAPI_ATTR VkResult VKAPI_CALL QueueWaitIdle( VkQueue queue) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -606,7 +606,7 @@ GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VKAPI_ATTR VkResult VKAPI_CALL DeviceWaitIdle( VkDevice device) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -644,7 +644,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateMemory( const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -690,7 +690,7 @@ VKAPI_ATTR void VKAPI_CALL FreeMemory( VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -732,7 +732,7 @@ VKAPI_ATTR VkResult VKAPI_CALL MapMemory( VkMemoryMapFlags flags, void** ppData) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -779,7 +779,7 @@ VKAPI_ATTR void VKAPI_CALL UnmapMemory( VkDevice device, VkDeviceMemory memory) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -814,7 +814,7 @@ VKAPI_ATTR VkResult VKAPI_CALL FlushMappedMemoryRanges( uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -856,7 +856,7 @@ VKAPI_ATTR VkResult VKAPI_CALL InvalidateMappedMemoryRanges( uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -898,7 +898,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceMemoryCommitment( VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -935,7 +935,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory( VkDeviceMemory memory, VkDeviceSize memoryOffset) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -976,7 +976,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory( VkDeviceMemory memory, VkDeviceSize memoryOffset) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1016,7 +1016,7 @@ VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements( VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1052,7 +1052,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements( VkImage image, VkMemoryRequirements* pMemoryRequirements) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1089,7 +1089,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements( uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1131,7 +1131,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties( uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1173,7 +1173,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueBindSparse( const VkBindSparseInfo* pBindInfo, VkFence fence) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1217,7 +1217,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateFence( const VkAllocationCallbacks* pAllocator, VkFence* pFence) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1268,7 +1268,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyFence( VkFence fence, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1307,7 +1307,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetFences( uint32_t fenceCount, const VkFence* pFences) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1345,7 +1345,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetFenceStatus( VkDevice device, VkFence fence) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1385,7 +1385,7 @@ VKAPI_ATTR VkResult VKAPI_CALL WaitForFences( VkBool32 waitAll, uint64_t timeout) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1427,7 +1427,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSemaphore( const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1478,7 +1478,7 @@ VKAPI_ATTR void VKAPI_CALL DestroySemaphore( VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1518,7 +1518,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateEvent( const VkAllocationCallbacks* pAllocator, VkEvent* pEvent) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1569,7 +1569,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyEvent( VkEvent event, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1607,7 +1607,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetEventStatus( VkDevice device, VkEvent event) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1644,7 +1644,7 @@ VKAPI_ATTR VkResult VKAPI_CALL SetEvent( VkDevice device, VkEvent event) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1681,7 +1681,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetEvent( VkDevice device, VkEvent event) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1720,7 +1720,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateQueryPool( const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1771,7 +1771,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyQueryPool( VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1815,7 +1815,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetQueryPoolResults( VkDeviceSize stride, VkQueryResultFlags flags) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1866,7 +1866,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateBuffer( const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1912,7 +1912,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyBuffer( VkBuffer buffer, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -1952,7 +1952,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateBufferView( const VkAllocationCallbacks* pAllocator, VkBufferView* pView) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2006,7 +2006,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyBufferView( VkBufferView bufferView, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2046,7 +2046,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateImage( const VkAllocationCallbacks* pAllocator, VkImage* pImage) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2092,7 +2092,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyImage( VkImage image, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2132,7 +2132,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout( const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2170,7 +2170,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateImageView( const VkAllocationCallbacks* pAllocator, VkImageView* pView) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2224,7 +2224,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyImageView( VkImageView imageView, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2264,7 +2264,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateShaderModule( const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2318,7 +2318,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyShaderModule( VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2358,7 +2358,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineCache( const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2409,7 +2409,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyPipelineCache( VkPipelineCache pipelineCache, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2449,7 +2449,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPipelineCacheData( size_t* pDataSize, void* pData) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2496,7 +2496,7 @@ VKAPI_ATTR VkResult VKAPI_CALL MergePipelineCaches( uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2536,7 +2536,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyPipeline( VkPipeline pipeline, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2576,7 +2576,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineLayout( const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2630,7 +2630,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyPipelineLayout( VkPipelineLayout pipelineLayout, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2670,7 +2670,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSampler( const VkAllocationCallbacks* pAllocator, VkSampler* pSampler) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2724,7 +2724,7 @@ VKAPI_ATTR void VKAPI_CALL DestroySampler( VkSampler sampler, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2764,7 +2764,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorSetLayout( const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2818,7 +2818,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDescriptorSetLayout( VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2858,7 +2858,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorPool( const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2909,7 +2909,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDescriptorPool( VkDescriptorPool descriptorPool, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2948,7 +2948,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetDescriptorPool( VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -2988,7 +2988,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateDescriptorSets( const VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3042,7 +3042,7 @@ VKAPI_ATTR VkResult VKAPI_CALL FreeDescriptorSets( uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3087,7 +3087,7 @@ VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSets( uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3130,7 +3130,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateFramebuffer( const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3184,7 +3184,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyFramebuffer( VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3224,7 +3224,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass( const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3275,7 +3275,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyRenderPass( VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3314,7 +3314,7 @@ VKAPI_ATTR void VKAPI_CALL GetRenderAreaGranularity( VkRenderPass renderPass, VkExtent2D* pGranularity) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3351,7 +3351,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateCommandPool( const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3402,7 +3402,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyCommandPool( VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3441,7 +3441,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetCommandPool( VkCommandPool commandPool, VkCommandPoolResetFlags flags) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3480,7 +3480,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateCommandBuffers( const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3534,7 +3534,7 @@ VKAPI_ATTR void VKAPI_CALL FreeCommandBuffers( uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3573,7 +3573,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer( VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3612,7 +3612,7 @@ GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VKAPI_ATTR VkResult VKAPI_CALL EndCommandBuffer( VkCommandBuffer commandBuffer) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3648,7 +3648,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetCommandBuffer( VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3686,7 +3686,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindPipeline( VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3723,7 +3723,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewport( uint32_t viewportCount, const VkViewport* pViewports) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3761,7 +3761,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetScissor( uint32_t scissorCount, const VkRect2D* pScissors) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3797,7 +3797,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLineWidth( VkCommandBuffer commandBuffer, float lineWidth) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3833,7 +3833,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBias( float depthBiasClamp, float depthBiasSlopeFactor) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3869,7 +3869,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetBlendConstants( VkCommandBuffer commandBuffer, const float blendConstants[4]) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3904,7 +3904,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBounds( float minDepthBounds, float maxDepthBounds) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3940,7 +3940,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilCompareMask( VkStencilFaceFlags faceMask, uint32_t compareMask) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -3976,7 +3976,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilWriteMask( VkStencilFaceFlags faceMask, uint32_t writeMask) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4012,7 +4012,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilReference( VkStencilFaceFlags faceMask, uint32_t reference) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4053,7 +4053,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorSets( uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4095,7 +4095,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindIndexBuffer( VkDeviceSize offset, VkIndexType indexType) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4134,7 +4134,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers( const VkBuffer* pBuffers, const VkDeviceSize* pOffsets) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4174,7 +4174,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDraw( uint32_t firstVertex, uint32_t firstInstance) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4215,7 +4215,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexed( int32_t vertexOffset, uint32_t firstInstance) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4256,7 +4256,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndirect( uint32_t drawCount, uint32_t stride) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4296,7 +4296,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirect( uint32_t drawCount, uint32_t stride) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4335,7 +4335,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDispatch( uint32_t groupCountY, uint32_t groupCountZ) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4372,7 +4372,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDispatchIndirect( VkBuffer buffer, VkDeviceSize offset) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4410,7 +4410,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer( uint32_t regionCount, const VkBufferCopy* pRegions) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4452,7 +4452,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImage( uint32_t regionCount, const VkImageCopy* pRegions) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4497,7 +4497,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBlitImage( const VkImageBlit* pRegions, VkFilter filter) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4541,7 +4541,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage( uint32_t regionCount, const VkBufferImageCopy* pRegions) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4583,7 +4583,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer( uint32_t regionCount, const VkBufferImageCopy* pRegions) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4624,7 +4624,7 @@ VKAPI_ATTR void VKAPI_CALL CmdUpdateBuffer( VkDeviceSize dataSize, const void* pData) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4664,7 +4664,7 @@ VKAPI_ATTR void VKAPI_CALL CmdFillBuffer( VkDeviceSize size, uint32_t data) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4705,7 +4705,7 @@ VKAPI_ATTR void VKAPI_CALL CmdClearColorImage( uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4747,7 +4747,7 @@ VKAPI_ATTR void VKAPI_CALL CmdClearDepthStencilImage( uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4788,7 +4788,7 @@ VKAPI_ATTR void VKAPI_CALL CmdClearAttachments( uint32_t rectCount, const VkClearRect* pRects) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4830,7 +4830,7 @@ VKAPI_ATTR void VKAPI_CALL CmdResolveImage( uint32_t regionCount, const VkImageResolve* pRegions) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4870,7 +4870,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetEvent( VkEvent event, VkPipelineStageFlags stageMask) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4906,7 +4906,7 @@ VKAPI_ATTR void VKAPI_CALL CmdResetEvent( VkEvent event, VkPipelineStageFlags stageMask) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -4950,7 +4950,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWaitEvents( uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5005,7 +5005,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier( uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5053,7 +5053,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginQuery( uint32_t query, VkQueryControlFlags flags) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5090,7 +5090,7 @@ VKAPI_ATTR void VKAPI_CALL CmdEndQuery( VkQueryPool queryPool, uint32_t query) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5127,7 +5127,7 @@ VKAPI_ATTR void VKAPI_CALL CmdResetQueryPool( uint32_t firstQuery, uint32_t queryCount) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5165,7 +5165,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteTimestamp( VkQueryPool queryPool, uint32_t query) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5207,7 +5207,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyQueryPoolResults( VkDeviceSize stride, VkQueryResultFlags flags) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5251,7 +5251,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPushConstants( uint32_t size, const void* pValues) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5290,7 +5290,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass( const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5328,7 +5328,7 @@ VKAPI_ATTR void VKAPI_CALL CmdNextSubpass( VkCommandBuffer commandBuffer, VkSubpassContents contents) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5361,7 +5361,7 @@ GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass( VkCommandBuffer commandBuffer) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5395,7 +5395,7 @@ VKAPI_ATTR void VKAPI_CALL CmdExecuteCommands( uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5431,7 +5431,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory2( uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5473,7 +5473,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory2( uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5517,7 +5517,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceGroupPeerMemoryFeatures( uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5554,7 +5554,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDeviceMask( VkCommandBuffer commandBuffer, uint32_t deviceMask) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5593,7 +5593,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDispatchBase( uint32_t groupCountY, uint32_t groupCountZ) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5633,7 +5633,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceGroups( uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5683,7 +5683,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements2( const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5722,7 +5722,7 @@ VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements2( const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5762,7 +5762,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements2( uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5801,7 +5801,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures2( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5835,7 +5835,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties2( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5870,7 +5870,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFormatProperties2( VkFormat format, VkFormatProperties2* pFormatProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5906,7 +5906,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceImageFormatProperties2( const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5951,7 +5951,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties2( uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -5986,7 +5986,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMemoryProperties2( VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6022,7 +6022,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties2( uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6059,7 +6059,7 @@ VKAPI_ATTR void VKAPI_CALL TrimCommandPool( VkCommandPool commandPool, VkCommandPoolTrimFlags flags) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6095,7 +6095,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceQueue2( const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6134,7 +6134,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSamplerYcbcrConversion( const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6185,7 +6185,7 @@ VKAPI_ATTR void VKAPI_CALL DestroySamplerYcbcrConversion( VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6225,7 +6225,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorUpdateTemplate( const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6279,7 +6279,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDescriptorUpdateTemplate( VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6318,7 +6318,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalBufferProperties( const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6354,7 +6354,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalFenceProperties( const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6390,7 +6390,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalSemaphoreProperties( const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6426,7 +6426,7 @@ VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutSupport( const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6469,7 +6469,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectCount( uint32_t maxDrawCount, uint32_t stride) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6513,7 +6513,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCount( uint32_t maxDrawCount, uint32_t stride) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6554,7 +6554,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass2( const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6605,7 +6605,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass2( const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6644,7 +6644,7 @@ VKAPI_ATTR void VKAPI_CALL CmdNextSubpass2( const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6679,7 +6679,7 @@ VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass2( VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6715,7 +6715,7 @@ VKAPI_ATTR void VKAPI_CALL ResetQueryPool( uint32_t firstQuery, uint32_t queryCount) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6752,7 +6752,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreCounterValue( VkSemaphore semaphore, uint64_t* pValue) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6797,7 +6797,7 @@ VKAPI_ATTR VkResult VKAPI_CALL WaitSemaphores( const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6838,7 +6838,7 @@ VKAPI_ATTR VkResult VKAPI_CALL SignalSemaphore( VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6878,7 +6878,7 @@ VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetBufferDeviceAddress( VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6918,7 +6918,7 @@ VKAPI_ATTR uint64_t VKAPI_CALL GetBufferOpaqueCaptureAddress( VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6958,7 +6958,7 @@ VKAPI_ATTR uint64_t VKAPI_CALL GetDeviceMemoryOpaqueCaptureAddress( VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -6999,7 +6999,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceToolProperties( uint32_t* pToolCount, VkPhysicalDeviceToolProperties* pToolProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7045,7 +7045,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePrivateDataSlot( const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7096,7 +7096,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyPrivateDataSlot( VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7137,7 +7137,7 @@ VKAPI_ATTR VkResult VKAPI_CALL SetPrivateData( VkPrivateDataSlot privateDataSlot, uint64_t data) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7180,7 +7180,7 @@ VKAPI_ATTR void VKAPI_CALL GetPrivateData( VkPrivateDataSlot privateDataSlot, uint64_t* pData) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7218,7 +7218,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetEvent2( VkEvent event, const VkDependencyInfo* pDependencyInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7257,7 +7257,7 @@ VKAPI_ATTR void VKAPI_CALL CmdResetEvent2( VkEvent event, VkPipelineStageFlags2 stageMask) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7294,7 +7294,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWaitEvents2( const VkEvent* pEvents, const VkDependencyInfo* pDependencyInfos) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7333,7 +7333,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier2( VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7372,7 +7372,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteTimestamp2( VkQueryPool queryPool, uint32_t query) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7410,7 +7410,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit2( const VkSubmitInfo2* pSubmits, VkFence fence) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7452,7 +7452,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer2( VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7489,7 +7489,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImage2( VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7526,7 +7526,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage2( VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7563,7 +7563,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer2( VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7600,7 +7600,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBlitImage2( VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7637,7 +7637,7 @@ VKAPI_ATTR void VKAPI_CALL CmdResolveImage2( VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7674,7 +7674,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRendering( VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7710,7 +7710,7 @@ GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VKAPI_ATTR void VKAPI_CALL CmdEndRendering( VkCommandBuffer commandBuffer) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7743,7 +7743,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCullMode( VkCommandBuffer commandBuffer, VkCullModeFlags cullMode) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7777,7 +7777,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetFrontFace( VkCommandBuffer commandBuffer, VkFrontFace frontFace) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7811,7 +7811,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetPrimitiveTopology( VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7846,7 +7846,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewportWithCount( uint32_t viewportCount, const VkViewport* pViewports) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7882,7 +7882,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetScissorWithCount( uint32_t scissorCount, const VkRect2D* pScissors) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7922,7 +7922,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers2( const VkDeviceSize* pSizes, const VkDeviceSize* pStrides) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7961,7 +7961,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthTestEnable( VkCommandBuffer commandBuffer, VkBool32 depthTestEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -7995,7 +7995,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthWriteEnable( VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8029,7 +8029,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthCompareOp( VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8063,7 +8063,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBoundsTestEnable( VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8097,7 +8097,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilTestEnable( VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8135,7 +8135,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilOp( VkStencilOp depthFailOp, VkCompareOp compareOp) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8173,7 +8173,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRasterizerDiscardEnable( VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8207,7 +8207,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBiasEnable( VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8241,7 +8241,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetPrimitiveRestartEnable( VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8276,7 +8276,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceBufferMemoryRequirements( const VkDeviceBufferMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8312,7 +8312,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceImageMemoryRequirements( const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8352,7 +8352,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceImageSparseMemoryRequirements( uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8392,7 +8392,7 @@ VKAPI_ATTR void VKAPI_CALL DestroySurfaceKHR( VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8432,7 +8432,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceSupportKHR( VkSurfaceKHR surface, VkBool32* pSupported) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8478,7 +8478,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilitiesKHR( VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8524,7 +8524,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceFormatsKHR( uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8571,7 +8571,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModesKHR( uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8618,7 +8618,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR( const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8672,7 +8672,7 @@ VKAPI_ATTR void VKAPI_CALL DestroySwapchainKHR( VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8712,7 +8712,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR( uint32_t* pSwapchainImageCount, VkImage* pSwapchainImages) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8766,7 +8766,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImageKHR( VkFence fence, uint32_t* pImageIndex) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8813,7 +8813,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR( VkQueue queue, const VkPresentInfoKHR* pPresentInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto api_call_lock = VulkanCaptureManager::AcquireExclusiveApiCallLock(); @@ -8843,7 +8843,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDeviceGroupPresentCapabilitiesKHR( VkDevice device, VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8887,7 +8887,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDeviceGroupSurfacePresentModesKHR( VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR* pModes) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8933,7 +8933,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDevicePresentRectanglesKHR( uint32_t* pRectCount, VkRect2D* pRects) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -8979,7 +8979,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImage2KHR( const VkAcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9027,7 +9027,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPropertiesKHR( uint32_t* pPropertyCount, VkDisplayPropertiesKHR* pProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9077,7 +9077,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, VkDisplayPlanePropertiesKHR* pProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9128,7 +9128,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneSupportedDisplaysKHR( uint32_t* pDisplayCount, VkDisplayKHR* pDisplays) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9180,7 +9180,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayModePropertiesKHR( uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9233,7 +9233,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDisplayModeKHR( const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9286,7 +9286,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneCapabilitiesKHR( uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9333,7 +9333,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDisplayPlaneSurfaceKHR( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9389,7 +9389,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSharedSwapchainsKHR( const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9445,7 +9445,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateXlibSurfaceKHR( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9497,7 +9497,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceXlibPresentationSupportKHR( Display* dpy, VisualID visualID) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9538,7 +9538,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateXcbSurfaceKHR( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9590,7 +9590,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceXcbPresentationSupportKHR( xcb_connection_t* connection, xcb_visualid_t visual_id) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9631,7 +9631,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateWaylandSurfaceKHR( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9682,7 +9682,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display* display) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9722,7 +9722,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateAndroidSurfaceKHR( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9774,7 +9774,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateWin32SurfaceKHR( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9824,7 +9824,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceWin32PresentationSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9862,7 +9862,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceVideoCapabilitiesKHR( const VkVideoProfileInfoKHR* pVideoProfile, VkVideoCapabilitiesKHR* pCapabilities) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9908,7 +9908,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceVideoFormatPropertiesKHR( uint32_t* pVideoFormatPropertyCount, VkVideoFormatPropertiesKHR* pVideoFormatProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -9955,7 +9955,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateVideoSessionKHR( const VkAllocationCallbacks* pAllocator, VkVideoSessionKHR* pVideoSession) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10006,7 +10006,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyVideoSessionKHR( VkVideoSessionKHR videoSession, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10046,7 +10046,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetVideoSessionMemoryRequirementsKHR( uint32_t* pMemoryRequirementsCount, VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10093,7 +10093,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindVideoSessionMemoryKHR( uint32_t bindSessionMemoryInfoCount, const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10137,7 +10137,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateVideoSessionParametersKHR( const VkAllocationCallbacks* pAllocator, VkVideoSessionParametersKHR* pVideoSessionParameters) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10191,7 +10191,7 @@ VKAPI_ATTR VkResult VKAPI_CALL UpdateVideoSessionParametersKHR( VkVideoSessionParametersKHR videoSessionParameters, const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10230,7 +10230,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyVideoSessionParametersKHR( VkVideoSessionParametersKHR videoSessionParameters, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10268,7 +10268,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginVideoCodingKHR( VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR* pBeginInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10305,7 +10305,7 @@ VKAPI_ATTR void VKAPI_CALL CmdEndVideoCodingKHR( VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR* pEndCodingInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10339,7 +10339,7 @@ VKAPI_ATTR void VKAPI_CALL CmdControlVideoCodingKHR( VkCommandBuffer commandBuffer, const VkVideoCodingControlInfoKHR* pCodingControlInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10373,7 +10373,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDecodeVideoKHR( VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR* pDecodeInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10410,7 +10410,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRenderingKHR( VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10446,7 +10446,7 @@ GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VKAPI_ATTR void VKAPI_CALL CmdEndRenderingKHR( VkCommandBuffer commandBuffer) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10479,7 +10479,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10513,7 +10513,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10548,7 +10548,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFormatProperties2KHR( VkFormat format, VkFormatProperties2* pFormatProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10584,7 +10584,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceImageFormatProperties2KHR( const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10629,7 +10629,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10664,7 +10664,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMemoryProperties2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10700,7 +10700,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties2KHR( uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10739,7 +10739,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceGroupPeerMemoryFeaturesKHR( uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10776,7 +10776,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDeviceMaskKHR( VkCommandBuffer commandBuffer, uint32_t deviceMask) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10815,7 +10815,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDispatchBaseKHR( uint32_t groupCountY, uint32_t groupCountZ) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10855,7 +10855,7 @@ VKAPI_ATTR void VKAPI_CALL TrimCommandPoolKHR( VkCommandPool commandPool, VkCommandPoolTrimFlags flags) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10891,7 +10891,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceGroupsKHR( uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10941,7 +10941,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalBufferPropertiesKHR( const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -10977,7 +10977,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandleKHR( const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11026,7 +11026,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandlePropertiesKHR( HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11072,7 +11072,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryFdKHR( const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11121,7 +11121,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryFdPropertiesKHR( int fd, VkMemoryFdPropertiesKHR* pMemoryFdProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11167,7 +11167,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalSemaphorePropertiesKHR( const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11202,7 +11202,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreWin32HandleKHR( VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11243,7 +11243,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreWin32HandleKHR( const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11290,7 +11290,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreFdKHR( VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11331,7 +11331,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreFdKHR( const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11382,7 +11382,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetKHR( uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11425,7 +11425,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorUpdateTemplateKHR( const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11479,7 +11479,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDescriptorUpdateTemplateKHR( VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11519,7 +11519,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass2KHR( const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11570,7 +11570,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass2KHR( const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11609,7 +11609,7 @@ VKAPI_ATTR void VKAPI_CALL CmdNextSubpass2KHR( const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11644,7 +11644,7 @@ VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass2KHR( VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11678,7 +11678,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainStatusKHR( VkDevice device, VkSwapchainKHR swapchain) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11716,7 +11716,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalFencePropertiesKHR( const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11751,7 +11751,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ImportFenceWin32HandleKHR( VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11792,7 +11792,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetFenceWin32HandleKHR( const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11839,7 +11839,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ImportFenceFdKHR( VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11880,7 +11880,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetFenceFdKHR( const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11930,7 +11930,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceQueueFamilyPerformanceQuer VkPerformanceCounterKHR* pCounters, VkPerformanceCounterDescriptionKHR* pCounterDescriptions) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -11977,7 +11977,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, uint32_t* pNumPasses) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12012,7 +12012,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireProfilingLockKHR( VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12048,7 +12048,7 @@ GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VKAPI_ATTR void VKAPI_CALL ReleaseProfilingLockKHR( VkDevice device) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12082,7 +12082,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilities2KHR( const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkSurfaceCapabilities2KHR* pSurfaceCapabilities) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12131,7 +12131,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceFormats2KHR( uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12180,7 +12180,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayProperties2KHR( uint32_t* pPropertyCount, VkDisplayProperties2KHR* pProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12230,7 +12230,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPlaneProperties2KHR( uint32_t* pPropertyCount, VkDisplayPlaneProperties2KHR* pProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12281,7 +12281,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayModeProperties2KHR( uint32_t* pPropertyCount, VkDisplayModeProperties2KHR* pProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12332,7 +12332,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneCapabilities2KHR( const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, VkDisplayPlaneCapabilities2KHR* pCapabilities) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12380,7 +12380,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements2KHR( const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12419,7 +12419,7 @@ VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements2KHR( const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12459,7 +12459,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements2KHR( uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12500,7 +12500,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSamplerYcbcrConversionKHR( const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12551,7 +12551,7 @@ VKAPI_ATTR void VKAPI_CALL DestroySamplerYcbcrConversionKHR( VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12590,7 +12590,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory2KHR( uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12632,7 +12632,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory2KHR( uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12674,7 +12674,7 @@ VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutSupportKHR( const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12717,7 +12717,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectCountKHR( uint32_t maxDrawCount, uint32_t stride) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12761,7 +12761,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCountKHR( uint32_t maxDrawCount, uint32_t stride) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12801,7 +12801,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreCounterValueKHR( VkSemaphore semaphore, uint64_t* pValue) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12846,7 +12846,7 @@ VKAPI_ATTR VkResult VKAPI_CALL WaitSemaphoresKHR( const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12887,7 +12887,7 @@ VKAPI_ATTR VkResult VKAPI_CALL SignalSemaphoreKHR( VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12928,7 +12928,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceFragmentShadingRatesKHR( uint32_t* pFragmentShadingRateCount, VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -12973,7 +12973,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetFragmentShadingRateKHR( const VkExtent2D* pFragmentSize, const VkFragmentShadingRateCombinerOpKHR combinerOps[2]) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13008,7 +13008,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRenderingAttachmentLocationsKHR( VkCommandBuffer commandBuffer, const VkRenderingAttachmentLocationInfoKHR* pLocationInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13042,7 +13042,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRenderingInputAttachmentIndicesKHR( VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfoKHR* pInputAttachmentIndexInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13078,7 +13078,7 @@ VKAPI_ATTR VkResult VKAPI_CALL WaitForPresentKHR( uint64_t presentId, uint64_t timeout) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13117,7 +13117,7 @@ VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetBufferDeviceAddressKHR( VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13157,7 +13157,7 @@ VKAPI_ATTR uint64_t VKAPI_CALL GetBufferOpaqueCaptureAddressKHR( VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13197,7 +13197,7 @@ VKAPI_ATTR uint64_t VKAPI_CALL GetDeviceMemoryOpaqueCaptureAddressKHR( VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13238,7 +13238,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDeferredOperationKHR( const VkAllocationCallbacks* pAllocator, VkDeferredOperationKHR* pDeferredOperation) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13288,7 +13288,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDeferredOperationKHR( VkDeferredOperationKHR operation, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13326,7 +13326,7 @@ VKAPI_ATTR uint32_t VKAPI_CALL GetDeferredOperationMaxConcurrencyKHR( VkDevice device, VkDeferredOperationKHR operation) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13363,7 +13363,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDeferredOperationResultKHR( VkDevice device, VkDeferredOperationKHR operation) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13400,7 +13400,7 @@ VKAPI_ATTR VkResult VKAPI_CALL DeferredOperationJoinKHR( VkDevice device, VkDeferredOperationKHR operation) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13439,7 +13439,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutablePropertiesKHR( uint32_t* pExecutableCount, VkPipelineExecutablePropertiesKHR* pProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13489,7 +13489,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutableStatisticsKHR( uint32_t* pStatisticCount, VkPipelineExecutableStatisticKHR* pStatistics) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13539,7 +13539,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutableInternalRepresentationsKHR( uint32_t* pInternalRepresentationCount, VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13588,7 +13588,7 @@ VKAPI_ATTR VkResult VKAPI_CALL MapMemory2KHR( const VkMemoryMapInfoKHR* pMemoryMapInfo, void** ppData) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13635,7 +13635,7 @@ VKAPI_ATTR VkResult VKAPI_CALL UnmapMemory2KHR( VkDevice device, const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13676,7 +13676,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceVideoEncodeQualityLevelPropertie const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13723,7 +13723,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetEncodedVideoSessionParametersKHR( size_t* pDataSize, void* pData) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13772,7 +13772,7 @@ VKAPI_ATTR void VKAPI_CALL CmdEncodeVideoKHR( VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13810,7 +13810,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetEvent2KHR( VkEvent event, const VkDependencyInfo* pDependencyInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13849,7 +13849,7 @@ VKAPI_ATTR void VKAPI_CALL CmdResetEvent2KHR( VkEvent event, VkPipelineStageFlags2 stageMask) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13886,7 +13886,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWaitEvents2KHR( const VkEvent* pEvents, const VkDependencyInfo* pDependencyInfos) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13925,7 +13925,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier2KHR( VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -13964,7 +13964,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteTimestamp2KHR( VkQueryPool queryPool, uint32_t query) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14002,7 +14002,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit2KHR( const VkSubmitInfo2* pSubmits, VkFence fence) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14047,7 +14047,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteBufferMarker2AMD( VkDeviceSize dstOffset, uint32_t marker) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14085,7 +14085,7 @@ VKAPI_ATTR void VKAPI_CALL GetQueueCheckpointData2NV( uint32_t* pCheckpointDataCount, VkCheckpointData2NV* pCheckpointData) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14120,7 +14120,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer2KHR( VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14157,7 +14157,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImage2KHR( VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14194,7 +14194,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage2KHR( VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14231,7 +14231,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer2KHR( VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14268,7 +14268,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBlitImage2KHR( VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14305,7 +14305,7 @@ VKAPI_ATTR void VKAPI_CALL CmdResolveImage2KHR( VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14342,7 +14342,7 @@ VKAPI_ATTR void VKAPI_CALL CmdTraceRaysIndirect2KHR( VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14377,7 +14377,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceBufferMemoryRequirementsKHR( const VkDeviceBufferMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14413,7 +14413,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceImageMemoryRequirementsKHR( const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14453,7 +14453,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceImageSparseMemoryRequirementsKHR( uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14495,7 +14495,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindIndexBuffer2KHR( VkDeviceSize size, VkIndexType indexType) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14533,7 +14533,7 @@ VKAPI_ATTR void VKAPI_CALL GetRenderingAreaGranularityKHR( const VkRenderingAreaInfoKHR* pRenderingAreaInfo, VkExtent2D* pGranularity) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14569,7 +14569,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceImageSubresourceLayoutKHR( const VkDeviceImageSubresourceInfoKHR* pInfo, VkSubresourceLayout2KHR* pLayout) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14609,7 +14609,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout2KHR( const VkImageSubresource2KHR* pSubresource, VkSubresourceLayout2KHR* pLayout) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14646,7 +14646,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCooperativeMatrixPropertiesKHR( uint32_t* pPropertyCount, VkCooperativeMatrixPropertiesKHR* pProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14691,7 +14691,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLineStippleKHR( uint32_t lineStippleFactor, uint16_t lineStipplePattern) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14727,7 +14727,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCalibrateableTimeDomainsKHR( uint32_t* pTimeDomainCount, VkTimeDomainKHR* pTimeDomains) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14774,7 +14774,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetCalibratedTimestampsKHR( uint64_t* pTimestamps, uint64_t* pMaxDeviation) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14820,7 +14820,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorSets2KHR( VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14857,7 +14857,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPushConstants2KHR( VkCommandBuffer commandBuffer, const VkPushConstantsInfoKHR* pPushConstantsInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14894,7 +14894,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSet2KHR( VkCommandBuffer commandBuffer, const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14931,7 +14931,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDescriptorBufferOffsets2EXT( VkCommandBuffer commandBuffer, const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -14968,7 +14968,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorBufferEmbeddedSamplers2EXT( VkCommandBuffer commandBuffer, const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15006,7 +15006,7 @@ VKAPI_ATTR void VKAPI_CALL FrameBoundaryANDROID( VkSemaphore semaphore, VkImage image) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15043,7 +15043,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDebugReportCallbackEXT( const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15094,7 +15094,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDebugReportCallbackEXT( VkDebugReportCallbackEXT callback, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15138,7 +15138,7 @@ VKAPI_ATTR void VKAPI_CALL DebugReportMessageEXT( const char* pLayerPrefix, const char* pMessage) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15178,7 +15178,7 @@ VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectTagEXT( VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15218,7 +15218,7 @@ VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectNameEXT( VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15258,7 +15258,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerBeginEXT( VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15291,7 +15291,7 @@ GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerEndEXT( VkCommandBuffer commandBuffer) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15324,7 +15324,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerInsertEXT( VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15362,7 +15362,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindTransformFeedbackBuffersEXT( const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15403,7 +15403,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginTransformFeedbackEXT( const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15443,7 +15443,7 @@ VKAPI_ATTR void VKAPI_CALL CmdEndTransformFeedbackEXT( const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15483,7 +15483,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginQueryIndexedEXT( VkQueryControlFlags flags, uint32_t index) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15522,7 +15522,7 @@ VKAPI_ATTR void VKAPI_CALL CmdEndQueryIndexedEXT( uint32_t query, uint32_t index) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15563,7 +15563,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectByteCountEXT( uint32_t counterOffset, uint32_t vertexStride) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15602,7 +15602,7 @@ VKAPI_ATTR uint32_t VKAPI_CALL GetImageViewHandleNVX( VkDevice device, const VkImageViewHandleInfoNVX* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15643,7 +15643,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetImageViewAddressNVX( VkImageView imageView, VkImageViewAddressPropertiesNVX* pProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15692,7 +15692,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectCountAMD( uint32_t maxDrawCount, uint32_t stride) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15736,7 +15736,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCountAMD( uint32_t maxDrawCount, uint32_t stride) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15779,7 +15779,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetShaderInfoAMD( size_t* pInfoSize, void* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15828,7 +15828,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateStreamDescriptorSurfaceGGP( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15884,7 +15884,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceExternalImageFormatPropertiesNV( VkExternalMemoryHandleTypeFlagsNV externalHandleType, VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15935,7 +15935,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandleNV( VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -15982,7 +15982,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateViSurfaceNN( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16032,7 +16032,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginConditionalRenderingEXT( VkCommandBuffer commandBuffer, const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16068,7 +16068,7 @@ GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VKAPI_ATTR void VKAPI_CALL CmdEndConditionalRenderingEXT( VkCommandBuffer commandBuffer) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16103,7 +16103,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewportWScalingNV( uint32_t viewportCount, const VkViewportWScalingNV* pViewportWScalings) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16139,7 +16139,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ReleaseDisplayEXT( VkPhysicalDevice physicalDevice, VkDisplayKHR display) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16177,7 +16177,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireXlibDisplayEXT( Display* dpy, VkDisplayKHR display) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16217,7 +16217,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetRandROutputDisplayEXT( RROutput rrOutput, VkDisplayKHR* pDisplay) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16268,7 +16268,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilities2EXT( VkSurfaceKHR surface, VkSurfaceCapabilities2EXT* pSurfaceCapabilities) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16313,7 +16313,7 @@ VKAPI_ATTR VkResult VKAPI_CALL DisplayPowerControlEXT( VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16353,7 +16353,7 @@ VKAPI_ATTR VkResult VKAPI_CALL RegisterDeviceEventEXT( const VkAllocationCallbacks* pAllocator, VkFence* pFence) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16406,7 +16406,7 @@ VKAPI_ATTR VkResult VKAPI_CALL RegisterDisplayEventEXT( const VkAllocationCallbacks* pAllocator, VkFence* pFence) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16459,7 +16459,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainCounterEXT( VkSurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16505,7 +16505,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetRefreshCycleDurationGOOGLE( VkSwapchainKHR swapchain, VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16551,7 +16551,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPastPresentationTimingGOOGLE( uint32_t* pPresentationTimingCount, VkPastPresentationTimingGOOGLE* pPresentationTimings) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16598,7 +16598,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDiscardRectangleEXT( uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16634,7 +16634,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDiscardRectangleEnableEXT( VkCommandBuffer commandBuffer, VkBool32 discardRectangleEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16668,7 +16668,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDiscardRectangleModeEXT( VkCommandBuffer commandBuffer, VkDiscardRectangleModeEXT discardRectangleMode) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16704,7 +16704,7 @@ VKAPI_ATTR void VKAPI_CALL SetHdrMetadataEXT( const VkSwapchainKHR* pSwapchains, const VkHdrMetadataEXT* pMetadata) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16742,7 +16742,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateIOSSurfaceMVK( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16794,7 +16794,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateMacOSSurfaceMVK( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16844,7 +16844,7 @@ VKAPI_ATTR VkResult VKAPI_CALL SetDebugUtilsObjectNameEXT( VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16886,7 +16886,7 @@ VKAPI_ATTR VkResult VKAPI_CALL SetDebugUtilsObjectTagEXT( VkDevice device, const VkDebugUtilsObjectTagInfoEXT* pTagInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16928,7 +16928,7 @@ VKAPI_ATTR void VKAPI_CALL QueueBeginDebugUtilsLabelEXT( VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16961,7 +16961,7 @@ GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VKAPI_ATTR void VKAPI_CALL QueueEndDebugUtilsLabelEXT( VkQueue queue) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -16994,7 +16994,7 @@ VKAPI_ATTR void VKAPI_CALL QueueInsertDebugUtilsLabelEXT( VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17028,7 +17028,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginDebugUtilsLabelEXT( VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17061,7 +17061,7 @@ GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VKAPI_ATTR void VKAPI_CALL CmdEndDebugUtilsLabelEXT( VkCommandBuffer commandBuffer) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17094,7 +17094,7 @@ VKAPI_ATTR void VKAPI_CALL CmdInsertDebugUtilsLabelEXT( VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17130,7 +17130,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDebugUtilsMessengerEXT( const VkAllocationCallbacks* pAllocator, VkDebugUtilsMessengerEXT* pMessenger) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17181,7 +17181,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyDebugUtilsMessengerEXT( VkDebugUtilsMessengerEXT messenger, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17221,7 +17221,7 @@ VKAPI_ATTR void VKAPI_CALL SubmitDebugUtilsMessageEXT( VkDebugUtilsMessageTypeFlagsEXT messageTypes, const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17258,7 +17258,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17303,7 +17303,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryAndroidHardwareBufferANDROID( const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17350,7 +17350,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetSampleLocationsEXT( VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17385,7 +17385,7 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMultisamplePropertiesEXT( VkSampleCountFlagBits samples, VkMultisamplePropertiesEXT* pMultisampleProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17421,7 +17421,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetImageDrmFormatModifierPropertiesEXT( VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17467,7 +17467,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateValidationCacheEXT( const VkAllocationCallbacks* pAllocator, VkValidationCacheEXT* pValidationCache) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17518,7 +17518,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyValidationCacheEXT( VkValidationCacheEXT validationCache, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17558,7 +17558,7 @@ VKAPI_ATTR VkResult VKAPI_CALL MergeValidationCachesEXT( uint32_t srcCacheCount, const VkValidationCacheEXT* pSrcCaches) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17599,7 +17599,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetValidationCacheDataEXT( size_t* pDataSize, void* pData) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17645,7 +17645,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindShadingRateImageNV( VkImageView imageView, VkImageLayout imageLayout) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17682,7 +17682,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewportShadingRatePaletteNV( uint32_t viewportCount, const VkShadingRatePaletteNV* pShadingRatePalettes) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17720,7 +17720,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCoarseSampleOrderNV( uint32_t customSampleOrderCount, const VkCoarseSampleOrderCustomNV* pCustomSampleOrders) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17758,7 +17758,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateAccelerationStructureNV( const VkAllocationCallbacks* pAllocator, VkAccelerationStructureNV* pAccelerationStructure) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17812,7 +17812,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyAccelerationStructureNV( VkAccelerationStructureNV accelerationStructure, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17851,7 +17851,7 @@ VKAPI_ATTR void VKAPI_CALL GetAccelerationStructureMemoryRequirementsNV( const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17890,7 +17890,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindAccelerationStructureMemoryNV( uint32_t bindInfoCount, const VkBindAccelerationStructureMemoryInfoNV* pBindInfos) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17938,7 +17938,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBuildAccelerationStructureNV( VkBuffer scratch, VkDeviceSize scratchOffset) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -17984,7 +17984,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyAccelerationStructureNV( VkAccelerationStructureNV src, VkCopyAccelerationStructureModeKHR mode) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18033,7 +18033,7 @@ VKAPI_ATTR void VKAPI_CALL CmdTraceRaysNV( uint32_t height, uint32_t depth) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18084,7 +18084,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetRayTracingShaderGroupHandlesKHR( size_t dataSize, void* pData) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18135,7 +18135,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetRayTracingShaderGroupHandlesNV( size_t dataSize, void* pData) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18184,7 +18184,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetAccelerationStructureHandleNV( size_t dataSize, void* pData) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18233,7 +18233,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteAccelerationStructuresPropertiesNV( VkQueryPool queryPool, uint32_t firstQuery) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18272,7 +18272,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CompileDeferredNV( VkPipeline pipeline, uint32_t shader) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18312,7 +18312,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryHostPointerPropertiesEXT( const void* pHostPointer, VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18360,7 +18360,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteBufferMarkerAMD( VkDeviceSize dstOffset, uint32_t marker) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18398,7 +18398,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCalibrateableTimeDomainsEXT( uint32_t* pTimeDomainCount, VkTimeDomainKHR* pTimeDomains) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18445,7 +18445,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetCalibratedTimestampsEXT( uint64_t* pTimestamps, uint64_t* pMaxDeviation) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18492,7 +18492,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksNV( uint32_t taskCount, uint32_t firstTask) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18530,7 +18530,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectNV( uint32_t drawCount, uint32_t stride) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18572,7 +18572,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectCountNV( uint32_t maxDrawCount, uint32_t stride) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18613,7 +18613,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetExclusiveScissorEnableNV( uint32_t exclusiveScissorCount, const VkBool32* pExclusiveScissorEnables) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18651,7 +18651,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetExclusiveScissorNV( uint32_t exclusiveScissorCount, const VkRect2D* pExclusiveScissors) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18687,7 +18687,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCheckpointNV( VkCommandBuffer commandBuffer, const void* pCheckpointMarker) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18722,7 +18722,7 @@ VKAPI_ATTR void VKAPI_CALL GetQueueCheckpointDataNV( uint32_t* pCheckpointDataCount, VkCheckpointDataNV* pCheckpointData) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18757,7 +18757,7 @@ VKAPI_ATTR VkResult VKAPI_CALL InitializePerformanceApiINTEL( VkDevice device, const VkInitializePerformanceApiInfoINTEL* pInitializeInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18793,7 +18793,7 @@ GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VKAPI_ATTR void VKAPI_CALL UninitializePerformanceApiINTEL( VkDevice device) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18826,7 +18826,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CmdSetPerformanceMarkerINTEL( VkCommandBuffer commandBuffer, const VkPerformanceMarkerInfoINTEL* pMarkerInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18863,7 +18863,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CmdSetPerformanceStreamMarkerINTEL( VkCommandBuffer commandBuffer, const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18900,7 +18900,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CmdSetPerformanceOverrideINTEL( VkCommandBuffer commandBuffer, const VkPerformanceOverrideInfoINTEL* pOverrideInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18938,7 +18938,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquirePerformanceConfigurationINTEL( const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, VkPerformanceConfigurationINTEL* pConfiguration) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -18987,7 +18987,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ReleasePerformanceConfigurationINTEL( VkDevice device, VkPerformanceConfigurationINTEL configuration) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19027,7 +19027,7 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueSetPerformanceConfigurationINTEL( VkQueue queue, VkPerformanceConfigurationINTEL configuration) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19065,7 +19065,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPerformanceParameterINTEL( VkPerformanceParameterTypeINTEL parameter, VkPerformanceValueINTEL* pValue) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19110,7 +19110,7 @@ VKAPI_ATTR void VKAPI_CALL SetLocalDimmingAMD( VkSwapchainKHR swapChain, VkBool32 localDimmingEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19147,7 +19147,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateImagePipeSurfaceFUCHSIA( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19199,7 +19199,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateMetalSurfaceEXT( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19249,7 +19249,7 @@ VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetBufferDeviceAddressEXT( VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19290,7 +19290,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceToolPropertiesEXT( uint32_t* pToolCount, VkPhysicalDeviceToolProperties* pToolProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19335,7 +19335,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCooperativeMatrixPropertiesNV( uint32_t* pPropertyCount, VkCooperativeMatrixPropertiesNV* pProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19380,7 +19380,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSupportedFramebufferMixedSamples uint32_t* pCombinationCount, VkFramebufferMixedSamplesCombinationNV* pCombinations) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19426,7 +19426,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModes2EXT( uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19474,7 +19474,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireFullScreenExclusiveModeEXT( VkDevice device, VkSwapchainKHR swapchain) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19511,7 +19511,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ReleaseFullScreenExclusiveModeEXT( VkDevice device, VkSwapchainKHR swapchain) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19549,7 +19549,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDeviceGroupSurfacePresentModes2EXT( const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19598,7 +19598,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateHeadlessSurfaceEXT( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19649,7 +19649,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLineStippleEXT( uint32_t lineStippleFactor, uint16_t lineStipplePattern) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19686,7 +19686,7 @@ VKAPI_ATTR void VKAPI_CALL ResetQueryPoolEXT( uint32_t firstQuery, uint32_t queryCount) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19722,7 +19722,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCullModeEXT( VkCommandBuffer commandBuffer, VkCullModeFlags cullMode) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19756,7 +19756,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetFrontFaceEXT( VkCommandBuffer commandBuffer, VkFrontFace frontFace) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19790,7 +19790,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetPrimitiveTopologyEXT( VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19825,7 +19825,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewportWithCountEXT( uint32_t viewportCount, const VkViewport* pViewports) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19861,7 +19861,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetScissorWithCountEXT( uint32_t scissorCount, const VkRect2D* pScissors) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19901,7 +19901,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers2EXT( const VkDeviceSize* pSizes, const VkDeviceSize* pStrides) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19940,7 +19940,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthTestEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthTestEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -19974,7 +19974,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthWriteEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20008,7 +20008,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthCompareOpEXT( VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20042,7 +20042,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBoundsTestEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20076,7 +20076,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilTestEnableEXT( VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20114,7 +20114,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilOpEXT( VkStencilOp depthFailOp, VkCompareOp compareOp) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20152,7 +20152,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyMemoryToImageEXT( VkDevice device, const VkCopyMemoryToImageInfoEXT* pCopyMemoryToImageInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20192,7 +20192,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyImageToMemoryEXT( VkDevice device, const VkCopyImageToMemoryInfoEXT* pCopyImageToMemoryInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20232,7 +20232,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyImageToImageEXT( VkDevice device, const VkCopyImageToImageInfoEXT* pCopyImageToImageInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20273,7 +20273,7 @@ VKAPI_ATTR VkResult VKAPI_CALL TransitionImageLayoutEXT( uint32_t transitionCount, const VkHostImageLayoutTransitionInfoEXT* pTransitions) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20316,7 +20316,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout2EXT( const VkImageSubresource2KHR* pSubresource, VkSubresourceLayout2KHR* pLayout) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20352,7 +20352,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ReleaseSwapchainImagesEXT( VkDevice device, const VkReleaseSwapchainImagesInfoEXT* pReleaseInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20393,7 +20393,7 @@ VKAPI_ATTR void VKAPI_CALL GetGeneratedCommandsMemoryRequirementsNV( const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2* pMemoryRequirements) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20431,7 +20431,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPreprocessGeneratedCommandsNV( VkCommandBuffer commandBuffer, const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20469,7 +20469,7 @@ VKAPI_ATTR void VKAPI_CALL CmdExecuteGeneratedCommandsNV( VkBool32 isPreprocessed, const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20509,7 +20509,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindPipelineShaderGroupNV( VkPipeline pipeline, uint32_t groupIndex) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20547,7 +20547,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateIndirectCommandsLayoutNV( const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutNV* pIndirectCommandsLayout) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20601,7 +20601,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyIndirectCommandsLayoutNV( VkIndirectCommandsLayoutNV indirectCommandsLayout, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20639,7 +20639,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBias2EXT( VkCommandBuffer commandBuffer, const VkDepthBiasInfoEXT* pDepthBiasInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20674,7 +20674,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireDrmDisplayEXT( int32_t drmFd, VkDisplayKHR display) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20714,7 +20714,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDrmDisplayEXT( uint32_t connectorId, VkDisplayKHR* display) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20766,7 +20766,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePrivateDataSlotEXT( const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20817,7 +20817,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyPrivateDataSlotEXT( VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20858,7 +20858,7 @@ VKAPI_ATTR VkResult VKAPI_CALL SetPrivateDataEXT( VkPrivateDataSlot privateDataSlot, uint64_t data) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20901,7 +20901,7 @@ VKAPI_ATTR void VKAPI_CALL GetPrivateDataEXT( VkPrivateDataSlot privateDataSlot, uint64_t* pData) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20939,7 +20939,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetFragmentShadingRateEnumNV( VkFragmentShadingRateNV shadingRate, const VkFragmentShadingRateCombinerOpKHR combinerOps[2]) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -20975,7 +20975,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDeviceFaultInfoEXT( VkDeviceFaultCountsEXT* pFaultCounts, VkDeviceFaultInfoEXT* pFaultInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21019,7 +21019,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireWinrtDisplayNV( VkPhysicalDevice physicalDevice, VkDisplayKHR display) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21057,7 +21057,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetWinrtDisplayNV( uint32_t deviceRelativeId, VkDisplayKHR* pDisplay) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21108,7 +21108,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDirectFBSurfaceEXT( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21159,7 +21159,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceDirectFBPresentationSupportEXT( uint32_t queueFamilyIndex, IDirectFB* dfb) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21200,7 +21200,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetVertexInputEXT( uint32_t vertexAttributeDescriptionCount, const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21238,7 +21238,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryZirconHandleFUCHSIA( const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21287,7 +21287,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryZirconHandlePropertiesFUCHSIA( zx_handle_t zirconHandle, VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21332,7 +21332,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreZirconHandleFUCHSIA( VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21373,7 +21373,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreZirconHandleFUCHSIA( const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21421,7 +21421,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindInvocationMaskHUAWEI( VkImageView imageView, VkImageLayout imageLayout) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21457,7 +21457,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryRemoteAddressNV( const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, VkRemoteAddressNV* pAddress) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21504,7 +21504,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetPatchControlPointsEXT( VkCommandBuffer commandBuffer, uint32_t patchControlPoints) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21538,7 +21538,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRasterizerDiscardEnableEXT( VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21572,7 +21572,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBiasEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21606,7 +21606,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLogicOpEXT( VkCommandBuffer commandBuffer, VkLogicOp logicOp) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21640,7 +21640,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetPrimitiveRestartEnableEXT( VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21676,7 +21676,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateScreenSurfaceQNX( const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21727,7 +21727,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceScreenPresentationSupportQNX( uint32_t queueFamilyIndex, struct _screen_window* window) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21766,7 +21766,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetColorWriteEn uint32_t attachmentCount, const VkBool32* pColorWriteEnables) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21805,7 +21805,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMultiEXT( uint32_t firstInstance, uint32_t stride) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21848,7 +21848,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMultiIndexedEXT( uint32_t stride, const int32_t* pVertexOffset) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21889,7 +21889,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateMicromapEXT( const VkAllocationCallbacks* pAllocator, VkMicromapEXT* pMicromap) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21943,7 +21943,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyMicromapEXT( VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -21982,7 +21982,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBuildMicromapsEXT( uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22022,7 +22022,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BuildMicromapsEXT( uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22065,7 +22065,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyMicromapEXT( VkDeferredOperationKHR deferredOperation, const VkCopyMicromapInfoEXT* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22107,7 +22107,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyMicromapToMemoryEXT( VkDeferredOperationKHR deferredOperation, const VkCopyMicromapToMemoryInfoEXT* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22149,7 +22149,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyMemoryToMicromapEXT( VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToMicromapInfoEXT* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22195,7 +22195,7 @@ VKAPI_ATTR VkResult VKAPI_CALL WriteMicromapsPropertiesEXT( void* pData, size_t stride) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22243,7 +22243,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyMicromapEXT( VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22280,7 +22280,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyMicromapToMemoryEXT( VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22317,7 +22317,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyMemoryToMicromapEXT( VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22358,7 +22358,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteMicromapsPropertiesEXT( VkQueryPool queryPool, uint32_t firstQuery) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22397,7 +22397,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceMicromapCompatibilityEXT( const VkMicromapVersionInfoEXT* pVersionInfo, VkAccelerationStructureCompatibilityKHR* pCompatibility) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22434,7 +22434,7 @@ VKAPI_ATTR void VKAPI_CALL GetMicromapBuildSizesEXT( const VkMicromapBuildInfoEXT* pBuildInfo, VkMicromapBuildSizesInfoEXT* pSizeInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22475,7 +22475,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawClusterHUAWEI( uint32_t groupCountY, uint32_t groupCountZ) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22512,7 +22512,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawClusterIndirectHUAWEI( VkBuffer buffer, VkDeviceSize offset) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22548,7 +22548,7 @@ VKAPI_ATTR void VKAPI_CALL SetDeviceMemoryPriorityEXT( VkDeviceMemory memory, float priority) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22584,7 +22584,7 @@ VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutHostMappingInfoVALVE( const VkDescriptorSetBindingReferenceVALVE* pBindingReference, VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22623,7 +22623,7 @@ VKAPI_ATTR void VKAPI_CALL GetDescriptorSetHostMappingVALVE( VkDescriptorSet descriptorSet, void** ppData) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22659,7 +22659,7 @@ VKAPI_ATTR void VKAPI_CALL GetPipelineIndirectMemoryRequirementsNV( const VkComputePipelineCreateInfo* pCreateInfo, VkMemoryRequirements2* pMemoryRequirements) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22698,7 +22698,7 @@ VKAPI_ATTR void VKAPI_CALL CmdUpdatePipelineIndirectBufferNV( VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22733,7 +22733,7 @@ VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetPipelineIndirectDeviceAddressNV( VkDevice device, const VkPipelineIndirectDeviceAddressInfoNV* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22773,7 +22773,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthClampEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthClampEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22807,7 +22807,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetPolygonModeEXT( VkCommandBuffer commandBuffer, VkPolygonMode polygonMode) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22841,7 +22841,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRasterizationSamplesEXT( VkCommandBuffer commandBuffer, VkSampleCountFlagBits rasterizationSamples) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22876,7 +22876,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetSampleMaskEXT( VkSampleCountFlagBits samples, const VkSampleMask* pSampleMask) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22911,7 +22911,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetAlphaToCoverageEnableEXT( VkCommandBuffer commandBuffer, VkBool32 alphaToCoverageEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22945,7 +22945,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetAlphaToOneEnableEXT( VkCommandBuffer commandBuffer, VkBool32 alphaToOneEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -22979,7 +22979,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLogicOpEnableEXT( VkCommandBuffer commandBuffer, VkBool32 logicOpEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23015,7 +23015,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetColorBlendEnableEXT( uint32_t attachmentCount, const VkBool32* pColorBlendEnables) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23053,7 +23053,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetColorBlendEquationEXT( uint32_t attachmentCount, const VkColorBlendEquationEXT* pColorBlendEquations) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23091,7 +23091,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetColorWriteMaskEXT( uint32_t attachmentCount, const VkColorComponentFlags* pColorWriteMasks) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23127,7 +23127,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetTessellationDomainOriginEXT( VkCommandBuffer commandBuffer, VkTessellationDomainOrigin domainOrigin) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23161,7 +23161,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRasterizationStreamEXT( VkCommandBuffer commandBuffer, uint32_t rasterizationStream) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23195,7 +23195,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetConservativeRasterizationModeEXT( VkCommandBuffer commandBuffer, VkConservativeRasterizationModeEXT conservativeRasterizationMode) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23229,7 +23229,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetExtraPrimitiveOverestimationSizeEXT( VkCommandBuffer commandBuffer, float extraPrimitiveOverestimationSize) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23263,7 +23263,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthClipEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthClipEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23297,7 +23297,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetSampleLocationsEnableEXT( VkCommandBuffer commandBuffer, VkBool32 sampleLocationsEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23333,7 +23333,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetColorBlendAdvancedEXT( uint32_t attachmentCount, const VkColorBlendAdvancedEXT* pColorBlendAdvanced) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23369,7 +23369,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetProvokingVertexModeEXT( VkCommandBuffer commandBuffer, VkProvokingVertexModeEXT provokingVertexMode) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23403,7 +23403,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLineRasterizationModeEXT( VkCommandBuffer commandBuffer, VkLineRasterizationModeEXT lineRasterizationMode) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23437,7 +23437,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLineStippleEnableEXT( VkCommandBuffer commandBuffer, VkBool32 stippledLineEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23471,7 +23471,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthClipNegativeOneToOneEXT( VkCommandBuffer commandBuffer, VkBool32 negativeOneToOne) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23505,7 +23505,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewportWScalingEnableNV( VkCommandBuffer commandBuffer, VkBool32 viewportWScalingEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23541,7 +23541,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewportSwizzleNV( uint32_t viewportCount, const VkViewportSwizzleNV* pViewportSwizzles) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23577,7 +23577,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCoverageToColorEnableNV( VkCommandBuffer commandBuffer, VkBool32 coverageToColorEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23611,7 +23611,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCoverageToColorLocationNV( VkCommandBuffer commandBuffer, uint32_t coverageToColorLocation) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23645,7 +23645,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCoverageModulationModeNV( VkCommandBuffer commandBuffer, VkCoverageModulationModeNV coverageModulationMode) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23679,7 +23679,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCoverageModulationTableEnableNV( VkCommandBuffer commandBuffer, VkBool32 coverageModulationTableEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23714,7 +23714,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCoverageModulationTableNV( uint32_t coverageModulationTableCount, const float* pCoverageModulationTable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23749,7 +23749,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetShadingRateImageEnableNV( VkCommandBuffer commandBuffer, VkBool32 shadingRateImageEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23783,7 +23783,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRepresentativeFragmentTestEnableNV( VkCommandBuffer commandBuffer, VkBool32 representativeFragmentTestEnable) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23817,7 +23817,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCoverageReductionModeNV( VkCommandBuffer commandBuffer, VkCoverageReductionModeNV coverageReductionMode) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23852,7 +23852,7 @@ VKAPI_ATTR void VKAPI_CALL GetShaderModuleIdentifierEXT( VkShaderModule shaderModule, VkShaderModuleIdentifierEXT* pIdentifier) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23888,7 +23888,7 @@ VKAPI_ATTR void VKAPI_CALL GetShaderModuleCreateInfoIdentifierEXT( const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModuleIdentifierEXT* pIdentifier) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23928,7 +23928,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceOpticalFlowImageFormatsNV( uint32_t* pFormatCount, VkOpticalFlowImageFormatPropertiesNV* pImageFormatProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -23975,7 +23975,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateOpticalFlowSessionNV( const VkAllocationCallbacks* pAllocator, VkOpticalFlowSessionNV* pSession) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24026,7 +24026,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyOpticalFlowSessionNV( VkOpticalFlowSessionNV session, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24067,7 +24067,7 @@ VKAPI_ATTR VkResult VKAPI_CALL BindOpticalFlowSessionImageNV( VkImageView view, VkImageLayout layout) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24108,7 +24108,7 @@ VKAPI_ATTR void VKAPI_CALL CmdOpticalFlowExecuteNV( VkOpticalFlowSessionNV session, const VkOpticalFlowExecuteInfoNV* pExecuteInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24146,7 +24146,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateShadersEXT( const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24201,7 +24201,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyShaderEXT( VkShaderEXT shader, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24241,7 +24241,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetShaderBinaryDataEXT( size_t* pDataSize, void* pData) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24288,7 +24288,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindShadersEXT( const VkShaderStageFlagBits* pStages, const VkShaderEXT* pShaders) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24326,7 +24326,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetFramebufferTilePropertiesQCOM( uint32_t* pPropertiesCount, VkTilePropertiesQCOM* pProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24372,7 +24372,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDynamicRenderingTilePropertiesQCOM( const VkRenderingInfo* pRenderingInfo, VkTilePropertiesQCOM* pProperties) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24420,7 +24420,7 @@ VKAPI_ATTR VkResult VKAPI_CALL SetLatencySleepModeNV( VkSwapchainKHR swapchain, const VkLatencySleepModeInfoNV* pSleepModeInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24459,7 +24459,7 @@ VKAPI_ATTR VkResult VKAPI_CALL LatencySleepNV( VkSwapchainKHR swapchain, const VkLatencySleepInfoNV* pSleepInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24501,7 +24501,7 @@ VKAPI_ATTR void VKAPI_CALL SetLatencyMarkerNV( VkSwapchainKHR swapchain, const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24537,7 +24537,7 @@ VKAPI_ATTR void VKAPI_CALL GetLatencyTimingsNV( VkSwapchainKHR swapchain, VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24572,7 +24572,7 @@ VKAPI_ATTR void VKAPI_CALL QueueNotifyOutOfBandNV( VkQueue queue, const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24606,7 +24606,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetAttachmentFeedbackLoopEnableEXT( VkCommandBuffer commandBuffer, VkImageAspectFlags aspectMask) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24642,7 +24642,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateAccelerationStructureKHR( const VkAllocationCallbacks* pAllocator, VkAccelerationStructureKHR* pAccelerationStructure) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24688,7 +24688,7 @@ VKAPI_ATTR void VKAPI_CALL DestroyAccelerationStructureKHR( VkAccelerationStructureKHR accelerationStructure, const VkAllocationCallbacks* pAllocator) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24728,7 +24728,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBuildAccelerationStructuresKHR( const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24768,7 +24768,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBuildAccelerationStructuresIndirectKHR( const uint32_t* pIndirectStrides, const uint32_t* const* ppMaxPrimitiveCounts) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24810,7 +24810,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyAccelerationStructureToMemoryKHR( VkDeferredOperationKHR deferredOperation, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24852,7 +24852,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyMemoryToAccelerationStructureKHR( VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24898,7 +24898,7 @@ VKAPI_ATTR VkResult VKAPI_CALL WriteAccelerationStructuresPropertiesKHR( void* pData, size_t stride) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24946,7 +24946,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyAccelerationStructureKHR( VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureInfoKHR* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -24983,7 +24983,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyAccelerationStructureToMemoryKHR( VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -25020,7 +25020,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyMemoryToAccelerationStructureKHR( VkCommandBuffer commandBuffer, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -25057,7 +25057,7 @@ VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetAccelerationStructureDeviceAddressKHR( VkDevice device, const VkAccelerationStructureDeviceAddressInfoKHR* pInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -25101,7 +25101,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteAccelerationStructuresPropertiesKHR( VkQueryPool queryPool, uint32_t firstQuery) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -25140,7 +25140,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceAccelerationStructureCompatibilityKHR( const VkAccelerationStructureVersionInfoKHR* pVersionInfo, VkAccelerationStructureCompatibilityKHR* pCompatibility) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -25178,7 +25178,7 @@ VKAPI_ATTR void VKAPI_CALL GetAccelerationStructureBuildSizesKHR( const uint32_t* pMaxPrimitiveCounts, VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -25224,7 +25224,7 @@ VKAPI_ATTR void VKAPI_CALL CmdTraceRaysKHR( uint32_t height, uint32_t depth) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -25268,7 +25268,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetRayTracingCaptureReplayShaderGroupHandlesKHR( size_t dataSize, void* pData) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -25319,7 +25319,7 @@ VKAPI_ATTR void VKAPI_CALL CmdTraceRaysIndirectKHR( const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, VkDeviceAddress indirectDeviceAddress) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -25359,7 +25359,7 @@ VKAPI_ATTR VkDeviceSize VKAPI_CALL GetRayTracingShaderGroupStackSizeKHR( uint32_t group, VkShaderGroupShaderKHR groupShader) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -25398,7 +25398,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRayTracingPipelineStackSizeKHR( VkCommandBuffer commandBuffer, uint32_t pipelineStackSize) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -25434,7 +25434,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksEXT( uint32_t groupCountY, uint32_t groupCountZ) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -25473,7 +25473,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectEXT( uint32_t drawCount, uint32_t stride) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); @@ -25515,7 +25515,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectCountEXT( uint32_t maxDrawCount, uint32_t stride) { -GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) +// GFXRECON_WRITE_CONSOLE("[CAPTURE] %s()", __func__) VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); auto force_command_serialization = manager->GetForceCommandSerialization(); diff --git a/framework/generated/generated_vulkan_replay_consumer.cpp b/framework/generated/generated_vulkan_replay_consumer.cpp index 2e6438e002..0b0b59f30f 100644 --- a/framework/generated/generated_vulkan_replay_consumer.cpp +++ b/framework/generated/generated_vulkan_replay_consumer.cpp @@ -48,7 +48,7 @@ void VulkanReplayConsumer::Process_vkCreateInstance( StructPointerDecoder* pAllocator, HandlePointerDecoder* pInstance) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) if (!pInstance->IsNull()) { pInstance->SetHandleLength(1); } InstanceInfo handle_info; pInstance->SetConsumerData(0, &handle_info); @@ -65,7 +65,7 @@ void VulkanReplayConsumer::Process_vkDestroyInstance( format::HandleId instance, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -80,7 +80,7 @@ void VulkanReplayConsumer::Process_vkEnumeratePhysicalDevices( PointerDecoder* pPhysicalDeviceCount, HandlePointerDecoder* pPhysicalDevices) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); pPhysicalDeviceCount->IsNull() ? nullptr : pPhysicalDeviceCount->AllocateOutputData(1, GetOutputArrayCount("vkEnumeratePhysicalDevices", returnValue, instance, kInstanceArrayEnumeratePhysicalDevices, pPhysicalDeviceCount, pPhysicalDevices, &VulkanObjectInfoTable::GetInstanceInfo)); if (!pPhysicalDevices->IsNull()) { pPhysicalDevices->SetHandleLength(*pPhysicalDeviceCount->GetOutputPointer()); } @@ -100,7 +100,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceFeatures( format::HandleId physicalDevice, StructPointerDecoder* pFeatures) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkPhysicalDeviceFeatures* out_pFeatures = pFeatures->IsNull() ? nullptr : pFeatures->AllocateOutputData(1); @@ -113,7 +113,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceFormatProperties( VkFormat format, StructPointerDecoder* pFormatProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkFormatProperties* out_pFormatProperties = pFormatProperties->IsNull() ? nullptr : pFormatProperties->AllocateOutputData(1); @@ -131,7 +131,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceImageFormatProperties( VkImageCreateFlags flags, StructPointerDecoder* pImageFormatProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkImageFormatProperties* out_pImageFormatProperties = pImageFormatProperties->IsNull() ? nullptr : pImageFormatProperties->AllocateOutputData(1); @@ -144,7 +144,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceProperties( format::HandleId physicalDevice, StructPointerDecoder* pProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(1); @@ -157,7 +157,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceQueueFamilyProperties( PointerDecoder* pQueueFamilyPropertyCount, StructPointerDecoder* pQueueFamilyProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pQueueFamilyPropertyCount = pQueueFamilyPropertyCount->IsNull() ? nullptr : pQueueFamilyPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceQueueFamilyProperties", VK_SUCCESS, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceQueueFamilyProperties, pQueueFamilyPropertyCount, pQueueFamilyProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkQueueFamilyProperties* out_pQueueFamilyProperties = pQueueFamilyProperties->IsNull() ? nullptr : pQueueFamilyProperties->AllocateOutputData(*out_pQueueFamilyPropertyCount); @@ -172,7 +172,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceMemoryProperties( format::HandleId physicalDevice, StructPointerDecoder* pMemoryProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); pMemoryProperties->IsNull() ? nullptr : pMemoryProperties->AllocateOutputData(1); @@ -187,7 +187,7 @@ void VulkanReplayConsumer::Process_vkCreateDevice( StructPointerDecoder* pAllocator, HandlePointerDecoder* pDevice) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -207,7 +207,7 @@ void VulkanReplayConsumer::Process_vkDestroyDevice( format::HandleId device, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); OverrideDestroyDevice(GetDeviceTable(in_device->handle)->DestroyDevice, in_device, pAllocator); @@ -221,7 +221,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceQueue( uint32_t queueIndex, HandlePointerDecoder* pQueue) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); if (!pQueue->IsNull()) { pQueue->SetHandleLength(1); } QueueInfo handle_info; @@ -241,7 +241,7 @@ void VulkanReplayConsumer::Process_vkQueueSubmit( StructPointerDecoder* pSubmits, format::HandleId fence) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_queue = GetObjectInfoTable().GetQueueInfo(queue); MapStructArrayHandles(pSubmits->GetMetaStructPointer(), pSubmits->GetLength(), GetObjectInfoTable()); @@ -256,7 +256,7 @@ void VulkanReplayConsumer::Process_vkQueueWaitIdle( VkResult returnValue, format::HandleId queue) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkQueue in_queue = MapHandle(queue, &VulkanObjectInfoTable::GetQueueInfo); VkResult replay_result = GetDeviceTable(in_queue)->QueueWaitIdle(in_queue); @@ -268,7 +268,7 @@ void VulkanReplayConsumer::Process_vkDeviceWaitIdle( VkResult returnValue, format::HandleId device) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkResult replay_result = GetDeviceTable(in_device)->DeviceWaitIdle(in_device); @@ -283,7 +283,7 @@ void VulkanReplayConsumer::Process_vkAllocateMemory( StructPointerDecoder* pAllocator, HandlePointerDecoder* pMemory) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pAllocateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -304,7 +304,7 @@ void VulkanReplayConsumer::Process_vkFreeMemory( format::HandleId memory, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_memory = GetObjectInfoTable().GetDeviceMemoryInfo(memory); @@ -322,7 +322,7 @@ void VulkanReplayConsumer::Process_vkMapMemory( VkMemoryMapFlags flags, PointerDecoder* ppData) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_memory = GetObjectInfoTable().GetDeviceMemoryInfo(memory); void** out_ppData = ppData->IsNull() ? nullptr : ppData->AllocateOutputData(1); @@ -338,7 +338,7 @@ void VulkanReplayConsumer::Process_vkUnmapMemory( format::HandleId device, format::HandleId memory) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_memory = GetObjectInfoTable().GetDeviceMemoryInfo(memory); @@ -352,7 +352,7 @@ void VulkanReplayConsumer::Process_vkFlushMappedMemoryRanges( uint32_t memoryRangeCount, StructPointerDecoder* pMemoryRanges) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructArrayHandles(pMemoryRanges->GetMetaStructPointer(), pMemoryRanges->GetLength(), GetObjectInfoTable()); @@ -368,7 +368,7 @@ void VulkanReplayConsumer::Process_vkInvalidateMappedMemoryRanges( uint32_t memoryRangeCount, StructPointerDecoder* pMemoryRanges) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructArrayHandles(pMemoryRanges->GetMetaStructPointer(), pMemoryRanges->GetLength(), GetObjectInfoTable()); @@ -383,7 +383,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceMemoryCommitment( format::HandleId memory, PointerDecoder* pCommittedMemoryInBytes) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeviceMemory in_memory = MapHandle(memory, &VulkanObjectInfoTable::GetDeviceMemoryInfo); VkDeviceSize* out_pCommittedMemoryInBytes = pCommittedMemoryInBytes->IsNull() ? nullptr : pCommittedMemoryInBytes->AllocateOutputData(1, static_cast(0)); @@ -399,7 +399,7 @@ void VulkanReplayConsumer::Process_vkBindBufferMemory( format::HandleId memory, VkDeviceSize memoryOffset) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_buffer = GetObjectInfoTable().GetBufferInfo(buffer); auto in_memory = GetObjectInfoTable().GetDeviceMemoryInfo(memory); @@ -416,7 +416,7 @@ void VulkanReplayConsumer::Process_vkBindImageMemory( format::HandleId memory, VkDeviceSize memoryOffset) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_image = GetObjectInfoTable().GetImageInfo(image); auto in_memory = GetObjectInfoTable().GetDeviceMemoryInfo(memory); @@ -431,7 +431,7 @@ void VulkanReplayConsumer::Process_vkGetBufferMemoryRequirements( format::HandleId buffer, StructPointerDecoder* pMemoryRequirements) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); VkMemoryRequirements* out_pMemoryRequirements = pMemoryRequirements->IsNull() ? nullptr : pMemoryRequirements->AllocateOutputData(1); @@ -445,7 +445,7 @@ void VulkanReplayConsumer::Process_vkGetImageMemoryRequirements( format::HandleId image, StructPointerDecoder* pMemoryRequirements) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkImage in_image = MapHandle(image, &VulkanObjectInfoTable::GetImageInfo); VkMemoryRequirements* out_pMemoryRequirements = pMemoryRequirements->IsNull() ? nullptr : pMemoryRequirements->AllocateOutputData(1); @@ -460,7 +460,7 @@ void VulkanReplayConsumer::Process_vkGetImageSparseMemoryRequirements( PointerDecoder* pSparseMemoryRequirementCount, StructPointerDecoder* pSparseMemoryRequirements) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkImage in_image = MapHandle(image, &VulkanObjectInfoTable::GetImageInfo); uint32_t* out_pSparseMemoryRequirementCount = pSparseMemoryRequirementCount->IsNull() ? nullptr : pSparseMemoryRequirementCount->AllocateOutputData(1, GetOutputArrayCount("vkGetImageSparseMemoryRequirements", VK_SUCCESS, image, kImageArrayGetImageSparseMemoryRequirements, pSparseMemoryRequirementCount, pSparseMemoryRequirements, &VulkanObjectInfoTable::GetImageInfo)); @@ -482,7 +482,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSparseImageFormatPropertie PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceSparseImageFormatProperties", VK_SUCCESS, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceSparseImageFormatProperties, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkSparseImageFormatProperties* out_pProperties = pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(*out_pPropertyCount); @@ -500,7 +500,7 @@ void VulkanReplayConsumer::Process_vkQueueBindSparse( StructPointerDecoder* pBindInfo, format::HandleId fence) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_queue = GetObjectInfoTable().GetQueueInfo(queue); MapStructArrayHandles(pBindInfo->GetMetaStructPointer(), pBindInfo->GetLength(), GetObjectInfoTable()); @@ -518,7 +518,7 @@ void VulkanReplayConsumer::Process_vkCreateFence( StructPointerDecoder* pAllocator, HandlePointerDecoder* pFence) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkFenceCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -538,7 +538,7 @@ void VulkanReplayConsumer::Process_vkDestroyFence( format::HandleId fence, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkFence in_fence = MapHandle(fence, &VulkanObjectInfoTable::GetFenceInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -554,7 +554,7 @@ void VulkanReplayConsumer::Process_vkResetFences( uint32_t fenceCount, HandlePointerDecoder* pFences) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkFence* in_pFences = MapHandles(pFences, fenceCount, &VulkanObjectInfoTable::GetFenceInfo); @@ -568,7 +568,7 @@ void VulkanReplayConsumer::Process_vkGetFenceStatus( format::HandleId device, format::HandleId fence) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_fence = GetObjectInfoTable().GetFenceInfo(fence); @@ -585,7 +585,7 @@ void VulkanReplayConsumer::Process_vkWaitForFences( VkBool32 waitAll, uint64_t timeout) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapHandles(pFences, fenceCount, &VulkanObjectInfoTable::GetFenceInfo); @@ -601,7 +601,7 @@ void VulkanReplayConsumer::Process_vkCreateSemaphore( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSemaphore) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkSemaphoreCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -621,7 +621,7 @@ void VulkanReplayConsumer::Process_vkDestroySemaphore( format::HandleId semaphore, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSemaphore in_semaphore = MapHandle(semaphore, &VulkanObjectInfoTable::GetSemaphoreInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -638,7 +638,7 @@ void VulkanReplayConsumer::Process_vkCreateEvent( StructPointerDecoder* pAllocator, HandlePointerDecoder* pEvent) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkEventCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -658,7 +658,7 @@ void VulkanReplayConsumer::Process_vkDestroyEvent( format::HandleId event, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkEvent in_event = MapHandle(event, &VulkanObjectInfoTable::GetEventInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -673,7 +673,7 @@ void VulkanReplayConsumer::Process_vkGetEventStatus( format::HandleId device, format::HandleId event) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_event = GetObjectInfoTable().GetEventInfo(event); @@ -687,7 +687,7 @@ void VulkanReplayConsumer::Process_vkSetEvent( format::HandleId device, format::HandleId event) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkEvent in_event = MapHandle(event, &VulkanObjectInfoTable::GetEventInfo); @@ -701,7 +701,7 @@ void VulkanReplayConsumer::Process_vkResetEvent( format::HandleId device, format::HandleId event) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkEvent in_event = MapHandle(event, &VulkanObjectInfoTable::GetEventInfo); @@ -717,7 +717,7 @@ void VulkanReplayConsumer::Process_vkCreateQueryPool( StructPointerDecoder* pAllocator, HandlePointerDecoder* pQueryPool) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkQueryPoolCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -737,7 +737,7 @@ void VulkanReplayConsumer::Process_vkDestroyQueryPool( format::HandleId queryPool, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -758,7 +758,7 @@ void VulkanReplayConsumer::Process_vkGetQueryPoolResults( VkDeviceSize stride, VkQueryResultFlags flags) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_queryPool = GetObjectInfoTable().GetQueryPoolInfo(queryPool); if (!pData->IsNull()) { pData->AllocateOutputData(dataSize); } @@ -775,7 +775,7 @@ void VulkanReplayConsumer::Process_vkCreateBuffer( StructPointerDecoder* pAllocator, HandlePointerDecoder* pBuffer) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); if (!pBuffer->IsNull()) { pBuffer->SetHandleLength(1); } BufferInfo handle_info; @@ -794,7 +794,7 @@ void VulkanReplayConsumer::Process_vkDestroyBuffer( format::HandleId buffer, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_buffer = GetObjectInfoTable().GetBufferInfo(buffer); @@ -810,7 +810,7 @@ void VulkanReplayConsumer::Process_vkCreateBufferView( StructPointerDecoder* pAllocator, HandlePointerDecoder* pView) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkBufferViewCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -831,7 +831,7 @@ void VulkanReplayConsumer::Process_vkDestroyBufferView( format::HandleId bufferView, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkBufferView in_bufferView = MapHandle(bufferView, &VulkanObjectInfoTable::GetBufferViewInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -848,7 +848,7 @@ void VulkanReplayConsumer::Process_vkCreateImage( StructPointerDecoder* pAllocator, HandlePointerDecoder* pImage) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -869,7 +869,7 @@ void VulkanReplayConsumer::Process_vkDestroyImage( format::HandleId image, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_image = GetObjectInfoTable().GetImageInfo(image); @@ -884,7 +884,7 @@ void VulkanReplayConsumer::Process_vkGetImageSubresourceLayout( StructPointerDecoder* pSubresource, StructPointerDecoder* pLayout) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_image = GetObjectInfoTable().GetImageInfo(image); pLayout->IsNull() ? nullptr : pLayout->AllocateOutputData(1); @@ -900,7 +900,7 @@ void VulkanReplayConsumer::Process_vkCreateImageView( StructPointerDecoder* pAllocator, HandlePointerDecoder* pView) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -921,7 +921,7 @@ void VulkanReplayConsumer::Process_vkDestroyImageView( format::HandleId imageView, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkImageView in_imageView = MapHandle(imageView, &VulkanObjectInfoTable::GetImageViewInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -938,7 +938,7 @@ void VulkanReplayConsumer::Process_vkCreateShaderModule( StructPointerDecoder* pAllocator, HandlePointerDecoder* pShaderModule) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -959,7 +959,7 @@ void VulkanReplayConsumer::Process_vkDestroyShaderModule( format::HandleId shaderModule, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_shaderModule = GetObjectInfoTable().GetShaderModuleInfo(shaderModule); @@ -975,7 +975,7 @@ void VulkanReplayConsumer::Process_vkCreatePipelineCache( StructPointerDecoder* pAllocator, HandlePointerDecoder* pPipelineCache) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); if (!pPipelineCache->IsNull()) { pPipelineCache->SetHandleLength(1); } PipelineCacheInfo handle_info; @@ -994,7 +994,7 @@ void VulkanReplayConsumer::Process_vkDestroyPipelineCache( format::HandleId pipelineCache, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPipelineCache in_pipelineCache = MapHandle(pipelineCache, &VulkanObjectInfoTable::GetPipelineCacheInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -1011,7 +1011,7 @@ void VulkanReplayConsumer::Process_vkGetPipelineCacheData( PointerDecoder* pDataSize, PointerDecoder* pData) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_pipelineCache = GetObjectInfoTable().GetPipelineCacheInfo(pipelineCache); pDataSize->IsNull() ? nullptr : pDataSize->AllocateOutputData(1, GetOutputArrayCount("vkGetPipelineCacheData", returnValue, pipelineCache, kPipelineCacheArrayGetPipelineCacheData, pDataSize, pData, &VulkanObjectInfoTable::GetPipelineCacheInfo)); @@ -1031,7 +1031,7 @@ void VulkanReplayConsumer::Process_vkMergePipelineCaches( uint32_t srcCacheCount, HandlePointerDecoder* pSrcCaches) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPipelineCache in_dstCache = MapHandle(dstCache, &VulkanObjectInfoTable::GetPipelineCacheInfo); const VkPipelineCache* in_pSrcCaches = MapHandles(pSrcCaches, srcCacheCount, &VulkanObjectInfoTable::GetPipelineCacheInfo); @@ -1050,7 +1050,7 @@ void VulkanReplayConsumer::Process_vkCreateGraphicsPipelines( StructPointerDecoder* pAllocator, HandlePointerDecoder* pPipelines) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_pipelineCache = GetObjectInfoTable().GetPipelineCacheInfo(pipelineCache); @@ -1088,7 +1088,7 @@ void VulkanReplayConsumer::Process_vkCreateComputePipelines( StructPointerDecoder* pAllocator, HandlePointerDecoder* pPipelines) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_pipelineCache = GetObjectInfoTable().GetPipelineCacheInfo(pipelineCache); @@ -1122,7 +1122,7 @@ void VulkanReplayConsumer::Process_vkDestroyPipeline( format::HandleId pipeline, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_pipeline = GetObjectInfoTable().GetPipelineInfo(pipeline); @@ -1138,7 +1138,7 @@ void VulkanReplayConsumer::Process_vkCreatePipelineLayout( StructPointerDecoder* pAllocator, HandlePointerDecoder* pPipelineLayout) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkPipelineLayoutCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -1159,7 +1159,7 @@ void VulkanReplayConsumer::Process_vkDestroyPipelineLayout( format::HandleId pipelineLayout, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPipelineLayout in_pipelineLayout = MapHandle(pipelineLayout, &VulkanObjectInfoTable::GetPipelineLayoutInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -1176,7 +1176,7 @@ void VulkanReplayConsumer::Process_vkCreateSampler( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSampler) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkSamplerCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -1197,7 +1197,7 @@ void VulkanReplayConsumer::Process_vkDestroySampler( format::HandleId sampler, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSampler in_sampler = MapHandle(sampler, &VulkanObjectInfoTable::GetSamplerInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -1214,7 +1214,7 @@ void VulkanReplayConsumer::Process_vkCreateDescriptorSetLayout( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSetLayout) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -1235,7 +1235,7 @@ void VulkanReplayConsumer::Process_vkDestroyDescriptorSetLayout( format::HandleId descriptorSetLayout, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDescriptorSetLayout in_descriptorSetLayout = MapHandle(descriptorSetLayout, &VulkanObjectInfoTable::GetDescriptorSetLayoutInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -1252,7 +1252,7 @@ void VulkanReplayConsumer::Process_vkCreateDescriptorPool( StructPointerDecoder* pAllocator, HandlePointerDecoder* pDescriptorPool) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); if (!pDescriptorPool->IsNull()) { pDescriptorPool->SetHandleLength(1); } DescriptorPoolInfo handle_info; @@ -1271,7 +1271,7 @@ void VulkanReplayConsumer::Process_vkDestroyDescriptorPool( format::HandleId descriptorPool, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_descriptorPool = GetObjectInfoTable().GetDescriptorPoolInfo(descriptorPool); @@ -1286,7 +1286,7 @@ void VulkanReplayConsumer::Process_vkResetDescriptorPool( format::HandleId descriptorPool, VkDescriptorPoolResetFlags flags) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_descriptorPool = GetObjectInfoTable().GetDescriptorPoolInfo(descriptorPool); @@ -1301,7 +1301,7 @@ void VulkanReplayConsumer::Process_vkAllocateDescriptorSets( StructPointerDecoder* pAllocateInfo, HandlePointerDecoder* pDescriptorSets) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pAllocateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -1324,7 +1324,7 @@ void VulkanReplayConsumer::Process_vkFreeDescriptorSets( uint32_t descriptorSetCount, HandlePointerDecoder* pDescriptorSets) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDescriptorPool in_descriptorPool = MapHandle(descriptorPool, &VulkanObjectInfoTable::GetDescriptorPoolInfo); const VkDescriptorSet* in_pDescriptorSets = MapHandles(pDescriptorSets, descriptorSetCount, &VulkanObjectInfoTable::GetDescriptorSetInfo); @@ -1342,7 +1342,7 @@ void VulkanReplayConsumer::Process_vkUpdateDescriptorSets( uint32_t descriptorCopyCount, StructPointerDecoder* pDescriptorCopies) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructArrayHandles(pDescriptorWrites->GetMetaStructPointer(), pDescriptorWrites->GetLength(), GetObjectInfoTable()); @@ -1360,7 +1360,7 @@ void VulkanReplayConsumer::Process_vkCreateFramebuffer( StructPointerDecoder* pAllocator, HandlePointerDecoder* pFramebuffer) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -1381,7 +1381,7 @@ void VulkanReplayConsumer::Process_vkDestroyFramebuffer( format::HandleId framebuffer, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkFramebuffer in_framebuffer = MapHandle(framebuffer, &VulkanObjectInfoTable::GetFramebufferInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -1398,7 +1398,7 @@ void VulkanReplayConsumer::Process_vkCreateRenderPass( StructPointerDecoder* pAllocator, HandlePointerDecoder* pRenderPass) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); if (!pRenderPass->IsNull()) { pRenderPass->SetHandleLength(1); } RenderPassInfo handle_info; @@ -1417,7 +1417,7 @@ void VulkanReplayConsumer::Process_vkDestroyRenderPass( format::HandleId renderPass, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_renderPass = GetObjectInfoTable().GetRenderPassInfo(renderPass); @@ -1431,7 +1431,7 @@ void VulkanReplayConsumer::Process_vkGetRenderAreaGranularity( format::HandleId renderPass, StructPointerDecoder* pGranularity) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkRenderPass in_renderPass = MapHandle(renderPass, &VulkanObjectInfoTable::GetRenderPassInfo); VkExtent2D* out_pGranularity = pGranularity->IsNull() ? nullptr : pGranularity->AllocateOutputData(1); @@ -1447,7 +1447,7 @@ void VulkanReplayConsumer::Process_vkCreateCommandPool( StructPointerDecoder* pAllocator, HandlePointerDecoder* pCommandPool) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkCommandPoolCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -1467,7 +1467,7 @@ void VulkanReplayConsumer::Process_vkDestroyCommandPool( format::HandleId commandPool, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_commandPool = GetObjectInfoTable().GetCommandPoolInfo(commandPool); @@ -1482,7 +1482,7 @@ void VulkanReplayConsumer::Process_vkResetCommandPool( format::HandleId commandPool, VkCommandPoolResetFlags flags) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_commandPool = GetObjectInfoTable().GetCommandPoolInfo(commandPool); @@ -1497,7 +1497,7 @@ void VulkanReplayConsumer::Process_vkAllocateCommandBuffers( StructPointerDecoder* pAllocateInfo, HandlePointerDecoder* pCommandBuffers) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pAllocateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -1519,7 +1519,7 @@ void VulkanReplayConsumer::Process_vkFreeCommandBuffers( uint32_t commandBufferCount, HandlePointerDecoder* pCommandBuffers) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_commandPool = GetObjectInfoTable().GetCommandPoolInfo(commandPool); MapHandles(pCommandBuffers, commandBufferCount, &VulkanObjectInfoTable::GetCommandBufferInfo); @@ -1534,7 +1534,7 @@ void VulkanReplayConsumer::Process_vkBeginCommandBuffer( format::HandleId commandBuffer, StructPointerDecoder* pBeginInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_commandBuffer = GetObjectInfoTable().GetCommandBufferInfo(commandBuffer); MapStructHandles(pBeginInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -1548,7 +1548,7 @@ void VulkanReplayConsumer::Process_vkEndCommandBuffer( VkResult returnValue, format::HandleId commandBuffer) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkResult replay_result = GetDeviceTable(in_commandBuffer)->EndCommandBuffer(in_commandBuffer); @@ -1561,7 +1561,7 @@ void VulkanReplayConsumer::Process_vkResetCommandBuffer( format::HandleId commandBuffer, VkCommandBufferResetFlags flags) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_commandBuffer = GetObjectInfoTable().GetCommandBufferInfo(commandBuffer); VkResult replay_result = OverrideResetCommandBuffer(GetDeviceTable(in_commandBuffer->handle)->ResetCommandBuffer, returnValue, in_commandBuffer, flags); @@ -1574,7 +1574,7 @@ void VulkanReplayConsumer::Process_vkCmdBindPipeline( VkPipelineBindPoint pipelineBindPoint, format::HandleId pipeline) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkPipeline in_pipeline = MapHandle(pipeline, &VulkanObjectInfoTable::GetPipelineInfo); @@ -1593,7 +1593,7 @@ void VulkanReplayConsumer::Process_vkCmdSetViewport( uint32_t viewportCount, StructPointerDecoder* pViewports) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkViewport* in_pViewports = pViewports->GetPointer(); @@ -1612,7 +1612,7 @@ void VulkanReplayConsumer::Process_vkCmdSetScissor( uint32_t scissorCount, StructPointerDecoder* pScissors) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkRect2D* in_pScissors = pScissors->GetPointer(); @@ -1629,7 +1629,7 @@ void VulkanReplayConsumer::Process_vkCmdSetLineWidth( format::HandleId commandBuffer, float lineWidth) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetLineWidth(in_commandBuffer, lineWidth); @@ -1647,7 +1647,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthBias( float depthBiasClamp, float depthBiasSlopeFactor) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthBias(in_commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor); @@ -1663,7 +1663,7 @@ void VulkanReplayConsumer::Process_vkCmdSetBlendConstants( format::HandleId commandBuffer, PointerDecoder* blendConstants) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const float* in_blendConstants = blendConstants->GetPointer(); @@ -1681,7 +1681,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthBounds( float minDepthBounds, float maxDepthBounds) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthBounds(in_commandBuffer, minDepthBounds, maxDepthBounds); @@ -1698,7 +1698,7 @@ void VulkanReplayConsumer::Process_vkCmdSetStencilCompareMask( VkStencilFaceFlags faceMask, uint32_t compareMask) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetStencilCompareMask(in_commandBuffer, faceMask, compareMask); @@ -1715,7 +1715,7 @@ void VulkanReplayConsumer::Process_vkCmdSetStencilWriteMask( VkStencilFaceFlags faceMask, uint32_t writeMask) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetStencilWriteMask(in_commandBuffer, faceMask, writeMask); @@ -1732,7 +1732,7 @@ void VulkanReplayConsumer::Process_vkCmdSetStencilReference( VkStencilFaceFlags faceMask, uint32_t reference) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetStencilReference(in_commandBuffer, faceMask, reference); @@ -1754,7 +1754,7 @@ void VulkanReplayConsumer::Process_vkCmdBindDescriptorSets( uint32_t dynamicOffsetCount, PointerDecoder* pDynamicOffsets) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkPipelineLayout in_layout = MapHandle(layout, &VulkanObjectInfoTable::GetPipelineLayoutInfo); const VkDescriptorSet* in_pDescriptorSets = MapHandles(pDescriptorSets, descriptorSetCount, &VulkanObjectInfoTable::GetDescriptorSetInfo); @@ -1775,7 +1775,7 @@ void VulkanReplayConsumer::Process_vkCmdBindIndexBuffer( VkDeviceSize offset, VkIndexType indexType) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -1795,7 +1795,7 @@ void VulkanReplayConsumer::Process_vkCmdBindVertexBuffers( HandlePointerDecoder* pBuffers, PointerDecoder* pOffsets) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBuffer* in_pBuffers = MapHandles(pBuffers, bindingCount, &VulkanObjectInfoTable::GetBufferInfo); const VkDeviceSize* in_pOffsets = pOffsets->GetPointer(); @@ -1816,7 +1816,7 @@ void VulkanReplayConsumer::Process_vkCmdDraw( uint32_t firstVertex, uint32_t firstInstance) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdDraw(in_commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance); @@ -1836,7 +1836,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawIndexed( int32_t vertexOffset, uint32_t firstInstance) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdDrawIndexed(in_commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance); @@ -1855,7 +1855,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawIndirect( uint32_t drawCount, uint32_t stride) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -1875,7 +1875,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawIndexedIndirect( uint32_t drawCount, uint32_t stride) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -1894,7 +1894,7 @@ void VulkanReplayConsumer::Process_vkCmdDispatch( uint32_t groupCountY, uint32_t groupCountZ) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdDispatch(in_commandBuffer, groupCountX, groupCountY, groupCountZ); @@ -1911,7 +1911,7 @@ void VulkanReplayConsumer::Process_vkCmdDispatchIndirect( format::HandleId buffer, VkDeviceSize offset) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -1931,7 +1931,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyBuffer( uint32_t regionCount, StructPointerDecoder* pRegions) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_srcBuffer = MapHandle(srcBuffer, &VulkanObjectInfoTable::GetBufferInfo); VkBuffer in_dstBuffer = MapHandle(dstBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -1955,7 +1955,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyImage( uint32_t regionCount, StructPointerDecoder* pRegions) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkImage in_srcImage = MapHandle(srcImage, &VulkanObjectInfoTable::GetImageInfo); VkImage in_dstImage = MapHandle(dstImage, &VulkanObjectInfoTable::GetImageInfo); @@ -1980,7 +1980,7 @@ void VulkanReplayConsumer::Process_vkCmdBlitImage( StructPointerDecoder* pRegions, VkFilter filter) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkImage in_srcImage = MapHandle(srcImage, &VulkanObjectInfoTable::GetImageInfo); VkImage in_dstImage = MapHandle(dstImage, &VulkanObjectInfoTable::GetImageInfo); @@ -2003,7 +2003,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyBufferToImage( uint32_t regionCount, StructPointerDecoder* pRegions) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_srcBuffer = MapHandle(srcBuffer, &VulkanObjectInfoTable::GetBufferInfo); VkImage in_dstImage = MapHandle(dstImage, &VulkanObjectInfoTable::GetImageInfo); @@ -2026,7 +2026,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyImageToBuffer( uint32_t regionCount, StructPointerDecoder* pRegions) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkImage in_srcImage = MapHandle(srcImage, &VulkanObjectInfoTable::GetImageInfo); VkBuffer in_dstBuffer = MapHandle(dstBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -2048,7 +2048,7 @@ void VulkanReplayConsumer::Process_vkCmdUpdateBuffer( VkDeviceSize dataSize, PointerDecoder* pData) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_dstBuffer = MapHandle(dstBuffer, &VulkanObjectInfoTable::GetBufferInfo); const void* in_pData = pData->GetPointer(); @@ -2069,7 +2069,7 @@ void VulkanReplayConsumer::Process_vkCmdFillBuffer( VkDeviceSize size, uint32_t data) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_dstBuffer = MapHandle(dstBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -2090,7 +2090,7 @@ void VulkanReplayConsumer::Process_vkCmdClearColorImage( uint32_t rangeCount, StructPointerDecoder* pRanges) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkImage in_image = MapHandle(image, &VulkanObjectInfoTable::GetImageInfo); const VkClearColorValue* in_pColor = pColor->GetPointer(); @@ -2113,7 +2113,7 @@ void VulkanReplayConsumer::Process_vkCmdClearDepthStencilImage( uint32_t rangeCount, StructPointerDecoder* pRanges) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkImage in_image = MapHandle(image, &VulkanObjectInfoTable::GetImageInfo); const VkClearDepthStencilValue* in_pDepthStencil = pDepthStencil->GetPointer(); @@ -2135,7 +2135,7 @@ void VulkanReplayConsumer::Process_vkCmdClearAttachments( uint32_t rectCount, StructPointerDecoder* pRects) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkClearAttachment* in_pAttachments = pAttachments->GetPointer(); const VkClearRect* in_pRects = pRects->GetPointer(); @@ -2158,7 +2158,7 @@ void VulkanReplayConsumer::Process_vkCmdResolveImage( uint32_t regionCount, StructPointerDecoder* pRegions) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkImage in_srcImage = MapHandle(srcImage, &VulkanObjectInfoTable::GetImageInfo); VkImage in_dstImage = MapHandle(dstImage, &VulkanObjectInfoTable::GetImageInfo); @@ -2178,7 +2178,7 @@ void VulkanReplayConsumer::Process_vkCmdSetEvent( format::HandleId event, VkPipelineStageFlags stageMask) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkEvent in_event = MapHandle(event, &VulkanObjectInfoTable::GetEventInfo); @@ -2196,7 +2196,7 @@ void VulkanReplayConsumer::Process_vkCmdResetEvent( format::HandleId event, VkPipelineStageFlags stageMask) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkEvent in_event = MapHandle(event, &VulkanObjectInfoTable::GetEventInfo); @@ -2222,7 +2222,7 @@ void VulkanReplayConsumer::Process_vkCmdWaitEvents( uint32_t imageMemoryBarrierCount, StructPointerDecoder* pImageMemoryBarriers) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkEvent* in_pEvents = MapHandles(pEvents, eventCount, &VulkanObjectInfoTable::GetEventInfo); const VkMemoryBarrier* in_pMemoryBarriers = pMemoryBarriers->GetPointer(); @@ -2252,7 +2252,7 @@ void VulkanReplayConsumer::Process_vkCmdPipelineBarrier( uint32_t imageMemoryBarrierCount, StructPointerDecoder* pImageMemoryBarriers) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_commandBuffer = GetObjectInfoTable().GetCommandBufferInfo(commandBuffer); MapStructArrayHandles(pBufferMemoryBarriers->GetMetaStructPointer(), pBufferMemoryBarriers->GetLength(), GetObjectInfoTable()); @@ -2274,7 +2274,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginQuery( uint32_t query, VkQueryControlFlags flags) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -2292,7 +2292,7 @@ void VulkanReplayConsumer::Process_vkCmdEndQuery( format::HandleId queryPool, uint32_t query) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -2311,7 +2311,7 @@ void VulkanReplayConsumer::Process_vkCmdResetQueryPool( uint32_t firstQuery, uint32_t queryCount) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -2330,7 +2330,7 @@ void VulkanReplayConsumer::Process_vkCmdWriteTimestamp( format::HandleId queryPool, uint32_t query) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -2353,7 +2353,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyQueryPoolResults( VkDeviceSize stride, VkQueryResultFlags flags) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); VkBuffer in_dstBuffer = MapHandle(dstBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -2375,7 +2375,7 @@ void VulkanReplayConsumer::Process_vkCmdPushConstants( uint32_t size, PointerDecoder* pValues) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkPipelineLayout in_layout = MapHandle(layout, &VulkanObjectInfoTable::GetPipelineLayoutInfo); const void* in_pValues = pValues->GetPointer(); @@ -2394,7 +2394,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginRenderPass( StructPointerDecoder* pRenderPassBegin, VkSubpassContents contents) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_commandBuffer = GetObjectInfoTable().GetCommandBufferInfo(commandBuffer); MapStructHandles(pRenderPassBegin->GetMetaStructPointer(), GetObjectInfoTable()); @@ -2412,7 +2412,7 @@ void VulkanReplayConsumer::Process_vkCmdNextSubpass( format::HandleId commandBuffer, VkSubpassContents contents) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdNextSubpass(in_commandBuffer, contents); @@ -2427,7 +2427,7 @@ void VulkanReplayConsumer::Process_vkCmdEndRenderPass( const ApiCallInfo& call_info, format::HandleId commandBuffer) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdEndRenderPass(in_commandBuffer); @@ -2444,7 +2444,7 @@ void VulkanReplayConsumer::Process_vkCmdExecuteCommands( uint32_t commandBufferCount, HandlePointerDecoder* pCommandBuffers) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCommandBuffer* in_pCommandBuffers = MapHandles(pCommandBuffers, commandBufferCount, &VulkanObjectInfoTable::GetCommandBufferInfo); @@ -2463,7 +2463,7 @@ void VulkanReplayConsumer::Process_vkBindBufferMemory2( uint32_t bindInfoCount, StructPointerDecoder* pBindInfos) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructArrayHandles(pBindInfos->GetMetaStructPointer(), pBindInfos->GetLength(), GetObjectInfoTable()); @@ -2479,7 +2479,7 @@ void VulkanReplayConsumer::Process_vkBindImageMemory2( uint32_t bindInfoCount, StructPointerDecoder* pBindInfos) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructArrayHandles(pBindInfos->GetMetaStructPointer(), pBindInfos->GetLength(), GetObjectInfoTable()); @@ -2496,7 +2496,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceGroupPeerMemoryFeatures( uint32_t remoteDeviceIndex, PointerDecoder* pPeerMemoryFeatures) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPeerMemoryFeatureFlags* out_pPeerMemoryFeatures = pPeerMemoryFeatures->IsNull() ? nullptr : pPeerMemoryFeatures->AllocateOutputData(1, static_cast(0)); @@ -2508,7 +2508,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDeviceMask( format::HandleId commandBuffer, uint32_t deviceMask) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDeviceMask(in_commandBuffer, deviceMask); @@ -2529,7 +2529,7 @@ void VulkanReplayConsumer::Process_vkCmdDispatchBase( uint32_t groupCountY, uint32_t groupCountZ) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdDispatchBase(in_commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); @@ -2547,7 +2547,7 @@ void VulkanReplayConsumer::Process_vkEnumeratePhysicalDeviceGroups( PointerDecoder* pPhysicalDeviceGroupCount, StructPointerDecoder* pPhysicalDeviceGroupProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); pPhysicalDeviceGroupCount->IsNull() ? nullptr : pPhysicalDeviceGroupCount->AllocateOutputData(1, GetOutputArrayCount("vkEnumeratePhysicalDeviceGroups", returnValue, instance, kInstanceArrayEnumeratePhysicalDeviceGroups, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties, &VulkanObjectInfoTable::GetInstanceInfo)); SetStructArrayHandleLengths(pPhysicalDeviceGroupProperties->GetMetaStructPointer(), pPhysicalDeviceGroupProperties->GetLength()); @@ -2566,7 +2566,7 @@ void VulkanReplayConsumer::Process_vkGetImageMemoryRequirements2( StructPointerDecoder* pInfo, StructPointerDecoder* pMemoryRequirements) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkImageMemoryRequirementsInfo2* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -2582,7 +2582,7 @@ void VulkanReplayConsumer::Process_vkGetBufferMemoryRequirements2( StructPointerDecoder* pInfo, StructPointerDecoder* pMemoryRequirements) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkBufferMemoryRequirementsInfo2* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -2599,7 +2599,7 @@ void VulkanReplayConsumer::Process_vkGetImageSparseMemoryRequirements2( PointerDecoder* pSparseMemoryRequirementCount, StructPointerDecoder* pSparseMemoryRequirements) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkImageSparseMemoryRequirementsInfo2* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -2616,7 +2616,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceFeatures2( format::HandleId physicalDevice, StructPointerDecoder* pFeatures) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkPhysicalDeviceFeatures2* out_pFeatures = pFeatures->IsNull() ? nullptr : pFeatures->AllocateOutputData(1, { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, nullptr }); InitializeOutputStructPNext(pFeatures); @@ -2629,7 +2629,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceProperties2( format::HandleId physicalDevice, StructPointerDecoder* pProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, nullptr }); InitializeOutputStructPNext(pProperties); @@ -2643,7 +2643,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceFormatProperties2( VkFormat format, StructPointerDecoder* pFormatProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkFormatProperties2* out_pFormatProperties = pFormatProperties->IsNull() ? nullptr : pFormatProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2, nullptr }); InitializeOutputStructPNext(pFormatProperties); @@ -2658,7 +2658,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceImageFormatProperties2( StructPointerDecoder* pImageFormatInfo, StructPointerDecoder* pImageFormatProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceImageFormatInfo2* in_pImageFormatInfo = pImageFormatInfo->GetPointer(); VkImageFormatProperties2* out_pImageFormatProperties = pImageFormatProperties->IsNull() ? nullptr : pImageFormatProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2, nullptr }); @@ -2674,7 +2674,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceQueueFamilyProperties2( PointerDecoder* pQueueFamilyPropertyCount, StructPointerDecoder* pQueueFamilyProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pQueueFamilyPropertyCount = pQueueFamilyPropertyCount->IsNull() ? nullptr : pQueueFamilyPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceQueueFamilyProperties2", VK_SUCCESS, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceQueueFamilyProperties2, pQueueFamilyPropertyCount, pQueueFamilyProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkQueueFamilyProperties2* out_pQueueFamilyProperties = pQueueFamilyProperties->IsNull() ? nullptr : pQueueFamilyProperties->AllocateOutputData(*out_pQueueFamilyPropertyCount, VkQueueFamilyProperties2{ VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2, nullptr }); @@ -2689,7 +2689,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceMemoryProperties2( format::HandleId physicalDevice, StructPointerDecoder* pMemoryProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); pMemoryProperties->IsNull() ? nullptr : pMemoryProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2, nullptr }); InitializeOutputStructPNext(pMemoryProperties); @@ -2704,7 +2704,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSparseImageFormatPropertie PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceSparseImageFormatInfo2* in_pFormatInfo = pFormatInfo->GetPointer(); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceSparseImageFormatProperties2", VK_SUCCESS, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceSparseImageFormatProperties2, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); @@ -2721,7 +2721,7 @@ void VulkanReplayConsumer::Process_vkTrimCommandPool( format::HandleId commandPool, VkCommandPoolTrimFlags flags) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkCommandPool in_commandPool = MapHandle(commandPool, &VulkanObjectInfoTable::GetCommandPoolInfo); @@ -2734,7 +2734,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceQueue2( StructPointerDecoder* pQueueInfo, HandlePointerDecoder* pQueue) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); if (!pQueue->IsNull()) { pQueue->SetHandleLength(1); } QueueInfo handle_info; @@ -2754,7 +2754,7 @@ void VulkanReplayConsumer::Process_vkCreateSamplerYcbcrConversion( StructPointerDecoder* pAllocator, HandlePointerDecoder* pYcbcrConversion) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkSamplerYcbcrConversionCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -2774,7 +2774,7 @@ void VulkanReplayConsumer::Process_vkDestroySamplerYcbcrConversion( format::HandleId ycbcrConversion, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSamplerYcbcrConversion in_ycbcrConversion = MapHandle(ycbcrConversion, &VulkanObjectInfoTable::GetSamplerYcbcrConversionInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -2791,7 +2791,7 @@ void VulkanReplayConsumer::Process_vkCreateDescriptorUpdateTemplate( StructPointerDecoder* pAllocator, HandlePointerDecoder* pDescriptorUpdateTemplate) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -2812,7 +2812,7 @@ void VulkanReplayConsumer::Process_vkDestroyDescriptorUpdateTemplate( format::HandleId descriptorUpdateTemplate, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_descriptorUpdateTemplate = GetObjectInfoTable().GetDescriptorUpdateTemplateInfo(descriptorUpdateTemplate); @@ -2826,7 +2826,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceExternalBufferProperties( StructPointerDecoder* pExternalBufferInfo, StructPointerDecoder* pExternalBufferProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceExternalBufferInfo* in_pExternalBufferInfo = pExternalBufferInfo->GetPointer(); VkExternalBufferProperties* out_pExternalBufferProperties = pExternalBufferProperties->IsNull() ? nullptr : pExternalBufferProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES, nullptr }); @@ -2841,7 +2841,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceExternalFenceProperties( StructPointerDecoder* pExternalFenceInfo, StructPointerDecoder* pExternalFenceProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceExternalFenceInfo* in_pExternalFenceInfo = pExternalFenceInfo->GetPointer(); VkExternalFenceProperties* out_pExternalFenceProperties = pExternalFenceProperties->IsNull() ? nullptr : pExternalFenceProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES, nullptr }); @@ -2856,7 +2856,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceExternalSemaphorePropertie StructPointerDecoder* pExternalSemaphoreInfo, StructPointerDecoder* pExternalSemaphoreProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceExternalSemaphoreInfo* in_pExternalSemaphoreInfo = pExternalSemaphoreInfo->GetPointer(); VkExternalSemaphoreProperties* out_pExternalSemaphoreProperties = pExternalSemaphoreProperties->IsNull() ? nullptr : pExternalSemaphoreProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES, nullptr }); @@ -2871,7 +2871,7 @@ void VulkanReplayConsumer::Process_vkGetDescriptorSetLayoutSupport( StructPointerDecoder* pCreateInfo, StructPointerDecoder* pSupport) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDescriptorSetLayoutCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -2891,7 +2891,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawIndirectCount( uint32_t maxDrawCount, uint32_t stride) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); VkBuffer in_countBuffer = MapHandle(countBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -2914,7 +2914,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawIndexedIndirectCount( uint32_t maxDrawCount, uint32_t stride) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); VkBuffer in_countBuffer = MapHandle(countBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -2935,7 +2935,7 @@ void VulkanReplayConsumer::Process_vkCreateRenderPass2( StructPointerDecoder* pAllocator, HandlePointerDecoder* pRenderPass) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); if (!pRenderPass->IsNull()) { pRenderPass->SetHandleLength(1); } RenderPassInfo handle_info; @@ -2954,7 +2954,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginRenderPass2( StructPointerDecoder* pRenderPassBegin, StructPointerDecoder* pSubpassBeginInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_commandBuffer = GetObjectInfoTable().GetCommandBufferInfo(commandBuffer); MapStructHandles(pRenderPassBegin->GetMetaStructPointer(), GetObjectInfoTable()); @@ -2973,7 +2973,7 @@ void VulkanReplayConsumer::Process_vkCmdNextSubpass2( StructPointerDecoder* pSubpassBeginInfo, StructPointerDecoder* pSubpassEndInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkSubpassBeginInfo* in_pSubpassBeginInfo = pSubpassBeginInfo->GetPointer(); const VkSubpassEndInfo* in_pSubpassEndInfo = pSubpassEndInfo->GetPointer(); @@ -2991,7 +2991,7 @@ void VulkanReplayConsumer::Process_vkCmdEndRenderPass2( format::HandleId commandBuffer, StructPointerDecoder* pSubpassEndInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkSubpassEndInfo* in_pSubpassEndInfo = pSubpassEndInfo->GetPointer(); @@ -3010,7 +3010,7 @@ void VulkanReplayConsumer::Process_vkResetQueryPool( uint32_t firstQuery, uint32_t queryCount) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -3024,7 +3024,7 @@ void VulkanReplayConsumer::Process_vkGetSemaphoreCounterValue( format::HandleId semaphore, PointerDecoder* pValue) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSemaphore in_semaphore = MapHandle(semaphore, &VulkanObjectInfoTable::GetSemaphoreInfo); uint64_t* out_pValue = pValue->IsNull() ? nullptr : pValue->AllocateOutputData(1, static_cast(0)); @@ -3040,7 +3040,7 @@ void VulkanReplayConsumer::Process_vkWaitSemaphores( StructPointerDecoder* pWaitInfo, uint64_t timeout) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pWaitInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3055,7 +3055,7 @@ void VulkanReplayConsumer::Process_vkSignalSemaphore( format::HandleId device, StructPointerDecoder* pSignalInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkSemaphoreSignalInfo* in_pSignalInfo = pSignalInfo->GetPointer(); MapStructHandles(pSignalInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3070,7 +3070,7 @@ void VulkanReplayConsumer::Process_vkGetBufferDeviceAddress( format::HandleId device, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3084,7 +3084,7 @@ void VulkanReplayConsumer::Process_vkGetBufferOpaqueCaptureAddress( format::HandleId device, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkBufferDeviceAddressInfo* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3098,7 +3098,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceMemoryOpaqueCaptureAddress( format::HandleId device, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDeviceMemoryOpaqueCaptureAddressInfo* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3113,7 +3113,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceToolProperties( PointerDecoder* pToolCount, StructPointerDecoder* pToolProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); pToolCount->IsNull() ? nullptr : pToolCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceToolProperties", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceToolProperties, pToolCount, pToolProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); if (!pToolProperties->IsNull()) { pToolProperties->AllocateOutputData(*pToolCount->GetOutputPointer(), VkPhysicalDeviceToolProperties{ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES, nullptr }); } @@ -3132,7 +3132,7 @@ void VulkanReplayConsumer::Process_vkCreatePrivateDataSlot( StructPointerDecoder* pAllocator, HandlePointerDecoder* pPrivateDataSlot) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkPrivateDataSlotCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -3152,7 +3152,7 @@ void VulkanReplayConsumer::Process_vkDestroyPrivateDataSlot( format::HandleId privateDataSlot, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPrivateDataSlot in_privateDataSlot = MapHandle(privateDataSlot, &VulkanObjectInfoTable::GetPrivateDataSlotInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -3170,7 +3170,7 @@ void VulkanReplayConsumer::Process_vkSetPrivateData( format::HandleId privateDataSlot, uint64_t data) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); uint64_t in_objectHandle = MapHandle(objectHandle, objectType); VkPrivateDataSlot in_privateDataSlot = MapHandle(privateDataSlot, &VulkanObjectInfoTable::GetPrivateDataSlotInfo); @@ -3187,7 +3187,7 @@ void VulkanReplayConsumer::Process_vkGetPrivateData( format::HandleId privateDataSlot, PointerDecoder* pData) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); uint64_t in_objectHandle = MapHandle(objectHandle, objectType); VkPrivateDataSlot in_privateDataSlot = MapHandle(privateDataSlot, &VulkanObjectInfoTable::GetPrivateDataSlotInfo); @@ -3202,7 +3202,7 @@ void VulkanReplayConsumer::Process_vkCmdSetEvent2( format::HandleId event, StructPointerDecoder* pDependencyInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkEvent in_event = MapHandle(event, &VulkanObjectInfoTable::GetEventInfo); const VkDependencyInfo* in_pDependencyInfo = pDependencyInfo->GetPointer(); @@ -3222,7 +3222,7 @@ void VulkanReplayConsumer::Process_vkCmdResetEvent2( format::HandleId event, VkPipelineStageFlags2 stageMask) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkEvent in_event = MapHandle(event, &VulkanObjectInfoTable::GetEventInfo); @@ -3241,7 +3241,7 @@ void VulkanReplayConsumer::Process_vkCmdWaitEvents2( HandlePointerDecoder* pEvents, StructPointerDecoder* pDependencyInfos) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkEvent* in_pEvents = MapHandles(pEvents, eventCount, &VulkanObjectInfoTable::GetEventInfo); const VkDependencyInfo* in_pDependencyInfos = pDependencyInfos->GetPointer(); @@ -3260,7 +3260,7 @@ void VulkanReplayConsumer::Process_vkCmdPipelineBarrier2( format::HandleId commandBuffer, StructPointerDecoder* pDependencyInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_commandBuffer = GetObjectInfoTable().GetCommandBufferInfo(commandBuffer); MapStructHandles(pDependencyInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3280,7 +3280,7 @@ void VulkanReplayConsumer::Process_vkCmdWriteTimestamp2( format::HandleId queryPool, uint32_t query) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -3300,7 +3300,7 @@ void VulkanReplayConsumer::Process_vkQueueSubmit2( StructPointerDecoder* pSubmits, format::HandleId fence) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_queue = GetObjectInfoTable().GetQueueInfo(queue); MapStructArrayHandles(pSubmits->GetMetaStructPointer(), pSubmits->GetLength(), GetObjectInfoTable()); @@ -3315,7 +3315,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyBuffer2( format::HandleId commandBuffer, StructPointerDecoder* pCopyBufferInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyBufferInfo2* in_pCopyBufferInfo = pCopyBufferInfo->GetPointer(); MapStructHandles(pCopyBufferInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3333,7 +3333,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyImage2( format::HandleId commandBuffer, StructPointerDecoder* pCopyImageInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyImageInfo2* in_pCopyImageInfo = pCopyImageInfo->GetPointer(); MapStructHandles(pCopyImageInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3351,7 +3351,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyBufferToImage2( format::HandleId commandBuffer, StructPointerDecoder* pCopyBufferToImageInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyBufferToImageInfo2* in_pCopyBufferToImageInfo = pCopyBufferToImageInfo->GetPointer(); MapStructHandles(pCopyBufferToImageInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3369,7 +3369,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyImageToBuffer2( format::HandleId commandBuffer, StructPointerDecoder* pCopyImageToBufferInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyImageToBufferInfo2* in_pCopyImageToBufferInfo = pCopyImageToBufferInfo->GetPointer(); MapStructHandles(pCopyImageToBufferInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3387,7 +3387,7 @@ void VulkanReplayConsumer::Process_vkCmdBlitImage2( format::HandleId commandBuffer, StructPointerDecoder* pBlitImageInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBlitImageInfo2* in_pBlitImageInfo = pBlitImageInfo->GetPointer(); MapStructHandles(pBlitImageInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3405,7 +3405,7 @@ void VulkanReplayConsumer::Process_vkCmdResolveImage2( format::HandleId commandBuffer, StructPointerDecoder* pResolveImageInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkResolveImageInfo2* in_pResolveImageInfo = pResolveImageInfo->GetPointer(); MapStructHandles(pResolveImageInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3423,7 +3423,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginRendering( format::HandleId commandBuffer, StructPointerDecoder* pRenderingInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkRenderingInfo* in_pRenderingInfo = pRenderingInfo->GetPointer(); MapStructHandles(pRenderingInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3440,7 +3440,7 @@ void VulkanReplayConsumer::Process_vkCmdEndRendering( const ApiCallInfo& call_info, format::HandleId commandBuffer) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdEndRendering(in_commandBuffer); @@ -3456,7 +3456,7 @@ void VulkanReplayConsumer::Process_vkCmdSetCullMode( format::HandleId commandBuffer, VkCullModeFlags cullMode) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetCullMode(in_commandBuffer, cullMode); @@ -3472,7 +3472,7 @@ void VulkanReplayConsumer::Process_vkCmdSetFrontFace( format::HandleId commandBuffer, VkFrontFace frontFace) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetFrontFace(in_commandBuffer, frontFace); @@ -3488,7 +3488,7 @@ void VulkanReplayConsumer::Process_vkCmdSetPrimitiveTopology( format::HandleId commandBuffer, VkPrimitiveTopology primitiveTopology) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetPrimitiveTopology(in_commandBuffer, primitiveTopology); @@ -3505,7 +3505,7 @@ void VulkanReplayConsumer::Process_vkCmdSetViewportWithCount( uint32_t viewportCount, StructPointerDecoder* pViewports) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkViewport* in_pViewports = pViewports->GetPointer(); @@ -3523,7 +3523,7 @@ void VulkanReplayConsumer::Process_vkCmdSetScissorWithCount( uint32_t scissorCount, StructPointerDecoder* pScissors) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkRect2D* in_pScissors = pScissors->GetPointer(); @@ -3545,7 +3545,7 @@ void VulkanReplayConsumer::Process_vkCmdBindVertexBuffers2( PointerDecoder* pSizes, PointerDecoder* pStrides) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBuffer* in_pBuffers = MapHandles(pBuffers, bindingCount, &VulkanObjectInfoTable::GetBufferInfo); const VkDeviceSize* in_pOffsets = pOffsets->GetPointer(); @@ -3565,7 +3565,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthTestEnable( format::HandleId commandBuffer, VkBool32 depthTestEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthTestEnable(in_commandBuffer, depthTestEnable); @@ -3581,7 +3581,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthWriteEnable( format::HandleId commandBuffer, VkBool32 depthWriteEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthWriteEnable(in_commandBuffer, depthWriteEnable); @@ -3597,7 +3597,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthCompareOp( format::HandleId commandBuffer, VkCompareOp depthCompareOp) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthCompareOp(in_commandBuffer, depthCompareOp); @@ -3613,7 +3613,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthBoundsTestEnable( format::HandleId commandBuffer, VkBool32 depthBoundsTestEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthBoundsTestEnable(in_commandBuffer, depthBoundsTestEnable); @@ -3629,7 +3629,7 @@ void VulkanReplayConsumer::Process_vkCmdSetStencilTestEnable( format::HandleId commandBuffer, VkBool32 stencilTestEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetStencilTestEnable(in_commandBuffer, stencilTestEnable); @@ -3649,7 +3649,7 @@ void VulkanReplayConsumer::Process_vkCmdSetStencilOp( VkStencilOp depthFailOp, VkCompareOp compareOp) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetStencilOp(in_commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp); @@ -3665,7 +3665,7 @@ void VulkanReplayConsumer::Process_vkCmdSetRasterizerDiscardEnable( format::HandleId commandBuffer, VkBool32 rasterizerDiscardEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetRasterizerDiscardEnable(in_commandBuffer, rasterizerDiscardEnable); @@ -3681,7 +3681,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthBiasEnable( format::HandleId commandBuffer, VkBool32 depthBiasEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthBiasEnable(in_commandBuffer, depthBiasEnable); @@ -3697,7 +3697,7 @@ void VulkanReplayConsumer::Process_vkCmdSetPrimitiveRestartEnable( format::HandleId commandBuffer, VkBool32 primitiveRestartEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetPrimitiveRestartEnable(in_commandBuffer, primitiveRestartEnable); @@ -3714,7 +3714,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceBufferMemoryRequirements( StructPointerDecoder* pInfo, StructPointerDecoder* pMemoryRequirements) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDeviceBufferMemoryRequirements* in_pInfo = pInfo->GetPointer(); VkMemoryRequirements2* out_pMemoryRequirements = pMemoryRequirements->IsNull() ? nullptr : pMemoryRequirements->AllocateOutputData(1, { VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2, nullptr }); @@ -3729,7 +3729,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceImageMemoryRequirements( StructPointerDecoder* pInfo, StructPointerDecoder* pMemoryRequirements) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDeviceImageMemoryRequirements* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3746,7 +3746,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceImageSparseMemoryRequirements( PointerDecoder* pSparseMemoryRequirementCount, StructPointerDecoder* pSparseMemoryRequirements) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDeviceImageMemoryRequirements* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3764,7 +3764,7 @@ void VulkanReplayConsumer::Process_vkDestroySurfaceKHR( format::HandleId surface, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); auto in_surface = GetObjectInfoTable().GetSurfaceKHRInfo(surface); if (in_surface == nullptr || in_surface->surface_creation_skipped) { return; } @@ -3786,7 +3786,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSurfaceSupportKHR( GFXRECON_LOG_DEBUG("Skip vkGetPhysicalDeviceSurfaceSupportKHR for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkSurfaceKHR in_surface = MapHandle(surface, &VulkanObjectInfoTable::GetSurfaceKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(surface) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(surface)->surface_creation_skipped) { return; } @@ -3808,7 +3808,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSurfaceCapabilitiesKHR( GFXRECON_LOG_DEBUG("Skip vkGetPhysicalDeviceSurfaceCapabilitiesKHR for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); auto in_surface = GetObjectInfoTable().GetSurfaceKHRInfo(surface); if (in_surface == nullptr || in_surface->surface_creation_skipped) { return; } @@ -3831,7 +3831,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSurfaceFormatsKHR( GFXRECON_LOG_DEBUG("Skip vkGetPhysicalDeviceSurfaceFormatsKHR for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkSurfaceKHR in_surface = MapHandle(surface, &VulkanObjectInfoTable::GetSurfaceKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(surface) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(surface)->surface_creation_skipped) { return; } @@ -3857,7 +3857,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSurfacePresentModesKHR( GFXRECON_LOG_DEBUG("Skip vkGetPhysicalDeviceSurfacePresentModesKHR for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkSurfaceKHR in_surface = MapHandle(surface, &VulkanObjectInfoTable::GetSurfaceKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(surface) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(surface)->surface_creation_skipped) { return; } @@ -3878,7 +3878,7 @@ void VulkanReplayConsumer::Process_vkCreateSwapchainKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSwapchain) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3899,7 +3899,7 @@ void VulkanReplayConsumer::Process_vkDestroySwapchainKHR( format::HandleId swapchain, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_swapchain = GetObjectInfoTable().GetSwapchainKHRInfo(swapchain); @@ -3915,7 +3915,7 @@ void VulkanReplayConsumer::Process_vkGetSwapchainImagesKHR( PointerDecoder* pSwapchainImageCount, HandlePointerDecoder* pSwapchainImages) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_swapchain = GetObjectInfoTable().GetSwapchainKHRInfo(swapchain); pSwapchainImageCount->IsNull() ? nullptr : pSwapchainImageCount->AllocateOutputData(1, GetOutputArrayCount("vkGetSwapchainImagesKHR", returnValue, swapchain, kSwapchainKHRArrayGetSwapchainImagesKHR, pSwapchainImageCount, pSwapchainImages, &VulkanObjectInfoTable::GetSwapchainKHRInfo)); @@ -3941,7 +3941,7 @@ void VulkanReplayConsumer::Process_vkAcquireNextImageKHR( format::HandleId fence, PointerDecoder* pImageIndex) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_swapchain = GetObjectInfoTable().GetSwapchainKHRInfo(swapchain); auto in_semaphore = GetObjectInfoTable().GetSemaphoreInfo(semaphore); @@ -3958,7 +3958,7 @@ void VulkanReplayConsumer::Process_vkQueuePresentKHR( format::HandleId queue, StructPointerDecoder* pPresentInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_queue = GetObjectInfoTable().GetQueueInfo(queue); MapStructHandles(pPresentInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -3978,7 +3978,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceGroupPresentCapabilitiesKHR( GFXRECON_LOG_DEBUG("Skip vkGetDeviceGroupPresentCapabilitiesKHR for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeviceGroupPresentCapabilitiesKHR* out_pDeviceGroupPresentCapabilities = pDeviceGroupPresentCapabilities->IsNull() ? nullptr : pDeviceGroupPresentCapabilities->AllocateOutputData(1, { VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR, nullptr }); InitializeOutputStructPNext(pDeviceGroupPresentCapabilities); @@ -3999,7 +3999,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceGroupSurfacePresentModesKHR( GFXRECON_LOG_DEBUG("Skip vkGetDeviceGroupSurfacePresentModesKHR for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSurfaceKHR in_surface = MapHandle(surface, &VulkanObjectInfoTable::GetSurfaceKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(surface) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(surface)->surface_creation_skipped) { return; } @@ -4022,7 +4022,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDevicePresentRectanglesKHR( GFXRECON_LOG_DEBUG("Skip vkGetPhysicalDevicePresentRectanglesKHR for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkSurfaceKHR in_surface = MapHandle(surface, &VulkanObjectInfoTable::GetSurfaceKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(surface) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(surface)->surface_creation_skipped) { return; } @@ -4042,7 +4042,7 @@ void VulkanReplayConsumer::Process_vkAcquireNextImage2KHR( StructPointerDecoder* pAcquireInfo, PointerDecoder* pImageIndex) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pAcquireInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4059,7 +4059,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceDisplayPropertiesKHR( PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceDisplayPropertiesKHR", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceDisplayPropertiesKHR, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkDisplayPropertiesKHR* out_pProperties = pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(*out_pPropertyCount); @@ -4078,7 +4078,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceDisplayPlanePropertiesKHR( PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceDisplayPlanePropertiesKHR", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceDisplayPlanePropertiesKHR, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkDisplayPlanePropertiesKHR* out_pProperties = pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(*out_pPropertyCount); @@ -4098,7 +4098,7 @@ void VulkanReplayConsumer::Process_vkGetDisplayPlaneSupportedDisplaysKHR( PointerDecoder* pDisplayCount, HandlePointerDecoder* pDisplays) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pDisplayCount = pDisplayCount->IsNull() ? nullptr : pDisplayCount->AllocateOutputData(1, GetOutputArrayCount("vkGetDisplayPlaneSupportedDisplaysKHR", returnValue, physicalDevice, kPhysicalDeviceArrayGetDisplayPlaneSupportedDisplaysKHR, pDisplayCount, pDisplays, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); if (!pDisplays->IsNull()) { pDisplays->SetHandleLength(*out_pDisplayCount); } @@ -4120,7 +4120,7 @@ void VulkanReplayConsumer::Process_vkGetDisplayModePropertiesKHR( PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkDisplayKHR in_display = MapHandle(display, &VulkanObjectInfoTable::GetDisplayKHRInfo); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetDisplayModePropertiesKHR", returnValue, display, kDisplayKHRArrayGetDisplayModePropertiesKHR, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetDisplayKHRInfo)); @@ -4142,7 +4142,7 @@ void VulkanReplayConsumer::Process_vkCreateDisplayModeKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pMode) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkDisplayKHR in_display = MapHandle(display, &VulkanObjectInfoTable::GetDisplayKHRInfo); const VkDisplayModeCreateInfoKHR* in_pCreateInfo = pCreateInfo->GetPointer(); @@ -4165,7 +4165,7 @@ void VulkanReplayConsumer::Process_vkGetDisplayPlaneCapabilitiesKHR( uint32_t planeIndex, StructPointerDecoder* pCapabilities) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkDisplayModeKHR in_mode = MapHandle(mode, &VulkanObjectInfoTable::GetDisplayModeKHRInfo); VkDisplayPlaneCapabilitiesKHR* out_pCapabilities = pCapabilities->IsNull() ? nullptr : pCapabilities->AllocateOutputData(1); @@ -4182,7 +4182,7 @@ void VulkanReplayConsumer::Process_vkCreateDisplayPlaneSurfaceKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4206,7 +4206,7 @@ void VulkanReplayConsumer::Process_vkCreateSharedSwapchainsKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSwapchains) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructArrayHandles(pCreateInfos->GetMetaStructPointer(), pCreateInfos->GetLength(), GetObjectInfoTable()); @@ -4229,7 +4229,7 @@ void VulkanReplayConsumer::Process_vkCreateXlibSurfaceKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } SurfaceKHRInfo handle_info; @@ -4250,7 +4250,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceXlibPresentationSupportKHR uint64_t dpy, size_t visualID) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); Display* in_dpy = static_cast(PreProcessExternalObject(dpy, format::ApiCallId::ApiCall_vkGetPhysicalDeviceXlibPresentationSupportKHR, "vkGetPhysicalDeviceXlibPresentationSupportKHR")); @@ -4265,7 +4265,7 @@ void VulkanReplayConsumer::Process_vkCreateXcbSurfaceKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } SurfaceKHRInfo handle_info; @@ -4286,7 +4286,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceXcbPresentationSupportKHR( uint64_t connection, uint32_t visual_id) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); xcb_connection_t* in_connection = static_cast(PreProcessExternalObject(connection, format::ApiCallId::ApiCall_vkGetPhysicalDeviceXcbPresentationSupportKHR, "vkGetPhysicalDeviceXcbPresentationSupportKHR")); @@ -4301,7 +4301,7 @@ void VulkanReplayConsumer::Process_vkCreateWaylandSurfaceKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } SurfaceKHRInfo handle_info; @@ -4321,7 +4321,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceWaylandPresentationSupport uint32_t queueFamilyIndex, uint64_t display) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); struct wl_display* in_display = static_cast(PreProcessExternalObject(display, format::ApiCallId::ApiCall_vkGetPhysicalDeviceWaylandPresentationSupportKHR, "vkGetPhysicalDeviceWaylandPresentationSupportKHR")); @@ -4336,7 +4336,7 @@ void VulkanReplayConsumer::Process_vkCreateAndroidSurfaceKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } SurfaceKHRInfo handle_info; @@ -4357,7 +4357,7 @@ void VulkanReplayConsumer::Process_vkCreateWin32SurfaceKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } SurfaceKHRInfo handle_info; @@ -4376,7 +4376,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceWin32PresentationSupportKH format::HandleId physicalDevice, uint32_t queueFamilyIndex) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); OverrideGetPhysicalDeviceWin32PresentationSupportKHR(GetInstanceTable(in_physicalDevice->handle)->GetPhysicalDeviceWin32PresentationSupportKHR, in_physicalDevice, queueFamilyIndex); @@ -4389,7 +4389,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceVideoCapabilitiesKHR( StructPointerDecoder* pVideoProfile, StructPointerDecoder* pCapabilities) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkVideoProfileInfoKHR* in_pVideoProfile = pVideoProfile->GetPointer(); VkVideoCapabilitiesKHR* out_pCapabilities = pCapabilities->IsNull() ? nullptr : pCapabilities->AllocateOutputData(1, { VK_STRUCTURE_TYPE_VIDEO_CAPABILITIES_KHR, nullptr }); @@ -4407,7 +4407,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceVideoFormatPropertiesKHR( PointerDecoder* pVideoFormatPropertyCount, StructPointerDecoder* pVideoFormatProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceVideoFormatInfoKHR* in_pVideoFormatInfo = pVideoFormatInfo->GetPointer(); uint32_t* out_pVideoFormatPropertyCount = pVideoFormatPropertyCount->IsNull() ? nullptr : pVideoFormatPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceVideoFormatPropertiesKHR", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceVideoFormatPropertiesKHR, pVideoFormatPropertyCount, pVideoFormatProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); @@ -4427,7 +4427,7 @@ void VulkanReplayConsumer::Process_vkCreateVideoSessionKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pVideoSession) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); if (!pVideoSession->IsNull()) { pVideoSession->SetHandleLength(1); } VideoSessionKHRInfo handle_info; @@ -4446,7 +4446,7 @@ void VulkanReplayConsumer::Process_vkDestroyVideoSessionKHR( format::HandleId videoSession, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_videoSession = GetObjectInfoTable().GetVideoSessionKHRInfo(videoSession); @@ -4462,7 +4462,7 @@ void VulkanReplayConsumer::Process_vkGetVideoSessionMemoryRequirementsKHR( PointerDecoder* pMemoryRequirementsCount, StructPointerDecoder* pMemoryRequirements) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkVideoSessionKHR in_videoSession = MapHandle(videoSession, &VulkanObjectInfoTable::GetVideoSessionKHRInfo); uint32_t* out_pMemoryRequirementsCount = pMemoryRequirementsCount->IsNull() ? nullptr : pMemoryRequirementsCount->AllocateOutputData(1, GetOutputArrayCount("vkGetVideoSessionMemoryRequirementsKHR", returnValue, videoSession, kVideoSessionKHRArrayGetVideoSessionMemoryRequirementsKHR, pMemoryRequirementsCount, pMemoryRequirements, &VulkanObjectInfoTable::GetVideoSessionKHRInfo)); @@ -4482,7 +4482,7 @@ void VulkanReplayConsumer::Process_vkBindVideoSessionMemoryKHR( uint32_t bindSessionMemoryInfoCount, StructPointerDecoder* pBindSessionMemoryInfos) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_videoSession = GetObjectInfoTable().GetVideoSessionKHRInfo(videoSession); @@ -4500,7 +4500,7 @@ void VulkanReplayConsumer::Process_vkCreateVideoSessionParametersKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pVideoSessionParameters) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkVideoSessionParametersCreateInfoKHR* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4522,7 +4522,7 @@ void VulkanReplayConsumer::Process_vkUpdateVideoSessionParametersKHR( format::HandleId videoSessionParameters, StructPointerDecoder* pUpdateInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkVideoSessionParametersKHR in_videoSessionParameters = MapHandle(videoSessionParameters, &VulkanObjectInfoTable::GetVideoSessionParametersKHRInfo); const VkVideoSessionParametersUpdateInfoKHR* in_pUpdateInfo = pUpdateInfo->GetPointer(); @@ -4537,7 +4537,7 @@ void VulkanReplayConsumer::Process_vkDestroyVideoSessionParametersKHR( format::HandleId videoSessionParameters, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkVideoSessionParametersKHR in_videoSessionParameters = MapHandle(videoSessionParameters, &VulkanObjectInfoTable::GetVideoSessionParametersKHRInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -4551,7 +4551,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginVideoCodingKHR( format::HandleId commandBuffer, StructPointerDecoder* pBeginInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkVideoBeginCodingInfoKHR* in_pBeginInfo = pBeginInfo->GetPointer(); MapStructHandles(pBeginInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4569,7 +4569,7 @@ void VulkanReplayConsumer::Process_vkCmdEndVideoCodingKHR( format::HandleId commandBuffer, StructPointerDecoder* pEndCodingInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkVideoEndCodingInfoKHR* in_pEndCodingInfo = pEndCodingInfo->GetPointer(); @@ -4586,7 +4586,7 @@ void VulkanReplayConsumer::Process_vkCmdControlVideoCodingKHR( format::HandleId commandBuffer, StructPointerDecoder* pCodingControlInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkVideoCodingControlInfoKHR* in_pCodingControlInfo = pCodingControlInfo->GetPointer(); @@ -4603,7 +4603,7 @@ void VulkanReplayConsumer::Process_vkCmdDecodeVideoKHR( format::HandleId commandBuffer, StructPointerDecoder* pDecodeInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkVideoDecodeInfoKHR* in_pDecodeInfo = pDecodeInfo->GetPointer(); MapStructHandles(pDecodeInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4621,7 +4621,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginRenderingKHR( format::HandleId commandBuffer, StructPointerDecoder* pRenderingInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkRenderingInfo* in_pRenderingInfo = pRenderingInfo->GetPointer(); MapStructHandles(pRenderingInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4638,7 +4638,7 @@ void VulkanReplayConsumer::Process_vkCmdEndRenderingKHR( const ApiCallInfo& call_info, format::HandleId commandBuffer) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdEndRenderingKHR(in_commandBuffer); @@ -4654,7 +4654,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceFeatures2KHR( format::HandleId physicalDevice, StructPointerDecoder* pFeatures) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkPhysicalDeviceFeatures2* out_pFeatures = pFeatures->IsNull() ? nullptr : pFeatures->AllocateOutputData(1, { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, nullptr }); InitializeOutputStructPNext(pFeatures); @@ -4667,7 +4667,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceProperties2KHR( format::HandleId physicalDevice, StructPointerDecoder* pProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, nullptr }); InitializeOutputStructPNext(pProperties); @@ -4681,7 +4681,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceFormatProperties2KHR( VkFormat format, StructPointerDecoder* pFormatProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkFormatProperties2* out_pFormatProperties = pFormatProperties->IsNull() ? nullptr : pFormatProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2, nullptr }); InitializeOutputStructPNext(pFormatProperties); @@ -4696,7 +4696,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceImageFormatProperties2KHR( StructPointerDecoder* pImageFormatInfo, StructPointerDecoder* pImageFormatProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceImageFormatInfo2* in_pImageFormatInfo = pImageFormatInfo->GetPointer(); VkImageFormatProperties2* out_pImageFormatProperties = pImageFormatProperties->IsNull() ? nullptr : pImageFormatProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2, nullptr }); @@ -4712,7 +4712,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceQueueFamilyProperties2KHR( PointerDecoder* pQueueFamilyPropertyCount, StructPointerDecoder* pQueueFamilyProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pQueueFamilyPropertyCount = pQueueFamilyPropertyCount->IsNull() ? nullptr : pQueueFamilyPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceQueueFamilyProperties2KHR", VK_SUCCESS, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceQueueFamilyProperties2KHR, pQueueFamilyPropertyCount, pQueueFamilyProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkQueueFamilyProperties2* out_pQueueFamilyProperties = pQueueFamilyProperties->IsNull() ? nullptr : pQueueFamilyProperties->AllocateOutputData(*out_pQueueFamilyPropertyCount, VkQueueFamilyProperties2{ VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2, nullptr }); @@ -4727,7 +4727,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceMemoryProperties2KHR( format::HandleId physicalDevice, StructPointerDecoder* pMemoryProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); pMemoryProperties->IsNull() ? nullptr : pMemoryProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2, nullptr }); InitializeOutputStructPNext(pMemoryProperties); @@ -4742,7 +4742,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSparseImageFormatPropertie PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceSparseImageFormatInfo2* in_pFormatInfo = pFormatInfo->GetPointer(); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceSparseImageFormatProperties2KHR", VK_SUCCESS, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceSparseImageFormatProperties2KHR, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); @@ -4761,7 +4761,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceGroupPeerMemoryFeaturesKHR( uint32_t remoteDeviceIndex, PointerDecoder* pPeerMemoryFeatures) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPeerMemoryFeatureFlags* out_pPeerMemoryFeatures = pPeerMemoryFeatures->IsNull() ? nullptr : pPeerMemoryFeatures->AllocateOutputData(1, static_cast(0)); @@ -4773,7 +4773,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDeviceMaskKHR( format::HandleId commandBuffer, uint32_t deviceMask) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDeviceMaskKHR(in_commandBuffer, deviceMask); @@ -4794,7 +4794,7 @@ void VulkanReplayConsumer::Process_vkCmdDispatchBaseKHR( uint32_t groupCountY, uint32_t groupCountZ) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdDispatchBaseKHR(in_commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); @@ -4811,7 +4811,7 @@ void VulkanReplayConsumer::Process_vkTrimCommandPoolKHR( format::HandleId commandPool, VkCommandPoolTrimFlags flags) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkCommandPool in_commandPool = MapHandle(commandPool, &VulkanObjectInfoTable::GetCommandPoolInfo); @@ -4825,7 +4825,7 @@ void VulkanReplayConsumer::Process_vkEnumeratePhysicalDeviceGroupsKHR( PointerDecoder* pPhysicalDeviceGroupCount, StructPointerDecoder* pPhysicalDeviceGroupProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); pPhysicalDeviceGroupCount->IsNull() ? nullptr : pPhysicalDeviceGroupCount->AllocateOutputData(1, GetOutputArrayCount("vkEnumeratePhysicalDeviceGroupsKHR", returnValue, instance, kInstanceArrayEnumeratePhysicalDeviceGroupsKHR, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties, &VulkanObjectInfoTable::GetInstanceInfo)); SetStructArrayHandleLengths(pPhysicalDeviceGroupProperties->GetMetaStructPointer(), pPhysicalDeviceGroupProperties->GetLength()); @@ -4844,7 +4844,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceExternalBufferPropertiesKH StructPointerDecoder* pExternalBufferInfo, StructPointerDecoder* pExternalBufferProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceExternalBufferInfo* in_pExternalBufferInfo = pExternalBufferInfo->GetPointer(); VkExternalBufferProperties* out_pExternalBufferProperties = pExternalBufferProperties->IsNull() ? nullptr : pExternalBufferProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES, nullptr }); @@ -4860,7 +4860,7 @@ void VulkanReplayConsumer::Process_vkGetMemoryWin32HandleKHR( StructPointerDecoder* pGetWin32HandleInfo, PointerDecoder* pHandle) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMemoryGetWin32HandleInfoKHR* in_pGetWin32HandleInfo = pGetWin32HandleInfo->GetPointer(); MapStructHandles(pGetWin32HandleInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4880,7 +4880,7 @@ void VulkanReplayConsumer::Process_vkGetMemoryWin32HandlePropertiesKHR( uint64_t handle, StructPointerDecoder* pMemoryWin32HandleProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); HANDLE in_handle = static_cast(PreProcessExternalObject(handle, format::ApiCallId::ApiCall_vkGetMemoryWin32HandlePropertiesKHR, "vkGetMemoryWin32HandlePropertiesKHR")); VkMemoryWin32HandlePropertiesKHR* out_pMemoryWin32HandleProperties = pMemoryWin32HandleProperties->IsNull() ? nullptr : pMemoryWin32HandleProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR, nullptr }); @@ -4897,7 +4897,7 @@ void VulkanReplayConsumer::Process_vkGetMemoryFdKHR( StructPointerDecoder* pGetFdInfo, PointerDecoder* pFd) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMemoryGetFdInfoKHR* in_pGetFdInfo = pGetFdInfo->GetPointer(); MapStructHandles(pGetFdInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4915,7 +4915,7 @@ void VulkanReplayConsumer::Process_vkGetMemoryFdPropertiesKHR( int fd, StructPointerDecoder* pMemoryFdProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkMemoryFdPropertiesKHR* out_pMemoryFdProperties = pMemoryFdProperties->IsNull() ? nullptr : pMemoryFdProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR, nullptr }); InitializeOutputStructPNext(pMemoryFdProperties); @@ -4930,7 +4930,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceExternalSemaphorePropertie StructPointerDecoder* pExternalSemaphoreInfo, StructPointerDecoder* pExternalSemaphoreProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceExternalSemaphoreInfo* in_pExternalSemaphoreInfo = pExternalSemaphoreInfo->GetPointer(); VkExternalSemaphoreProperties* out_pExternalSemaphoreProperties = pExternalSemaphoreProperties->IsNull() ? nullptr : pExternalSemaphoreProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES, nullptr }); @@ -4945,7 +4945,7 @@ void VulkanReplayConsumer::Process_vkImportSemaphoreWin32HandleKHR( format::HandleId device, StructPointerDecoder* pImportSemaphoreWin32HandleInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pImportSemaphoreWin32HandleInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4961,7 +4961,7 @@ void VulkanReplayConsumer::Process_vkGetSemaphoreWin32HandleKHR( StructPointerDecoder* pGetWin32HandleInfo, PointerDecoder* pHandle) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkSemaphoreGetWin32HandleInfoKHR* in_pGetWin32HandleInfo = pGetWin32HandleInfo->GetPointer(); MapStructHandles(pGetWin32HandleInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4979,7 +4979,7 @@ void VulkanReplayConsumer::Process_vkImportSemaphoreFdKHR( format::HandleId device, StructPointerDecoder* pImportSemaphoreFdInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pImportSemaphoreFdInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -4995,7 +4995,7 @@ void VulkanReplayConsumer::Process_vkGetSemaphoreFdKHR( StructPointerDecoder* pGetFdInfo, PointerDecoder* pFd) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pGetFdInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5014,7 +5014,7 @@ void VulkanReplayConsumer::Process_vkCmdPushDescriptorSetKHR( uint32_t descriptorWriteCount, StructPointerDecoder* pDescriptorWrites) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkPipelineLayout in_layout = MapHandle(layout, &VulkanObjectInfoTable::GetPipelineLayoutInfo); const VkWriteDescriptorSet* in_pDescriptorWrites = pDescriptorWrites->GetPointer(); @@ -5036,7 +5036,7 @@ void VulkanReplayConsumer::Process_vkCreateDescriptorUpdateTemplateKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pDescriptorUpdateTemplate) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5057,7 +5057,7 @@ void VulkanReplayConsumer::Process_vkDestroyDescriptorUpdateTemplateKHR( format::HandleId descriptorUpdateTemplate, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_descriptorUpdateTemplate = GetObjectInfoTable().GetDescriptorUpdateTemplateInfo(descriptorUpdateTemplate); @@ -5073,7 +5073,7 @@ void VulkanReplayConsumer::Process_vkCreateRenderPass2KHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pRenderPass) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); if (!pRenderPass->IsNull()) { pRenderPass->SetHandleLength(1); } RenderPassInfo handle_info; @@ -5092,7 +5092,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginRenderPass2KHR( StructPointerDecoder* pRenderPassBegin, StructPointerDecoder* pSubpassBeginInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_commandBuffer = GetObjectInfoTable().GetCommandBufferInfo(commandBuffer); MapStructHandles(pRenderPassBegin->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5111,7 +5111,7 @@ void VulkanReplayConsumer::Process_vkCmdNextSubpass2KHR( StructPointerDecoder* pSubpassBeginInfo, StructPointerDecoder* pSubpassEndInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkSubpassBeginInfo* in_pSubpassBeginInfo = pSubpassBeginInfo->GetPointer(); const VkSubpassEndInfo* in_pSubpassEndInfo = pSubpassEndInfo->GetPointer(); @@ -5129,7 +5129,7 @@ void VulkanReplayConsumer::Process_vkCmdEndRenderPass2KHR( format::HandleId commandBuffer, StructPointerDecoder* pSubpassEndInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkSubpassEndInfo* in_pSubpassEndInfo = pSubpassEndInfo->GetPointer(); @@ -5152,7 +5152,7 @@ void VulkanReplayConsumer::Process_vkGetSwapchainStatusKHR( GFXRECON_LOG_DEBUG("Skip vkGetSwapchainStatusKHR for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapchain = MapHandle(swapchain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id)->surface_creation_skipped) { return; } @@ -5167,7 +5167,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceExternalFencePropertiesKHR StructPointerDecoder* pExternalFenceInfo, StructPointerDecoder* pExternalFenceProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceExternalFenceInfo* in_pExternalFenceInfo = pExternalFenceInfo->GetPointer(); VkExternalFenceProperties* out_pExternalFenceProperties = pExternalFenceProperties->IsNull() ? nullptr : pExternalFenceProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES, nullptr }); @@ -5182,7 +5182,7 @@ void VulkanReplayConsumer::Process_vkImportFenceWin32HandleKHR( format::HandleId device, StructPointerDecoder* pImportFenceWin32HandleInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkImportFenceWin32HandleInfoKHR* in_pImportFenceWin32HandleInfo = pImportFenceWin32HandleInfo->GetPointer(); MapStructHandles(pImportFenceWin32HandleInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5198,7 +5198,7 @@ void VulkanReplayConsumer::Process_vkGetFenceWin32HandleKHR( StructPointerDecoder* pGetWin32HandleInfo, PointerDecoder* pHandle) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkFenceGetWin32HandleInfoKHR* in_pGetWin32HandleInfo = pGetWin32HandleInfo->GetPointer(); MapStructHandles(pGetWin32HandleInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5216,7 +5216,7 @@ void VulkanReplayConsumer::Process_vkImportFenceFdKHR( format::HandleId device, StructPointerDecoder* pImportFenceFdInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkImportFenceFdInfoKHR* in_pImportFenceFdInfo = pImportFenceFdInfo->GetPointer(); MapStructHandles(pImportFenceFdInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5232,7 +5232,7 @@ void VulkanReplayConsumer::Process_vkGetFenceFdKHR( StructPointerDecoder* pGetFdInfo, PointerDecoder* pFd) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkFenceGetFdInfoKHR* in_pGetFdInfo = pGetFdInfo->GetPointer(); MapStructHandles(pGetFdInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5251,7 +5251,7 @@ void VulkanReplayConsumer::Process_vkEnumeratePhysicalDeviceQueueFamilyPerforman StructPointerDecoder* pCounters, StructPointerDecoder* pCounterDescriptions) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pCounterCount = pCounterCount->IsNull() ? nullptr : pCounterCount->AllocateOutputData(1, GetOutputArrayCount("vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR", returnValue, physicalDevice, kPhysicalDeviceArrayEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR, pCounterCount, pCounterDescriptions, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkPerformanceCounterKHR* out_pCounters = pCounters->IsNull() ? nullptr : pCounters->AllocateOutputData(*out_pCounterCount, VkPerformanceCounterKHR{ VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR, nullptr }); @@ -5270,7 +5270,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceQueueFamilyPerformanceQuer StructPointerDecoder* pPerformanceQueryCreateInfo, PointerDecoder* pNumPasses) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkQueryPoolPerformanceCreateInfoKHR* in_pPerformanceQueryCreateInfo = pPerformanceQueryCreateInfo->GetPointer(); uint32_t* out_pNumPasses = pNumPasses->IsNull() ? nullptr : pNumPasses->AllocateOutputData(1, static_cast(0)); @@ -5284,7 +5284,7 @@ void VulkanReplayConsumer::Process_vkAcquireProfilingLockKHR( format::HandleId device, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); VkResult replay_result = OverrideAcquireProfilingLockKHR(GetDeviceTable(in_device->handle)->AcquireProfilingLockKHR, returnValue, in_device, pInfo); @@ -5295,7 +5295,7 @@ void VulkanReplayConsumer::Process_vkReleaseProfilingLockKHR( const ApiCallInfo& call_info, format::HandleId device) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); GetDeviceTable(in_device)->ReleaseProfilingLockKHR(in_device); @@ -5313,7 +5313,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSurfaceCapabilities2KHR( GFXRECON_LOG_DEBUG("Skip vkGetPhysicalDeviceSurfaceCapabilities2KHR for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); if (pSurfaceInfo->GetPointer()->surface == VK_NULL_HANDLE) { return; } @@ -5340,7 +5340,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSurfaceFormats2KHR( GFXRECON_LOG_DEBUG("Skip vkGetPhysicalDeviceSurfaceFormats2KHR for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceSurfaceInfo2KHR* in_pSurfaceInfo = pSurfaceInfo->GetPointer(); if (pSurfaceInfo->GetPointer()->surface == VK_NULL_HANDLE) { return; } @@ -5363,7 +5363,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceDisplayProperties2KHR( PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceDisplayProperties2KHR", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceDisplayProperties2KHR, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkDisplayProperties2KHR* out_pProperties = pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(*out_pPropertyCount, VkDisplayProperties2KHR{ VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR, nullptr }); @@ -5382,7 +5382,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceDisplayPlaneProperties2KHR PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceDisplayPlaneProperties2KHR", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceDisplayPlaneProperties2KHR, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkDisplayPlaneProperties2KHR* out_pProperties = pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(*out_pPropertyCount, VkDisplayPlaneProperties2KHR{ VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR, nullptr }); @@ -5402,7 +5402,7 @@ void VulkanReplayConsumer::Process_vkGetDisplayModeProperties2KHR( PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkDisplayKHR in_display = MapHandle(display, &VulkanObjectInfoTable::GetDisplayKHRInfo); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetDisplayModeProperties2KHR", returnValue, display, kDisplayKHRArrayGetDisplayModeProperties2KHR, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetDisplayKHRInfo)); @@ -5422,7 +5422,7 @@ void VulkanReplayConsumer::Process_vkGetDisplayPlaneCapabilities2KHR( StructPointerDecoder* pDisplayPlaneInfo, StructPointerDecoder* pCapabilities) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkDisplayPlaneInfo2KHR* in_pDisplayPlaneInfo = pDisplayPlaneInfo->GetPointer(); MapStructHandles(pDisplayPlaneInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5439,7 +5439,7 @@ void VulkanReplayConsumer::Process_vkGetImageMemoryRequirements2KHR( StructPointerDecoder* pInfo, StructPointerDecoder* pMemoryRequirements) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkImageMemoryRequirementsInfo2* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5455,7 +5455,7 @@ void VulkanReplayConsumer::Process_vkGetBufferMemoryRequirements2KHR( StructPointerDecoder* pInfo, StructPointerDecoder* pMemoryRequirements) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkBufferMemoryRequirementsInfo2* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5472,7 +5472,7 @@ void VulkanReplayConsumer::Process_vkGetImageSparseMemoryRequirements2KHR( PointerDecoder* pSparseMemoryRequirementCount, StructPointerDecoder* pSparseMemoryRequirements) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkImageSparseMemoryRequirementsInfo2* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5492,7 +5492,7 @@ void VulkanReplayConsumer::Process_vkCreateSamplerYcbcrConversionKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pYcbcrConversion) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkSamplerYcbcrConversionCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -5512,7 +5512,7 @@ void VulkanReplayConsumer::Process_vkDestroySamplerYcbcrConversionKHR( format::HandleId ycbcrConversion, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSamplerYcbcrConversion in_ycbcrConversion = MapHandle(ycbcrConversion, &VulkanObjectInfoTable::GetSamplerYcbcrConversionInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -5528,7 +5528,7 @@ void VulkanReplayConsumer::Process_vkBindBufferMemory2KHR( uint32_t bindInfoCount, StructPointerDecoder* pBindInfos) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructArrayHandles(pBindInfos->GetMetaStructPointer(), pBindInfos->GetLength(), GetObjectInfoTable()); @@ -5544,7 +5544,7 @@ void VulkanReplayConsumer::Process_vkBindImageMemory2KHR( uint32_t bindInfoCount, StructPointerDecoder* pBindInfos) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructArrayHandles(pBindInfos->GetMetaStructPointer(), pBindInfos->GetLength(), GetObjectInfoTable()); @@ -5559,7 +5559,7 @@ void VulkanReplayConsumer::Process_vkGetDescriptorSetLayoutSupportKHR( StructPointerDecoder* pCreateInfo, StructPointerDecoder* pSupport) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDescriptorSetLayoutCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5579,7 +5579,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawIndirectCountKHR( uint32_t maxDrawCount, uint32_t stride) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); VkBuffer in_countBuffer = MapHandle(countBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -5602,7 +5602,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawIndexedIndirectCountKHR( uint32_t maxDrawCount, uint32_t stride) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); VkBuffer in_countBuffer = MapHandle(countBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -5622,7 +5622,7 @@ void VulkanReplayConsumer::Process_vkGetSemaphoreCounterValueKHR( format::HandleId semaphore, PointerDecoder* pValue) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSemaphore in_semaphore = MapHandle(semaphore, &VulkanObjectInfoTable::GetSemaphoreInfo); uint64_t* out_pValue = pValue->IsNull() ? nullptr : pValue->AllocateOutputData(1, static_cast(0)); @@ -5638,7 +5638,7 @@ void VulkanReplayConsumer::Process_vkWaitSemaphoresKHR( StructPointerDecoder* pWaitInfo, uint64_t timeout) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkSemaphoreWaitInfo* in_pWaitInfo = pWaitInfo->GetPointer(); MapStructHandles(pWaitInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5653,7 +5653,7 @@ void VulkanReplayConsumer::Process_vkSignalSemaphoreKHR( format::HandleId device, StructPointerDecoder* pSignalInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkSemaphoreSignalInfo* in_pSignalInfo = pSignalInfo->GetPointer(); MapStructHandles(pSignalInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5669,7 +5669,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceFragmentShadingRatesKHR( PointerDecoder* pFragmentShadingRateCount, StructPointerDecoder* pFragmentShadingRates) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pFragmentShadingRateCount = pFragmentShadingRateCount->IsNull() ? nullptr : pFragmentShadingRateCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceFragmentShadingRatesKHR", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceFragmentShadingRatesKHR, pFragmentShadingRateCount, pFragmentShadingRates, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkPhysicalDeviceFragmentShadingRateKHR* out_pFragmentShadingRates = pFragmentShadingRates->IsNull() ? nullptr : pFragmentShadingRates->AllocateOutputData(*out_pFragmentShadingRateCount, VkPhysicalDeviceFragmentShadingRateKHR{ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR, nullptr }); @@ -5686,7 +5686,7 @@ void VulkanReplayConsumer::Process_vkCmdSetFragmentShadingRateKHR( StructPointerDecoder* pFragmentSize, PointerDecoder* combinerOps) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkExtent2D* in_pFragmentSize = pFragmentSize->GetPointer(); const VkFragmentShadingRateCombinerOpKHR* in_combinerOps = combinerOps->GetPointer(); @@ -5704,7 +5704,7 @@ void VulkanReplayConsumer::Process_vkCmdSetRenderingAttachmentLocationsKHR( format::HandleId commandBuffer, StructPointerDecoder* pLocationInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkRenderingAttachmentLocationInfoKHR* in_pLocationInfo = pLocationInfo->GetPointer(); @@ -5721,7 +5721,7 @@ void VulkanReplayConsumer::Process_vkCmdSetRenderingInputAttachmentIndicesKHR( format::HandleId commandBuffer, StructPointerDecoder* pInputAttachmentIndexInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkRenderingInputAttachmentIndexInfoKHR* in_pInputAttachmentIndexInfo = pInputAttachmentIndexInfo->GetPointer(); @@ -5746,7 +5746,7 @@ void VulkanReplayConsumer::Process_vkWaitForPresentKHR( GFXRECON_LOG_DEBUG("Skip vkWaitForPresentKHR for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_swapchain = GetObjectInfoTable().GetSwapchainKHRInfo(swapchain); @@ -5760,7 +5760,7 @@ void VulkanReplayConsumer::Process_vkGetBufferDeviceAddressKHR( format::HandleId device, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5774,7 +5774,7 @@ void VulkanReplayConsumer::Process_vkGetBufferOpaqueCaptureAddressKHR( format::HandleId device, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkBufferDeviceAddressInfo* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5788,7 +5788,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceMemoryOpaqueCaptureAddressKHR( format::HandleId device, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDeviceMemoryOpaqueCaptureAddressInfo* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5803,7 +5803,7 @@ void VulkanReplayConsumer::Process_vkCreateDeferredOperationKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pDeferredOperation) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); if (!pDeferredOperation->IsNull()) { pDeferredOperation->SetHandleLength(1); } @@ -5822,7 +5822,7 @@ void VulkanReplayConsumer::Process_vkDestroyDeferredOperationKHR( format::HandleId operation, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeferredOperationKHR in_operation = MapHandle(operation, &VulkanObjectInfoTable::GetDeferredOperationKHRInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -5837,7 +5837,7 @@ void VulkanReplayConsumer::Process_vkGetDeferredOperationMaxConcurrencyKHR( format::HandleId device, format::HandleId operation) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeferredOperationKHR in_operation = MapHandle(operation, &VulkanObjectInfoTable::GetDeferredOperationKHRInfo); @@ -5850,7 +5850,7 @@ void VulkanReplayConsumer::Process_vkGetDeferredOperationResultKHR( format::HandleId device, format::HandleId operation) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeferredOperationKHR in_operation = MapHandle(operation, &VulkanObjectInfoTable::GetDeferredOperationKHRInfo); @@ -5864,7 +5864,7 @@ void VulkanReplayConsumer::Process_vkDeferredOperationJoinKHR( format::HandleId device, format::HandleId operation) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_operation = GetObjectInfoTable().GetDeferredOperationKHRInfo(operation); @@ -5880,7 +5880,7 @@ void VulkanReplayConsumer::Process_vkGetPipelineExecutablePropertiesKHR( PointerDecoder* pExecutableCount, StructPointerDecoder* pProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkPipelineInfoKHR* in_pPipelineInfo = pPipelineInfo->GetPointer(); MapStructHandles(pPipelineInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5901,7 +5901,7 @@ void VulkanReplayConsumer::Process_vkGetPipelineExecutableStatisticsKHR( PointerDecoder* pStatisticCount, StructPointerDecoder* pStatistics) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkPipelineExecutableInfoKHR* in_pExecutableInfo = pExecutableInfo->GetPointer(); MapStructHandles(pExecutableInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5922,7 +5922,7 @@ void VulkanReplayConsumer::Process_vkGetPipelineExecutableInternalRepresentation PointerDecoder* pInternalRepresentationCount, StructPointerDecoder* pInternalRepresentations) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkPipelineExecutableInfoKHR* in_pExecutableInfo = pExecutableInfo->GetPointer(); MapStructHandles(pExecutableInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5942,7 +5942,7 @@ void VulkanReplayConsumer::Process_vkMapMemory2KHR( StructPointerDecoder* pMemoryMapInfo, PointerDecoder* ppData) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMemoryMapInfoKHR* in_pMemoryMapInfo = pMemoryMapInfo->GetPointer(); MapStructHandles(pMemoryMapInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5960,7 +5960,7 @@ void VulkanReplayConsumer::Process_vkUnmapMemory2KHR( format::HandleId device, StructPointerDecoder* pMemoryUnmapInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMemoryUnmapInfoKHR* in_pMemoryUnmapInfo = pMemoryUnmapInfo->GetPointer(); MapStructHandles(pMemoryUnmapInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -5976,7 +5976,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceVideoEncodeQualityLevelPro StructPointerDecoder* pQualityLevelInfo, StructPointerDecoder* pQualityLevelProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* in_pQualityLevelInfo = pQualityLevelInfo->GetPointer(); VkVideoEncodeQualityLevelPropertiesKHR* out_pQualityLevelProperties = pQualityLevelProperties->IsNull() ? nullptr : pQualityLevelProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_PROPERTIES_KHR, nullptr }); @@ -5995,7 +5995,7 @@ void VulkanReplayConsumer::Process_vkGetEncodedVideoSessionParametersKHR( PointerDecoder* pDataSize, PointerDecoder* pData) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkVideoEncodeSessionParametersGetInfoKHR* in_pVideoSessionParametersInfo = pVideoSessionParametersInfo->GetPointer(); MapStructHandles(pVideoSessionParametersInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6015,7 +6015,7 @@ void VulkanReplayConsumer::Process_vkCmdEncodeVideoKHR( format::HandleId commandBuffer, StructPointerDecoder* pEncodeInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkVideoEncodeInfoKHR* in_pEncodeInfo = pEncodeInfo->GetPointer(); MapStructHandles(pEncodeInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6034,7 +6034,7 @@ void VulkanReplayConsumer::Process_vkCmdSetEvent2KHR( format::HandleId event, StructPointerDecoder* pDependencyInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkEvent in_event = MapHandle(event, &VulkanObjectInfoTable::GetEventInfo); const VkDependencyInfo* in_pDependencyInfo = pDependencyInfo->GetPointer(); @@ -6054,7 +6054,7 @@ void VulkanReplayConsumer::Process_vkCmdResetEvent2KHR( format::HandleId event, VkPipelineStageFlags2 stageMask) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkEvent in_event = MapHandle(event, &VulkanObjectInfoTable::GetEventInfo); @@ -6073,7 +6073,7 @@ void VulkanReplayConsumer::Process_vkCmdWaitEvents2KHR( HandlePointerDecoder* pEvents, StructPointerDecoder* pDependencyInfos) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkEvent* in_pEvents = MapHandles(pEvents, eventCount, &VulkanObjectInfoTable::GetEventInfo); const VkDependencyInfo* in_pDependencyInfos = pDependencyInfos->GetPointer(); @@ -6092,7 +6092,7 @@ void VulkanReplayConsumer::Process_vkCmdPipelineBarrier2KHR( format::HandleId commandBuffer, StructPointerDecoder* pDependencyInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_commandBuffer = GetObjectInfoTable().GetCommandBufferInfo(commandBuffer); MapStructHandles(pDependencyInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6112,7 +6112,7 @@ void VulkanReplayConsumer::Process_vkCmdWriteTimestamp2KHR( format::HandleId queryPool, uint32_t query) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -6132,7 +6132,7 @@ void VulkanReplayConsumer::Process_vkQueueSubmit2KHR( StructPointerDecoder* pSubmits, format::HandleId fence) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_queue = GetObjectInfoTable().GetQueueInfo(queue); MapStructArrayHandles(pSubmits->GetMetaStructPointer(), pSubmits->GetLength(), GetObjectInfoTable()); @@ -6150,7 +6150,7 @@ void VulkanReplayConsumer::Process_vkCmdWriteBufferMarker2AMD( VkDeviceSize dstOffset, uint32_t marker) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_dstBuffer = MapHandle(dstBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -6168,7 +6168,7 @@ void VulkanReplayConsumer::Process_vkGetQueueCheckpointData2NV( PointerDecoder* pCheckpointDataCount, StructPointerDecoder* pCheckpointData) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkQueue in_queue = MapHandle(queue, &VulkanObjectInfoTable::GetQueueInfo); uint32_t* out_pCheckpointDataCount = pCheckpointDataCount->IsNull() ? nullptr : pCheckpointDataCount->AllocateOutputData(1, GetOutputArrayCount("vkGetQueueCheckpointData2NV", VK_SUCCESS, queue, kQueueArrayGetQueueCheckpointData2NV, pCheckpointDataCount, pCheckpointData, &VulkanObjectInfoTable::GetQueueInfo)); VkCheckpointData2NV* out_pCheckpointData = pCheckpointData->IsNull() ? nullptr : pCheckpointData->AllocateOutputData(*out_pCheckpointDataCount, VkCheckpointData2NV{ VK_STRUCTURE_TYPE_CHECKPOINT_DATA_2_NV, nullptr }); @@ -6183,7 +6183,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyBuffer2KHR( format::HandleId commandBuffer, StructPointerDecoder* pCopyBufferInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyBufferInfo2* in_pCopyBufferInfo = pCopyBufferInfo->GetPointer(); MapStructHandles(pCopyBufferInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6201,7 +6201,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyImage2KHR( format::HandleId commandBuffer, StructPointerDecoder* pCopyImageInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyImageInfo2* in_pCopyImageInfo = pCopyImageInfo->GetPointer(); MapStructHandles(pCopyImageInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6219,7 +6219,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyBufferToImage2KHR( format::HandleId commandBuffer, StructPointerDecoder* pCopyBufferToImageInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyBufferToImageInfo2* in_pCopyBufferToImageInfo = pCopyBufferToImageInfo->GetPointer(); MapStructHandles(pCopyBufferToImageInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6237,7 +6237,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyImageToBuffer2KHR( format::HandleId commandBuffer, StructPointerDecoder* pCopyImageToBufferInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyImageToBufferInfo2* in_pCopyImageToBufferInfo = pCopyImageToBufferInfo->GetPointer(); MapStructHandles(pCopyImageToBufferInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6255,7 +6255,7 @@ void VulkanReplayConsumer::Process_vkCmdBlitImage2KHR( format::HandleId commandBuffer, StructPointerDecoder* pBlitImageInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBlitImageInfo2* in_pBlitImageInfo = pBlitImageInfo->GetPointer(); MapStructHandles(pBlitImageInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6273,7 +6273,7 @@ void VulkanReplayConsumer::Process_vkCmdResolveImage2KHR( format::HandleId commandBuffer, StructPointerDecoder* pResolveImageInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkResolveImageInfo2* in_pResolveImageInfo = pResolveImageInfo->GetPointer(); MapStructHandles(pResolveImageInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6291,7 +6291,7 @@ void VulkanReplayConsumer::Process_vkCmdTraceRaysIndirect2KHR( format::HandleId commandBuffer, VkDeviceAddress indirectDeviceAddress) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdTraceRaysIndirect2KHR(in_commandBuffer, indirectDeviceAddress); @@ -6308,7 +6308,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceBufferMemoryRequirementsKHR( StructPointerDecoder* pInfo, StructPointerDecoder* pMemoryRequirements) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDeviceBufferMemoryRequirements* in_pInfo = pInfo->GetPointer(); VkMemoryRequirements2* out_pMemoryRequirements = pMemoryRequirements->IsNull() ? nullptr : pMemoryRequirements->AllocateOutputData(1, { VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2, nullptr }); @@ -6323,7 +6323,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceImageMemoryRequirementsKHR( StructPointerDecoder* pInfo, StructPointerDecoder* pMemoryRequirements) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDeviceImageMemoryRequirements* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6340,7 +6340,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceImageSparseMemoryRequirementsKHR( PointerDecoder* pSparseMemoryRequirementCount, StructPointerDecoder* pSparseMemoryRequirements) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDeviceImageMemoryRequirements* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6360,7 +6360,7 @@ void VulkanReplayConsumer::Process_vkCmdBindIndexBuffer2KHR( VkDeviceSize size, VkIndexType indexType) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -6378,7 +6378,7 @@ void VulkanReplayConsumer::Process_vkGetRenderingAreaGranularityKHR( StructPointerDecoder* pRenderingAreaInfo, StructPointerDecoder* pGranularity) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkRenderingAreaInfoKHR* in_pRenderingAreaInfo = pRenderingAreaInfo->GetPointer(); VkExtent2D* out_pGranularity = pGranularity->IsNull() ? nullptr : pGranularity->AllocateOutputData(1); @@ -6392,7 +6392,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceImageSubresourceLayoutKHR( StructPointerDecoder* pInfo, StructPointerDecoder* pLayout) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDeviceImageSubresourceInfoKHR* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6409,7 +6409,7 @@ void VulkanReplayConsumer::Process_vkGetImageSubresourceLayout2KHR( StructPointerDecoder* pSubresource, StructPointerDecoder* pLayout) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkImage in_image = MapHandle(image, &VulkanObjectInfoTable::GetImageInfo); const VkImageSubresource2KHR* in_pSubresource = pSubresource->GetPointer(); @@ -6426,7 +6426,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceCooperativeMatrixPropertie PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceCooperativeMatrixPropertiesKHR, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkCooperativeMatrixPropertiesKHR* out_pProperties = pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(*out_pPropertyCount, VkCooperativeMatrixPropertiesKHR{ VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_KHR, nullptr }); @@ -6443,7 +6443,7 @@ void VulkanReplayConsumer::Process_vkCmdSetLineStippleKHR( uint32_t lineStippleFactor, uint16_t lineStipplePattern) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetLineStippleKHR(in_commandBuffer, lineStippleFactor, lineStipplePattern); @@ -6461,7 +6461,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceCalibrateableTimeDomainsKH PointerDecoder* pTimeDomainCount, PointerDecoder* pTimeDomains) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pTimeDomainCount = pTimeDomainCount->IsNull() ? nullptr : pTimeDomainCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceCalibrateableTimeDomainsKHR", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceCalibrateableTimeDomainsKHR, pTimeDomainCount, pTimeDomains, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkTimeDomainKHR* out_pTimeDomains = pTimeDomains->IsNull() ? nullptr : pTimeDomains->AllocateOutputData(*out_pTimeDomainCount); @@ -6481,7 +6481,7 @@ void VulkanReplayConsumer::Process_vkGetCalibratedTimestampsKHR( PointerDecoder* pTimestamps, PointerDecoder* pMaxDeviation) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkCalibratedTimestampInfoKHR* in_pTimestampInfos = pTimestampInfos->GetPointer(); uint64_t* out_pTimestamps = pTimestamps->IsNull() ? nullptr : pTimestamps->AllocateOutputData(timestampCount); @@ -6496,7 +6496,7 @@ void VulkanReplayConsumer::Process_vkCmdBindDescriptorSets2KHR( format::HandleId commandBuffer, StructPointerDecoder* pBindDescriptorSetsInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBindDescriptorSetsInfoKHR* in_pBindDescriptorSetsInfo = pBindDescriptorSetsInfo->GetPointer(); MapStructHandles(pBindDescriptorSetsInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6514,7 +6514,7 @@ void VulkanReplayConsumer::Process_vkCmdPushConstants2KHR( format::HandleId commandBuffer, StructPointerDecoder* pPushConstantsInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkPushConstantsInfoKHR* in_pPushConstantsInfo = pPushConstantsInfo->GetPointer(); MapStructHandles(pPushConstantsInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6532,7 +6532,7 @@ void VulkanReplayConsumer::Process_vkCmdPushDescriptorSet2KHR( format::HandleId commandBuffer, StructPointerDecoder* pPushDescriptorSetInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkPushDescriptorSetInfoKHR* in_pPushDescriptorSetInfo = pPushDescriptorSetInfo->GetPointer(); MapStructHandles(pPushDescriptorSetInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6550,7 +6550,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDescriptorBufferOffsets2EXT( format::HandleId commandBuffer, StructPointerDecoder* pSetDescriptorBufferOffsetsInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkSetDescriptorBufferOffsetsInfoEXT* in_pSetDescriptorBufferOffsetsInfo = pSetDescriptorBufferOffsetsInfo->GetPointer(); MapStructHandles(pSetDescriptorBufferOffsetsInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6568,7 +6568,7 @@ void VulkanReplayConsumer::Process_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT format::HandleId commandBuffer, StructPointerDecoder* pBindDescriptorBufferEmbeddedSamplersInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* in_pBindDescriptorBufferEmbeddedSamplersInfo = pBindDescriptorBufferEmbeddedSamplersInfo->GetPointer(); MapStructHandles(pBindDescriptorBufferEmbeddedSamplersInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6587,7 +6587,7 @@ void VulkanReplayConsumer::Process_vkFrameBoundaryANDROID( format::HandleId semaphore, format::HandleId image) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_semaphore = GetObjectInfoTable().GetSemaphoreInfo(semaphore); auto in_image = GetObjectInfoTable().GetImageInfo(image); @@ -6603,7 +6603,7 @@ void VulkanReplayConsumer::Process_vkCreateDebugReportCallbackEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pCallback) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); if (!pCallback->IsNull()) { pCallback->SetHandleLength(1); } DebugReportCallbackEXTInfo handle_info; @@ -6622,7 +6622,7 @@ void VulkanReplayConsumer::Process_vkDestroyDebugReportCallbackEXT( format::HandleId callback, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); VkDebugReportCallbackEXT in_callback = MapHandle(callback, &VulkanObjectInfoTable::GetDebugReportCallbackEXTInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -6642,7 +6642,7 @@ void VulkanReplayConsumer::Process_vkDebugReportMessageEXT( StringDecoder* pLayerPrefix, StringDecoder* pMessage) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); uint64_t in_object = MapHandle(object, objectType); const char* in_pLayerPrefix = pLayerPrefix->GetPointer(); @@ -6657,7 +6657,7 @@ void VulkanReplayConsumer::Process_vkDebugMarkerSetObjectTagEXT( format::HandleId device, StructPointerDecoder* pTagInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDebugMarkerObjectTagInfoEXT* in_pTagInfo = pTagInfo->GetPointer(); MapStructHandles(pTagInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6672,7 +6672,7 @@ void VulkanReplayConsumer::Process_vkDebugMarkerSetObjectNameEXT( format::HandleId device, StructPointerDecoder* pNameInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDebugMarkerObjectNameInfoEXT* in_pNameInfo = pNameInfo->GetPointer(); MapStructHandles(pNameInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6686,7 +6686,7 @@ void VulkanReplayConsumer::Process_vkCmdDebugMarkerBeginEXT( format::HandleId commandBuffer, StructPointerDecoder* pMarkerInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkDebugMarkerMarkerInfoEXT* in_pMarkerInfo = pMarkerInfo->GetPointer(); @@ -6702,7 +6702,7 @@ void VulkanReplayConsumer::Process_vkCmdDebugMarkerEndEXT( const ApiCallInfo& call_info, format::HandleId commandBuffer) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdDebugMarkerEndEXT(in_commandBuffer); @@ -6718,7 +6718,7 @@ void VulkanReplayConsumer::Process_vkCmdDebugMarkerInsertEXT( format::HandleId commandBuffer, StructPointerDecoder* pMarkerInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_commandBuffer = GetObjectInfoTable().GetCommandBufferInfo(commandBuffer); OverrideCmdDebugMarkerInsertEXT(GetDeviceTable(in_commandBuffer->handle)->CmdDebugMarkerInsertEXT, in_commandBuffer, pMarkerInfo); @@ -6738,7 +6738,7 @@ void VulkanReplayConsumer::Process_vkCmdBindTransformFeedbackBuffersEXT( PointerDecoder* pOffsets, PointerDecoder* pSizes) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBuffer* in_pBuffers = MapHandles(pBuffers, bindingCount, &VulkanObjectInfoTable::GetBufferInfo); const VkDeviceSize* in_pOffsets = pOffsets->GetPointer(); @@ -6760,7 +6760,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginTransformFeedbackEXT( HandlePointerDecoder* pCounterBuffers, PointerDecoder* pCounterBufferOffsets) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBuffer* in_pCounterBuffers = MapHandles(pCounterBuffers, counterBufferCount, &VulkanObjectInfoTable::GetBufferInfo); const VkDeviceSize* in_pCounterBufferOffsets = pCounterBufferOffsets->GetPointer(); @@ -6781,7 +6781,7 @@ void VulkanReplayConsumer::Process_vkCmdEndTransformFeedbackEXT( HandlePointerDecoder* pCounterBuffers, PointerDecoder* pCounterBufferOffsets) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBuffer* in_pCounterBuffers = MapHandles(pCounterBuffers, counterBufferCount, &VulkanObjectInfoTable::GetBufferInfo); const VkDeviceSize* in_pCounterBufferOffsets = pCounterBufferOffsets->GetPointer(); @@ -6802,7 +6802,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginQueryIndexedEXT( VkQueryControlFlags flags, uint32_t index) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -6821,7 +6821,7 @@ void VulkanReplayConsumer::Process_vkCmdEndQueryIndexedEXT( uint32_t query, uint32_t index) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -6843,7 +6843,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawIndirectByteCountEXT( uint32_t counterOffset, uint32_t vertexStride) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_counterBuffer = MapHandle(counterBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -6861,7 +6861,7 @@ void VulkanReplayConsumer::Process_vkGetImageViewHandleNVX( format::HandleId device, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkImageViewHandleInfoNVX* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -6876,7 +6876,7 @@ void VulkanReplayConsumer::Process_vkGetImageViewAddressNVX( format::HandleId imageView, StructPointerDecoder* pProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkImageView in_imageView = MapHandle(imageView, &VulkanObjectInfoTable::GetImageViewInfo); VkImageViewAddressPropertiesNVX* out_pProperties = pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_IMAGE_VIEW_ADDRESS_PROPERTIES_NVX, nullptr }); @@ -6896,7 +6896,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawIndirectCountAMD( uint32_t maxDrawCount, uint32_t stride) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); VkBuffer in_countBuffer = MapHandle(countBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -6919,7 +6919,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawIndexedIndirectCountAMD( uint32_t maxDrawCount, uint32_t stride) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); VkBuffer in_countBuffer = MapHandle(countBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -6942,7 +6942,7 @@ void VulkanReplayConsumer::Process_vkGetShaderInfoAMD( PointerDecoder* pInfoSize, PointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPipeline in_pipeline = MapHandle(pipeline, &VulkanObjectInfoTable::GetPipelineInfo); size_t* out_pInfoSize = pInfoSize->IsNull() ? nullptr : pInfoSize->AllocateOutputData(1, GetOutputArrayCount("vkGetShaderInfoAMD", returnValue, pipeline, kPipelineArrayGetShaderInfoAMD, pInfoSize, pInfo, &VulkanObjectInfoTable::GetPipelineInfo)); @@ -6962,7 +6962,7 @@ void VulkanReplayConsumer::Process_vkCreateStreamDescriptorSurfaceGGP( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); const VkStreamDescriptorSurfaceCreateInfoGGP* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -6988,7 +6988,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceExternalImageFormatPropert VkExternalMemoryHandleTypeFlagsNV externalHandleType, StructPointerDecoder* pExternalImageFormatProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkExternalImageFormatPropertiesNV* out_pExternalImageFormatProperties = pExternalImageFormatProperties->IsNull() ? nullptr : pExternalImageFormatProperties->AllocateOutputData(1); @@ -7004,7 +7004,7 @@ void VulkanReplayConsumer::Process_vkGetMemoryWin32HandleNV( VkExternalMemoryHandleTypeFlagsNV handleType, PointerDecoder* pHandle) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeviceMemory in_memory = MapHandle(memory, &VulkanObjectInfoTable::GetDeviceMemoryInfo); HANDLE* out_pHandle = pHandle->IsNull() ? nullptr : reinterpret_cast(pHandle->AllocateOutputData(1)); @@ -7023,7 +7023,7 @@ void VulkanReplayConsumer::Process_vkCreateViSurfaceNN( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); const VkViSurfaceCreateInfoNN* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -7042,7 +7042,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginConditionalRenderingEXT( format::HandleId commandBuffer, StructPointerDecoder* pConditionalRenderingBegin) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkConditionalRenderingBeginInfoEXT* in_pConditionalRenderingBegin = pConditionalRenderingBegin->GetPointer(); MapStructHandles(pConditionalRenderingBegin->GetMetaStructPointer(), GetObjectInfoTable()); @@ -7059,7 +7059,7 @@ void VulkanReplayConsumer::Process_vkCmdEndConditionalRenderingEXT( const ApiCallInfo& call_info, format::HandleId commandBuffer) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdEndConditionalRenderingEXT(in_commandBuffer); @@ -7077,7 +7077,7 @@ void VulkanReplayConsumer::Process_vkCmdSetViewportWScalingNV( uint32_t viewportCount, StructPointerDecoder* pViewportWScalings) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkViewportWScalingNV* in_pViewportWScalings = pViewportWScalings->GetPointer(); @@ -7095,7 +7095,7 @@ void VulkanReplayConsumer::Process_vkReleaseDisplayEXT( format::HandleId physicalDevice, format::HandleId display) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkDisplayKHR in_display = MapHandle(display, &VulkanObjectInfoTable::GetDisplayKHRInfo); @@ -7110,7 +7110,7 @@ void VulkanReplayConsumer::Process_vkAcquireXlibDisplayEXT( uint64_t dpy, format::HandleId display) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); Display* in_dpy = static_cast(PreProcessExternalObject(dpy, format::ApiCallId::ApiCall_vkAcquireXlibDisplayEXT, "vkAcquireXlibDisplayEXT")); VkDisplayKHR in_display = MapHandle(display, &VulkanObjectInfoTable::GetDisplayKHRInfo); @@ -7127,7 +7127,7 @@ void VulkanReplayConsumer::Process_vkGetRandROutputDisplayEXT( size_t rrOutput, HandlePointerDecoder* pDisplay) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); Display* in_dpy = static_cast(PreProcessExternalObject(dpy, format::ApiCallId::ApiCall_vkGetRandROutputDisplayEXT, "vkGetRandROutputDisplayEXT")); if (!pDisplay->IsNull()) { pDisplay->SetHandleLength(1); } @@ -7153,7 +7153,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSurfaceCapabilities2EXT( GFXRECON_LOG_DEBUG("Skip vkGetPhysicalDeviceSurfaceCapabilities2EXT for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkSurfaceKHR in_surface = MapHandle(surface, &VulkanObjectInfoTable::GetSurfaceKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(surface) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(surface)->surface_creation_skipped) { return; } @@ -7171,7 +7171,7 @@ void VulkanReplayConsumer::Process_vkDisplayPowerControlEXT( format::HandleId display, StructPointerDecoder* pDisplayPowerInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDisplayKHR in_display = MapHandle(display, &VulkanObjectInfoTable::GetDisplayKHRInfo); const VkDisplayPowerInfoEXT* in_pDisplayPowerInfo = pDisplayPowerInfo->GetPointer(); @@ -7188,7 +7188,7 @@ void VulkanReplayConsumer::Process_vkRegisterDeviceEventEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pFence) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDeviceEventInfoEXT* in_pDeviceEventInfo = pDeviceEventInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -7211,7 +7211,7 @@ void VulkanReplayConsumer::Process_vkRegisterDisplayEventEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pFence) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDisplayKHR in_display = MapHandle(display, &VulkanObjectInfoTable::GetDisplayKHRInfo); const VkDisplayEventInfoEXT* in_pDisplayEventInfo = pDisplayEventInfo->GetPointer(); @@ -7239,7 +7239,7 @@ void VulkanReplayConsumer::Process_vkGetSwapchainCounterEXT( GFXRECON_LOG_DEBUG("Skip vkGetSwapchainCounterEXT for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapchain = MapHandle(swapchain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id)->surface_creation_skipped) { return; } @@ -7261,7 +7261,7 @@ void VulkanReplayConsumer::Process_vkGetRefreshCycleDurationGOOGLE( GFXRECON_LOG_DEBUG("Skip vkGetRefreshCycleDurationGOOGLE for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapchain = MapHandle(swapchain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id)->surface_creation_skipped) { return; } @@ -7284,7 +7284,7 @@ void VulkanReplayConsumer::Process_vkGetPastPresentationTimingGOOGLE( GFXRECON_LOG_DEBUG("Skip vkGetPastPresentationTimingGOOGLE for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapchain = MapHandle(swapchain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id)->surface_creation_skipped) { return; } @@ -7304,7 +7304,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDiscardRectangleEXT( uint32_t discardRectangleCount, StructPointerDecoder* pDiscardRectangles) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkRect2D* in_pDiscardRectangles = pDiscardRectangles->GetPointer(); @@ -7321,7 +7321,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDiscardRectangleEnableEXT( format::HandleId commandBuffer, VkBool32 discardRectangleEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDiscardRectangleEnableEXT(in_commandBuffer, discardRectangleEnable); @@ -7337,7 +7337,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDiscardRectangleModeEXT( format::HandleId commandBuffer, VkDiscardRectangleModeEXT discardRectangleMode) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDiscardRectangleModeEXT(in_commandBuffer, discardRectangleMode); @@ -7360,7 +7360,7 @@ void VulkanReplayConsumer::Process_vkSetHdrMetadataEXT( GFXRECON_LOG_DEBUG("Skip vkSetHdrMetadataEXT for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkSwapchainKHR* in_pSwapchains = MapHandles(pSwapchains, swapchainCount, &VulkanObjectInfoTable::GetSwapchainKHRInfo); const VkHdrMetadataEXT* in_pMetadata = pMetadata->GetPointer(); @@ -7376,7 +7376,7 @@ void VulkanReplayConsumer::Process_vkCreateIOSSurfaceMVK( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); const VkIOSSurfaceCreateInfoMVK* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -7398,7 +7398,7 @@ void VulkanReplayConsumer::Process_vkCreateMacOSSurfaceMVK( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); const VkMacOSSurfaceCreateInfoMVK* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -7418,7 +7418,7 @@ void VulkanReplayConsumer::Process_vkSetDebugUtilsObjectNameEXT( format::HandleId device, StructPointerDecoder* pNameInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDebugUtilsObjectNameInfoEXT* in_pNameInfo = pNameInfo->GetPointer(); MapStructHandles(pNameInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -7435,7 +7435,7 @@ void VulkanReplayConsumer::Process_vkSetDebugUtilsObjectTagEXT( format::HandleId device, StructPointerDecoder* pTagInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDebugUtilsObjectTagInfoEXT* in_pTagInfo = pTagInfo->GetPointer(); MapStructHandles(pTagInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -7451,7 +7451,7 @@ void VulkanReplayConsumer::Process_vkQueueBeginDebugUtilsLabelEXT( format::HandleId queue, StructPointerDecoder* pLabelInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkQueue in_queue = MapHandle(queue, &VulkanObjectInfoTable::GetQueueInfo); const VkDebugUtilsLabelEXT* in_pLabelInfo = pLabelInfo->GetPointer(); @@ -7462,7 +7462,7 @@ void VulkanReplayConsumer::Process_vkQueueEndDebugUtilsLabelEXT( const ApiCallInfo& call_info, format::HandleId queue) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkQueue in_queue = MapHandle(queue, &VulkanObjectInfoTable::GetQueueInfo); GetDeviceTable(in_queue)->QueueEndDebugUtilsLabelEXT(in_queue); @@ -7473,7 +7473,7 @@ void VulkanReplayConsumer::Process_vkQueueInsertDebugUtilsLabelEXT( format::HandleId queue, StructPointerDecoder* pLabelInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkQueue in_queue = MapHandle(queue, &VulkanObjectInfoTable::GetQueueInfo); const VkDebugUtilsLabelEXT* in_pLabelInfo = pLabelInfo->GetPointer(); @@ -7485,7 +7485,7 @@ void VulkanReplayConsumer::Process_vkCmdBeginDebugUtilsLabelEXT( format::HandleId commandBuffer, StructPointerDecoder* pLabelInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkDebugUtilsLabelEXT* in_pLabelInfo = pLabelInfo->GetPointer(); @@ -7501,7 +7501,7 @@ void VulkanReplayConsumer::Process_vkCmdEndDebugUtilsLabelEXT( const ApiCallInfo& call_info, format::HandleId commandBuffer) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdEndDebugUtilsLabelEXT(in_commandBuffer); @@ -7517,7 +7517,7 @@ void VulkanReplayConsumer::Process_vkCmdInsertDebugUtilsLabelEXT( format::HandleId commandBuffer, StructPointerDecoder* pLabelInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_commandBuffer = GetObjectInfoTable().GetCommandBufferInfo(commandBuffer); OverrideCmdInsertDebugUtilsLabelEXT(GetDeviceTable(in_commandBuffer->handle)->CmdInsertDebugUtilsLabelEXT, in_commandBuffer, pLabelInfo); @@ -7536,7 +7536,7 @@ void VulkanReplayConsumer::Process_vkCreateDebugUtilsMessengerEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pMessenger) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); if (!pMessenger->IsNull()) { pMessenger->SetHandleLength(1); } DebugUtilsMessengerEXTInfo handle_info; @@ -7555,7 +7555,7 @@ void VulkanReplayConsumer::Process_vkDestroyDebugUtilsMessengerEXT( format::HandleId messenger, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); VkDebugUtilsMessengerEXT in_messenger = MapHandle(messenger, &VulkanObjectInfoTable::GetDebugUtilsMessengerEXTInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -7571,7 +7571,7 @@ void VulkanReplayConsumer::Process_vkSubmitDebugUtilsMessageEXT( VkDebugUtilsMessageTypeFlagsEXT messageTypes, StructPointerDecoder* pCallbackData) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); const VkDebugUtilsMessengerCallbackDataEXT* in_pCallbackData = pCallbackData->GetPointer(); @@ -7585,7 +7585,7 @@ void VulkanReplayConsumer::Process_vkGetAndroidHardwareBufferPropertiesANDROID( uint64_t buffer, StructPointerDecoder* pProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); const struct AHardwareBuffer* in_buffer = static_cast(PreProcessExternalObject(buffer, format::ApiCallId::ApiCall_vkGetAndroidHardwareBufferPropertiesANDROID, "vkGetAndroidHardwareBufferPropertiesANDROID")); pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID, nullptr }); @@ -7602,7 +7602,7 @@ void VulkanReplayConsumer::Process_vkGetMemoryAndroidHardwareBufferANDROID( StructPointerDecoder* pInfo, PointerDecoder* pBuffer) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMemoryGetAndroidHardwareBufferInfoANDROID* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -7619,7 +7619,7 @@ void VulkanReplayConsumer::Process_vkCmdSetSampleLocationsEXT( format::HandleId commandBuffer, StructPointerDecoder* pSampleLocationsInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkSampleLocationsInfoEXT* in_pSampleLocationsInfo = pSampleLocationsInfo->GetPointer(); @@ -7637,7 +7637,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceMultisamplePropertiesEXT( VkSampleCountFlagBits samples, StructPointerDecoder* pMultisampleProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkMultisamplePropertiesEXT* out_pMultisampleProperties = pMultisampleProperties->IsNull() ? nullptr : pMultisampleProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT, nullptr }); InitializeOutputStructPNext(pMultisampleProperties); @@ -7652,7 +7652,7 @@ void VulkanReplayConsumer::Process_vkGetImageDrmFormatModifierPropertiesEXT( format::HandleId image, StructPointerDecoder* pProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkImage in_image = MapHandle(image, &VulkanObjectInfoTable::GetImageInfo); VkImageDrmFormatModifierPropertiesEXT* out_pProperties = pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT, nullptr }); @@ -7670,7 +7670,7 @@ void VulkanReplayConsumer::Process_vkCreateValidationCacheEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pValidationCache) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkValidationCacheCreateInfoEXT* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -7690,7 +7690,7 @@ void VulkanReplayConsumer::Process_vkDestroyValidationCacheEXT( format::HandleId validationCache, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkValidationCacheEXT in_validationCache = MapHandle(validationCache, &VulkanObjectInfoTable::GetValidationCacheEXTInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -7707,7 +7707,7 @@ void VulkanReplayConsumer::Process_vkMergeValidationCachesEXT( uint32_t srcCacheCount, HandlePointerDecoder* pSrcCaches) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkValidationCacheEXT in_dstCache = MapHandle(dstCache, &VulkanObjectInfoTable::GetValidationCacheEXTInfo); const VkValidationCacheEXT* in_pSrcCaches = MapHandles(pSrcCaches, srcCacheCount, &VulkanObjectInfoTable::GetValidationCacheEXTInfo); @@ -7724,7 +7724,7 @@ void VulkanReplayConsumer::Process_vkGetValidationCacheDataEXT( PointerDecoder* pDataSize, PointerDecoder* pData) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkValidationCacheEXT in_validationCache = MapHandle(validationCache, &VulkanObjectInfoTable::GetValidationCacheEXTInfo); size_t* out_pDataSize = pDataSize->IsNull() ? nullptr : pDataSize->AllocateOutputData(1, GetOutputArrayCount("vkGetValidationCacheDataEXT", returnValue, validationCache, kValidationCacheEXTArrayGetValidationCacheDataEXT, pDataSize, pData, &VulkanObjectInfoTable::GetValidationCacheEXTInfo)); @@ -7742,7 +7742,7 @@ void VulkanReplayConsumer::Process_vkCmdBindShadingRateImageNV( format::HandleId imageView, VkImageLayout imageLayout) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkImageView in_imageView = MapHandle(imageView, &VulkanObjectInfoTable::GetImageViewInfo); @@ -7761,7 +7761,7 @@ void VulkanReplayConsumer::Process_vkCmdSetViewportShadingRatePaletteNV( uint32_t viewportCount, StructPointerDecoder* pShadingRatePalettes) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkShadingRatePaletteNV* in_pShadingRatePalettes = pShadingRatePalettes->GetPointer(); @@ -7780,7 +7780,7 @@ void VulkanReplayConsumer::Process_vkCmdSetCoarseSampleOrderNV( uint32_t customSampleOrderCount, StructPointerDecoder* pCustomSampleOrders) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCoarseSampleOrderCustomNV* in_pCustomSampleOrders = pCustomSampleOrders->GetPointer(); @@ -7800,7 +7800,7 @@ void VulkanReplayConsumer::Process_vkCreateAccelerationStructureNV( StructPointerDecoder* pAllocator, HandlePointerDecoder* pAccelerationStructure) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkAccelerationStructureCreateInfoNV* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -7821,7 +7821,7 @@ void VulkanReplayConsumer::Process_vkDestroyAccelerationStructureNV( format::HandleId accelerationStructure, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkAccelerationStructureNV in_accelerationStructure = MapHandle(accelerationStructure, &VulkanObjectInfoTable::GetAccelerationStructureNVInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -7836,7 +7836,7 @@ void VulkanReplayConsumer::Process_vkGetAccelerationStructureMemoryRequirementsN StructPointerDecoder* pInfo, StructPointerDecoder* pMemoryRequirements) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkAccelerationStructureMemoryRequirementsInfoNV* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -7852,7 +7852,7 @@ void VulkanReplayConsumer::Process_vkBindAccelerationStructureMemoryNV( uint32_t bindInfoCount, StructPointerDecoder* pBindInfos) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkBindAccelerationStructureMemoryInfoNV* in_pBindInfos = pBindInfos->GetPointer(); MapStructArrayHandles(pBindInfos->GetMetaStructPointer(), pBindInfos->GetLength(), GetObjectInfoTable()); @@ -7873,7 +7873,7 @@ void VulkanReplayConsumer::Process_vkCmdBuildAccelerationStructureNV( format::HandleId scratch, VkDeviceSize scratchOffset) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkAccelerationStructureInfoNV* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -7897,7 +7897,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyAccelerationStructureNV( format::HandleId src, VkCopyAccelerationStructureModeKHR mode) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkAccelerationStructureNV in_dst = MapHandle(dst, &VulkanObjectInfoTable::GetAccelerationStructureNVInfo); VkAccelerationStructureNV in_src = MapHandle(src, &VulkanObjectInfoTable::GetAccelerationStructureNVInfo); @@ -7928,7 +7928,7 @@ void VulkanReplayConsumer::Process_vkCmdTraceRaysNV( uint32_t height, uint32_t depth) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_raygenShaderBindingTableBuffer = MapHandle(raygenShaderBindingTableBuffer, &VulkanObjectInfoTable::GetBufferInfo); VkBuffer in_missShaderBindingTableBuffer = MapHandle(missShaderBindingTableBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -7953,7 +7953,7 @@ void VulkanReplayConsumer::Process_vkCreateRayTracingPipelinesNV( StructPointerDecoder* pAllocator, HandlePointerDecoder* pPipelines) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPipelineCache in_pipelineCache = MapHandle(pipelineCache, &VulkanObjectInfoTable::GetPipelineCacheInfo); const VkRayTracingPipelineCreateInfoNV* in_pCreateInfos = pCreateInfos->GetPointer(); @@ -7980,7 +7980,7 @@ void VulkanReplayConsumer::Process_vkGetRayTracingShaderGroupHandlesKHR( size_t dataSize, PointerDecoder* pData) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); auto in_pipeline = GetObjectInfoTable().GetPipelineInfo(pipeline); if (!pData->IsNull()) { pData->AllocateOutputData(dataSize); } @@ -7999,7 +7999,7 @@ void VulkanReplayConsumer::Process_vkGetRayTracingShaderGroupHandlesNV( size_t dataSize, PointerDecoder* pData) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPipeline in_pipeline = MapHandle(pipeline, &VulkanObjectInfoTable::GetPipelineInfo); void* out_pData = pData->IsNull() ? nullptr : pData->AllocateOutputData(dataSize); @@ -8016,7 +8016,7 @@ void VulkanReplayConsumer::Process_vkGetAccelerationStructureHandleNV( size_t dataSize, PointerDecoder* pData) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkAccelerationStructureNV in_accelerationStructure = MapHandle(accelerationStructure, &VulkanObjectInfoTable::GetAccelerationStructureNVInfo); void* out_pData = pData->IsNull() ? nullptr : pData->AllocateOutputData(dataSize); @@ -8034,7 +8034,7 @@ void VulkanReplayConsumer::Process_vkCmdWriteAccelerationStructuresPropertiesNV( format::HandleId queryPool, uint32_t firstQuery) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkAccelerationStructureNV* in_pAccelerationStructures = MapHandles(pAccelerationStructures, accelerationStructureCount, &VulkanObjectInfoTable::GetAccelerationStructureNVInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -8054,7 +8054,7 @@ void VulkanReplayConsumer::Process_vkCompileDeferredNV( format::HandleId pipeline, uint32_t shader) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPipeline in_pipeline = MapHandle(pipeline, &VulkanObjectInfoTable::GetPipelineInfo); @@ -8070,7 +8070,7 @@ void VulkanReplayConsumer::Process_vkGetMemoryHostPointerPropertiesEXT( uint64_t pHostPointer, StructPointerDecoder* pMemoryHostPointerProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const void* in_pHostPointer = PreProcessExternalObject(pHostPointer, format::ApiCallId::ApiCall_vkGetMemoryHostPointerPropertiesEXT, "vkGetMemoryHostPointerPropertiesEXT"); VkMemoryHostPointerPropertiesEXT* out_pMemoryHostPointerProperties = pMemoryHostPointerProperties->IsNull() ? nullptr : pMemoryHostPointerProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT, nullptr }); @@ -8088,7 +8088,7 @@ void VulkanReplayConsumer::Process_vkCmdWriteBufferMarkerAMD( VkDeviceSize dstOffset, uint32_t marker) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_dstBuffer = MapHandle(dstBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -8107,7 +8107,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceCalibrateableTimeDomainsEX PointerDecoder* pTimeDomainCount, PointerDecoder* pTimeDomains) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pTimeDomainCount = pTimeDomainCount->IsNull() ? nullptr : pTimeDomainCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceCalibrateableTimeDomainsEXT", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceCalibrateableTimeDomainsEXT, pTimeDomainCount, pTimeDomains, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkTimeDomainKHR* out_pTimeDomains = pTimeDomains->IsNull() ? nullptr : pTimeDomains->AllocateOutputData(*out_pTimeDomainCount); @@ -8127,7 +8127,7 @@ void VulkanReplayConsumer::Process_vkGetCalibratedTimestampsEXT( PointerDecoder* pTimestamps, PointerDecoder* pMaxDeviation) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkCalibratedTimestampInfoKHR* in_pTimestampInfos = pTimestampInfos->GetPointer(); uint64_t* out_pTimestamps = pTimestamps->IsNull() ? nullptr : pTimestamps->AllocateOutputData(timestampCount); @@ -8143,7 +8143,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawMeshTasksNV( uint32_t taskCount, uint32_t firstTask) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdDrawMeshTasksNV(in_commandBuffer, taskCount, firstTask); @@ -8162,7 +8162,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawMeshTasksIndirectNV( uint32_t drawCount, uint32_t stride) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -8184,7 +8184,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawMeshTasksIndirectCountNV( uint32_t maxDrawCount, uint32_t stride) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); VkBuffer in_countBuffer = MapHandle(countBuffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -8204,7 +8204,7 @@ void VulkanReplayConsumer::Process_vkCmdSetExclusiveScissorEnableNV( uint32_t exclusiveScissorCount, PointerDecoder* pExclusiveScissorEnables) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBool32* in_pExclusiveScissorEnables = pExclusiveScissorEnables->GetPointer(); @@ -8223,7 +8223,7 @@ void VulkanReplayConsumer::Process_vkCmdSetExclusiveScissorNV( uint32_t exclusiveScissorCount, StructPointerDecoder* pExclusiveScissors) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkRect2D* in_pExclusiveScissors = pExclusiveScissors->GetPointer(); @@ -8240,7 +8240,7 @@ void VulkanReplayConsumer::Process_vkCmdSetCheckpointNV( format::HandleId commandBuffer, uint64_t pCheckpointMarker) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const void* in_pCheckpointMarker = PreProcessExternalObject(pCheckpointMarker, format::ApiCallId::ApiCall_vkCmdSetCheckpointNV, "vkCmdSetCheckpointNV"); @@ -8258,7 +8258,7 @@ void VulkanReplayConsumer::Process_vkGetQueueCheckpointDataNV( PointerDecoder* pCheckpointDataCount, StructPointerDecoder* pCheckpointData) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkQueue in_queue = MapHandle(queue, &VulkanObjectInfoTable::GetQueueInfo); uint32_t* out_pCheckpointDataCount = pCheckpointDataCount->IsNull() ? nullptr : pCheckpointDataCount->AllocateOutputData(1, GetOutputArrayCount("vkGetQueueCheckpointDataNV", VK_SUCCESS, queue, kQueueArrayGetQueueCheckpointDataNV, pCheckpointDataCount, pCheckpointData, &VulkanObjectInfoTable::GetQueueInfo)); VkCheckpointDataNV* out_pCheckpointData = pCheckpointData->IsNull() ? nullptr : pCheckpointData->AllocateOutputData(*out_pCheckpointDataCount, VkCheckpointDataNV{ VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV, nullptr }); @@ -8274,7 +8274,7 @@ void VulkanReplayConsumer::Process_vkInitializePerformanceApiINTEL( format::HandleId device, StructPointerDecoder* pInitializeInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkInitializePerformanceApiInfoINTEL* in_pInitializeInfo = pInitializeInfo->GetPointer(); @@ -8286,7 +8286,7 @@ void VulkanReplayConsumer::Process_vkUninitializePerformanceApiINTEL( const ApiCallInfo& call_info, format::HandleId device) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); GetDeviceTable(in_device)->UninitializePerformanceApiINTEL(in_device); @@ -8298,7 +8298,7 @@ void VulkanReplayConsumer::Process_vkCmdSetPerformanceMarkerINTEL( format::HandleId commandBuffer, StructPointerDecoder* pMarkerInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkPerformanceMarkerInfoINTEL* in_pMarkerInfo = pMarkerInfo->GetPointer(); @@ -8317,7 +8317,7 @@ void VulkanReplayConsumer::Process_vkCmdSetPerformanceStreamMarkerINTEL( format::HandleId commandBuffer, StructPointerDecoder* pMarkerInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkPerformanceStreamMarkerInfoINTEL* in_pMarkerInfo = pMarkerInfo->GetPointer(); @@ -8336,7 +8336,7 @@ void VulkanReplayConsumer::Process_vkCmdSetPerformanceOverrideINTEL( format::HandleId commandBuffer, StructPointerDecoder* pOverrideInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkPerformanceOverrideInfoINTEL* in_pOverrideInfo = pOverrideInfo->GetPointer(); @@ -8356,7 +8356,7 @@ void VulkanReplayConsumer::Process_vkAcquirePerformanceConfigurationINTEL( StructPointerDecoder* pAcquireInfo, HandlePointerDecoder* pConfiguration) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkPerformanceConfigurationAcquireInfoINTEL* in_pAcquireInfo = pAcquireInfo->GetPointer(); if (!pConfiguration->IsNull()) { pConfiguration->SetHandleLength(1); } @@ -8375,7 +8375,7 @@ void VulkanReplayConsumer::Process_vkReleasePerformanceConfigurationINTEL( format::HandleId device, format::HandleId configuration) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPerformanceConfigurationINTEL in_configuration = MapHandle(configuration, &VulkanObjectInfoTable::GetPerformanceConfigurationINTELInfo); @@ -8389,7 +8389,7 @@ void VulkanReplayConsumer::Process_vkQueueSetPerformanceConfigurationINTEL( format::HandleId queue, format::HandleId configuration) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkQueue in_queue = MapHandle(queue, &VulkanObjectInfoTable::GetQueueInfo); VkPerformanceConfigurationINTEL in_configuration = MapHandle(configuration, &VulkanObjectInfoTable::GetPerformanceConfigurationINTELInfo); @@ -8404,7 +8404,7 @@ void VulkanReplayConsumer::Process_vkGetPerformanceParameterINTEL( VkPerformanceParameterTypeINTEL parameter, StructPointerDecoder* pValue) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPerformanceValueINTEL* out_pValue = pValue->IsNull() ? nullptr : pValue->AllocateOutputData(1); @@ -8423,7 +8423,7 @@ void VulkanReplayConsumer::Process_vkSetLocalDimmingAMD( GFXRECON_LOG_DEBUG("Skip vkSetLocalDimmingAMD for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapChain = MapHandle(swapChain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); @@ -8438,7 +8438,7 @@ void VulkanReplayConsumer::Process_vkCreateImagePipeSurfaceFUCHSIA( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); const VkImagePipeSurfaceCreateInfoFUCHSIA* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -8460,7 +8460,7 @@ void VulkanReplayConsumer::Process_vkCreateMetalSurfaceEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } SurfaceKHRInfo handle_info; @@ -8479,7 +8479,7 @@ void VulkanReplayConsumer::Process_vkGetBufferDeviceAddressEXT( format::HandleId device, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkBufferDeviceAddressInfo* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -8494,7 +8494,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceToolPropertiesEXT( PointerDecoder* pToolCount, StructPointerDecoder* pToolProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_physicalDevice = GetObjectInfoTable().GetPhysicalDeviceInfo(physicalDevice); pToolCount->IsNull() ? nullptr : pToolCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceToolPropertiesEXT", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceToolPropertiesEXT, pToolCount, pToolProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); if (!pToolProperties->IsNull()) { pToolProperties->AllocateOutputData(*pToolCount->GetOutputPointer(), VkPhysicalDeviceToolProperties{ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES, nullptr }); } @@ -8512,7 +8512,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceCooperativeMatrixPropertie PointerDecoder* pPropertyCount, StructPointerDecoder* pProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pPropertyCount = pPropertyCount->IsNull() ? nullptr : pPropertyCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceCooperativeMatrixPropertiesNV", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceCooperativeMatrixPropertiesNV, pPropertyCount, pProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkCooperativeMatrixPropertiesNV* out_pProperties = pProperties->IsNull() ? nullptr : pProperties->AllocateOutputData(*out_pPropertyCount, VkCooperativeMatrixPropertiesNV{ VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV, nullptr }); @@ -8530,7 +8530,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSupportedFramebufferMixedS PointerDecoder* pCombinationCount, StructPointerDecoder* pCombinations) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); uint32_t* out_pCombinationCount = pCombinationCount->IsNull() ? nullptr : pCombinationCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV, pCombinationCount, pCombinations, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); VkFramebufferMixedSamplesCombinationNV* out_pCombinations = pCombinations->IsNull() ? nullptr : pCombinations->AllocateOutputData(*out_pCombinationCount, VkFramebufferMixedSamplesCombinationNV{ VK_STRUCTURE_TYPE_FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV, nullptr }); @@ -8554,7 +8554,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceSurfacePresentModes2EXT( GFXRECON_LOG_DEBUG("Skip vkGetPhysicalDeviceSurfacePresentModes2EXT for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkPhysicalDeviceSurfaceInfo2KHR* in_pSurfaceInfo = pSurfaceInfo->GetPointer(); if (pSurfaceInfo->GetPointer()->surface == VK_NULL_HANDLE) { return; } @@ -8581,7 +8581,7 @@ void VulkanReplayConsumer::Process_vkAcquireFullScreenExclusiveModeEXT( GFXRECON_LOG_DEBUG("Skip vkAcquireFullScreenExclusiveModeEXT for offscreen or force windowed mode."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapchain = MapHandle(swapchain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id)->surface_creation_skipped) { return; } @@ -8601,7 +8601,7 @@ void VulkanReplayConsumer::Process_vkReleaseFullScreenExclusiveModeEXT( GFXRECON_LOG_DEBUG("Skip vkReleaseFullScreenExclusiveModeEXT for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapchain = MapHandle(swapchain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id)->surface_creation_skipped) { return; } @@ -8622,7 +8622,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceGroupSurfacePresentModes2EXT( GFXRECON_LOG_DEBUG("Skip vkGetDeviceGroupSurfacePresentModes2EXT for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkPhysicalDeviceSurfaceInfo2KHR* in_pSurfaceInfo = pSurfaceInfo->GetPointer(); if (pSurfaceInfo->GetPointer()->surface == VK_NULL_HANDLE) { return; } @@ -8643,7 +8643,7 @@ void VulkanReplayConsumer::Process_vkCreateHeadlessSurfaceEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_instance = GetObjectInfoTable().GetInstanceInfo(instance); if (!pSurface->IsNull()) { pSurface->SetHandleLength(1); } SurfaceKHRInfo handle_info; @@ -8662,7 +8662,7 @@ void VulkanReplayConsumer::Process_vkCmdSetLineStippleEXT( uint32_t lineStippleFactor, uint16_t lineStipplePattern) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetLineStippleEXT(in_commandBuffer, lineStippleFactor, lineStipplePattern); @@ -8680,7 +8680,7 @@ void VulkanReplayConsumer::Process_vkResetQueryPoolEXT( uint32_t firstQuery, uint32_t queryCount) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -8692,7 +8692,7 @@ void VulkanReplayConsumer::Process_vkCmdSetCullModeEXT( format::HandleId commandBuffer, VkCullModeFlags cullMode) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetCullModeEXT(in_commandBuffer, cullMode); @@ -8708,7 +8708,7 @@ void VulkanReplayConsumer::Process_vkCmdSetFrontFaceEXT( format::HandleId commandBuffer, VkFrontFace frontFace) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetFrontFaceEXT(in_commandBuffer, frontFace); @@ -8724,7 +8724,7 @@ void VulkanReplayConsumer::Process_vkCmdSetPrimitiveTopologyEXT( format::HandleId commandBuffer, VkPrimitiveTopology primitiveTopology) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetPrimitiveTopologyEXT(in_commandBuffer, primitiveTopology); @@ -8741,7 +8741,7 @@ void VulkanReplayConsumer::Process_vkCmdSetViewportWithCountEXT( uint32_t viewportCount, StructPointerDecoder* pViewports) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkViewport* in_pViewports = pViewports->GetPointer(); @@ -8759,7 +8759,7 @@ void VulkanReplayConsumer::Process_vkCmdSetScissorWithCountEXT( uint32_t scissorCount, StructPointerDecoder* pScissors) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkRect2D* in_pScissors = pScissors->GetPointer(); @@ -8781,7 +8781,7 @@ void VulkanReplayConsumer::Process_vkCmdBindVertexBuffers2EXT( PointerDecoder* pSizes, PointerDecoder* pStrides) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBuffer* in_pBuffers = MapHandles(pBuffers, bindingCount, &VulkanObjectInfoTable::GetBufferInfo); const VkDeviceSize* in_pOffsets = pOffsets->GetPointer(); @@ -8801,7 +8801,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthTestEnableEXT( format::HandleId commandBuffer, VkBool32 depthTestEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthTestEnableEXT(in_commandBuffer, depthTestEnable); @@ -8817,7 +8817,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthWriteEnableEXT( format::HandleId commandBuffer, VkBool32 depthWriteEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthWriteEnableEXT(in_commandBuffer, depthWriteEnable); @@ -8833,7 +8833,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthCompareOpEXT( format::HandleId commandBuffer, VkCompareOp depthCompareOp) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthCompareOpEXT(in_commandBuffer, depthCompareOp); @@ -8849,7 +8849,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthBoundsTestEnableEXT( format::HandleId commandBuffer, VkBool32 depthBoundsTestEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthBoundsTestEnableEXT(in_commandBuffer, depthBoundsTestEnable); @@ -8865,7 +8865,7 @@ void VulkanReplayConsumer::Process_vkCmdSetStencilTestEnableEXT( format::HandleId commandBuffer, VkBool32 stencilTestEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetStencilTestEnableEXT(in_commandBuffer, stencilTestEnable); @@ -8885,7 +8885,7 @@ void VulkanReplayConsumer::Process_vkCmdSetStencilOpEXT( VkStencilOp depthFailOp, VkCompareOp compareOp) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetStencilOpEXT(in_commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp); @@ -8902,7 +8902,7 @@ void VulkanReplayConsumer::Process_vkCopyMemoryToImageEXT( format::HandleId device, StructPointerDecoder* pCopyMemoryToImageInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkCopyMemoryToImageInfoEXT* in_pCopyMemoryToImageInfo = pCopyMemoryToImageInfo->GetPointer(); MapStructHandles(pCopyMemoryToImageInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -8917,7 +8917,7 @@ void VulkanReplayConsumer::Process_vkCopyImageToMemoryEXT( format::HandleId device, StructPointerDecoder* pCopyImageToMemoryInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkCopyImageToMemoryInfoEXT* in_pCopyImageToMemoryInfo = pCopyImageToMemoryInfo->GetPointer(); MapStructHandles(pCopyImageToMemoryInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -8932,7 +8932,7 @@ void VulkanReplayConsumer::Process_vkCopyImageToImageEXT( format::HandleId device, StructPointerDecoder* pCopyImageToImageInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkCopyImageToImageInfoEXT* in_pCopyImageToImageInfo = pCopyImageToImageInfo->GetPointer(); MapStructHandles(pCopyImageToImageInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -8948,7 +8948,7 @@ void VulkanReplayConsumer::Process_vkTransitionImageLayoutEXT( uint32_t transitionCount, StructPointerDecoder* pTransitions) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkHostImageLayoutTransitionInfoEXT* in_pTransitions = pTransitions->GetPointer(); MapStructArrayHandles(pTransitions->GetMetaStructPointer(), pTransitions->GetLength(), GetObjectInfoTable()); @@ -8964,7 +8964,7 @@ void VulkanReplayConsumer::Process_vkGetImageSubresourceLayout2EXT( StructPointerDecoder* pSubresource, StructPointerDecoder* pLayout) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkImage in_image = MapHandle(image, &VulkanObjectInfoTable::GetImageInfo); const VkImageSubresource2KHR* in_pSubresource = pSubresource->GetPointer(); @@ -8985,7 +8985,7 @@ void VulkanReplayConsumer::Process_vkReleaseSwapchainImagesEXT( GFXRECON_LOG_DEBUG("Skip vkReleaseSwapchainImagesEXT for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkReleaseSwapchainImagesInfoEXT* in_pReleaseInfo = pReleaseInfo->GetPointer(); MapStructHandles(pReleaseInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9000,7 +9000,7 @@ void VulkanReplayConsumer::Process_vkGetGeneratedCommandsMemoryRequirementsNV( StructPointerDecoder* pInfo, StructPointerDecoder* pMemoryRequirements) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkGeneratedCommandsMemoryRequirementsInfoNV* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9015,7 +9015,7 @@ void VulkanReplayConsumer::Process_vkCmdPreprocessGeneratedCommandsNV( format::HandleId commandBuffer, StructPointerDecoder* pGeneratedCommandsInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkGeneratedCommandsInfoNV* in_pGeneratedCommandsInfo = pGeneratedCommandsInfo->GetPointer(); MapStructHandles(pGeneratedCommandsInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9034,7 +9034,7 @@ void VulkanReplayConsumer::Process_vkCmdExecuteGeneratedCommandsNV( VkBool32 isPreprocessed, StructPointerDecoder* pGeneratedCommandsInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkGeneratedCommandsInfoNV* in_pGeneratedCommandsInfo = pGeneratedCommandsInfo->GetPointer(); MapStructHandles(pGeneratedCommandsInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9054,7 +9054,7 @@ void VulkanReplayConsumer::Process_vkCmdBindPipelineShaderGroupNV( format::HandleId pipeline, uint32_t groupIndex) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkPipeline in_pipeline = MapHandle(pipeline, &VulkanObjectInfoTable::GetPipelineInfo); @@ -9074,7 +9074,7 @@ void VulkanReplayConsumer::Process_vkCreateIndirectCommandsLayoutNV( StructPointerDecoder* pAllocator, HandlePointerDecoder* pIndirectCommandsLayout) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkIndirectCommandsLayoutCreateInfoNV* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9095,7 +9095,7 @@ void VulkanReplayConsumer::Process_vkDestroyIndirectCommandsLayoutNV( format::HandleId indirectCommandsLayout, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkIndirectCommandsLayoutNV in_indirectCommandsLayout = MapHandle(indirectCommandsLayout, &VulkanObjectInfoTable::GetIndirectCommandsLayoutNVInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -9109,7 +9109,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthBias2EXT( format::HandleId commandBuffer, StructPointerDecoder* pDepthBiasInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkDepthBiasInfoEXT* in_pDepthBiasInfo = pDepthBiasInfo->GetPointer(); @@ -9128,7 +9128,7 @@ void VulkanReplayConsumer::Process_vkAcquireDrmDisplayEXT( int32_t drmFd, format::HandleId display) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkDisplayKHR in_display = MapHandle(display, &VulkanObjectInfoTable::GetDisplayKHRInfo); @@ -9144,7 +9144,7 @@ void VulkanReplayConsumer::Process_vkGetDrmDisplayEXT( uint32_t connectorId, HandlePointerDecoder* display) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); if (!display->IsNull()) { display->SetHandleLength(1); } VkDisplayKHR* out_display = display->GetHandlePointer(); @@ -9164,7 +9164,7 @@ void VulkanReplayConsumer::Process_vkCreatePrivateDataSlotEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pPrivateDataSlot) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkPrivateDataSlotCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -9184,7 +9184,7 @@ void VulkanReplayConsumer::Process_vkDestroyPrivateDataSlotEXT( format::HandleId privateDataSlot, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPrivateDataSlot in_privateDataSlot = MapHandle(privateDataSlot, &VulkanObjectInfoTable::GetPrivateDataSlotInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -9202,7 +9202,7 @@ void VulkanReplayConsumer::Process_vkSetPrivateDataEXT( format::HandleId privateDataSlot, uint64_t data) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); uint64_t in_objectHandle = MapHandle(objectHandle, objectType); VkPrivateDataSlot in_privateDataSlot = MapHandle(privateDataSlot, &VulkanObjectInfoTable::GetPrivateDataSlotInfo); @@ -9219,7 +9219,7 @@ void VulkanReplayConsumer::Process_vkGetPrivateDataEXT( format::HandleId privateDataSlot, PointerDecoder* pData) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); uint64_t in_objectHandle = MapHandle(objectHandle, objectType); VkPrivateDataSlot in_privateDataSlot = MapHandle(privateDataSlot, &VulkanObjectInfoTable::GetPrivateDataSlotInfo); @@ -9234,7 +9234,7 @@ void VulkanReplayConsumer::Process_vkCmdSetFragmentShadingRateEnumNV( VkFragmentShadingRateNV shadingRate, PointerDecoder* combinerOps) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkFragmentShadingRateCombinerOpKHR* in_combinerOps = combinerOps->GetPointer(); @@ -9253,7 +9253,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceFaultInfoEXT( StructPointerDecoder* pFaultCounts, StructPointerDecoder* pFaultInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeviceFaultCountsEXT* out_pFaultCounts = pFaultCounts->IsNull() ? nullptr : pFaultCounts->AllocateOutputData(1, { VK_STRUCTURE_TYPE_DEVICE_FAULT_COUNTS_EXT, nullptr }); InitializeOutputStructPNext(pFaultCounts); @@ -9270,7 +9270,7 @@ void VulkanReplayConsumer::Process_vkAcquireWinrtDisplayNV( format::HandleId physicalDevice, format::HandleId display) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); VkDisplayKHR in_display = MapHandle(display, &VulkanObjectInfoTable::GetDisplayKHRInfo); @@ -9285,7 +9285,7 @@ void VulkanReplayConsumer::Process_vkGetWinrtDisplayNV( uint32_t deviceRelativeId, HandlePointerDecoder* pDisplay) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); if (!pDisplay->IsNull()) { pDisplay->SetHandleLength(1); } VkDisplayKHR* out_pDisplay = pDisplay->GetHandlePointer(); @@ -9305,7 +9305,7 @@ void VulkanReplayConsumer::Process_vkCreateDirectFBSurfaceEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); const VkDirectFBSurfaceCreateInfoEXT* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -9326,7 +9326,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceDirectFBPresentationSuppor uint32_t queueFamilyIndex, uint64_t dfb) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); IDirectFB* in_dfb = static_cast(PreProcessExternalObject(dfb, format::ApiCallId::ApiCall_vkGetPhysicalDeviceDirectFBPresentationSupportEXT, "vkGetPhysicalDeviceDirectFBPresentationSupportEXT")); @@ -9341,7 +9341,7 @@ void VulkanReplayConsumer::Process_vkCmdSetVertexInputEXT( uint32_t vertexAttributeDescriptionCount, StructPointerDecoder* pVertexAttributeDescriptions) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkVertexInputBindingDescription2EXT* in_pVertexBindingDescriptions = pVertexBindingDescriptions->GetPointer(); const VkVertexInputAttributeDescription2EXT* in_pVertexAttributeDescriptions = pVertexAttributeDescriptions->GetPointer(); @@ -9361,7 +9361,7 @@ void VulkanReplayConsumer::Process_vkGetMemoryZirconHandleFUCHSIA( StructPointerDecoder* pGetZirconHandleInfo, PointerDecoder* pZirconHandle) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMemoryGetZirconHandleInfoFUCHSIA* in_pGetZirconHandleInfo = pGetZirconHandleInfo->GetPointer(); MapStructHandles(pGetZirconHandleInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9379,7 +9379,7 @@ void VulkanReplayConsumer::Process_vkGetMemoryZirconHandlePropertiesFUCHSIA( uint32_t zirconHandle, StructPointerDecoder* pMemoryZirconHandleProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkMemoryZirconHandlePropertiesFUCHSIA* out_pMemoryZirconHandleProperties = pMemoryZirconHandleProperties->IsNull() ? nullptr : pMemoryZirconHandleProperties->AllocateOutputData(1, { VK_STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA, nullptr }); InitializeOutputStructPNext(pMemoryZirconHandleProperties); @@ -9394,7 +9394,7 @@ void VulkanReplayConsumer::Process_vkImportSemaphoreZirconHandleFUCHSIA( format::HandleId device, StructPointerDecoder* pImportSemaphoreZirconHandleInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkImportSemaphoreZirconHandleInfoFUCHSIA* in_pImportSemaphoreZirconHandleInfo = pImportSemaphoreZirconHandleInfo->GetPointer(); MapStructHandles(pImportSemaphoreZirconHandleInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9410,7 +9410,7 @@ void VulkanReplayConsumer::Process_vkGetSemaphoreZirconHandleFUCHSIA( StructPointerDecoder* pGetZirconHandleInfo, PointerDecoder* pZirconHandle) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkSemaphoreGetZirconHandleInfoFUCHSIA* in_pGetZirconHandleInfo = pGetZirconHandleInfo->GetPointer(); MapStructHandles(pGetZirconHandleInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9426,7 +9426,7 @@ void VulkanReplayConsumer::Process_vkCmdBindInvocationMaskHUAWEI( format::HandleId imageView, VkImageLayout imageLayout) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkImageView in_imageView = MapHandle(imageView, &VulkanObjectInfoTable::GetImageViewInfo); @@ -9445,7 +9445,7 @@ void VulkanReplayConsumer::Process_vkGetMemoryRemoteAddressNV( StructPointerDecoder* pMemoryGetRemoteAddressInfo, PointerDecoder* pAddress) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMemoryGetRemoteAddressInfoNV* in_pMemoryGetRemoteAddressInfo = pMemoryGetRemoteAddressInfo->GetPointer(); MapStructHandles(pMemoryGetRemoteAddressInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9462,7 +9462,7 @@ void VulkanReplayConsumer::Process_vkCmdSetPatchControlPointsEXT( format::HandleId commandBuffer, uint32_t patchControlPoints) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetPatchControlPointsEXT(in_commandBuffer, patchControlPoints); @@ -9478,7 +9478,7 @@ void VulkanReplayConsumer::Process_vkCmdSetRasterizerDiscardEnableEXT( format::HandleId commandBuffer, VkBool32 rasterizerDiscardEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetRasterizerDiscardEnableEXT(in_commandBuffer, rasterizerDiscardEnable); @@ -9494,7 +9494,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthBiasEnableEXT( format::HandleId commandBuffer, VkBool32 depthBiasEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthBiasEnableEXT(in_commandBuffer, depthBiasEnable); @@ -9510,7 +9510,7 @@ void VulkanReplayConsumer::Process_vkCmdSetLogicOpEXT( format::HandleId commandBuffer, VkLogicOp logicOp) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetLogicOpEXT(in_commandBuffer, logicOp); @@ -9526,7 +9526,7 @@ void VulkanReplayConsumer::Process_vkCmdSetPrimitiveRestartEnableEXT( format::HandleId commandBuffer, VkBool32 primitiveRestartEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetPrimitiveRestartEnableEXT(in_commandBuffer, primitiveRestartEnable); @@ -9545,7 +9545,7 @@ void VulkanReplayConsumer::Process_vkCreateScreenSurfaceQNX( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSurface) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkInstance in_instance = MapHandle(instance, &VulkanObjectInfoTable::GetInstanceInfo); const VkScreenSurfaceCreateInfoQNX* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -9566,7 +9566,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceScreenPresentationSupportQ uint32_t queueFamilyIndex, uint64_t window) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); struct _screen_window* in_window = static_cast(PreProcessExternalObject(window, format::ApiCallId::ApiCall_vkGetPhysicalDeviceScreenPresentationSupportQNX, "vkGetPhysicalDeviceScreenPresentationSupportQNX")); @@ -9579,7 +9579,7 @@ void VulkanReplayConsumer::Process_vkCmdSetColorWriteEnableEXT( uint32_t attachmentCount, PointerDecoder* pColorWriteEnables) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBool32* in_pColorWriteEnables = pColorWriteEnables->GetPointer(); @@ -9600,7 +9600,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawMultiEXT( uint32_t firstInstance, uint32_t stride) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkMultiDrawInfoEXT* in_pVertexInfo = pVertexInfo->GetPointer(); @@ -9622,7 +9622,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawMultiIndexedEXT( uint32_t stride, PointerDecoder* pVertexOffset) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkMultiDrawIndexedInfoEXT* in_pIndexInfo = pIndexInfo->GetPointer(); const int32_t* in_pVertexOffset = pVertexOffset->GetPointer(); @@ -9643,7 +9643,7 @@ void VulkanReplayConsumer::Process_vkCreateMicromapEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pMicromap) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMicromapCreateInfoEXT* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9664,7 +9664,7 @@ void VulkanReplayConsumer::Process_vkDestroyMicromapEXT( format::HandleId micromap, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkMicromapEXT in_micromap = MapHandle(micromap, &VulkanObjectInfoTable::GetMicromapEXTInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -9679,7 +9679,7 @@ void VulkanReplayConsumer::Process_vkCmdBuildMicromapsEXT( uint32_t infoCount, StructPointerDecoder* pInfos) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkMicromapBuildInfoEXT* in_pInfos = pInfos->GetPointer(); MapStructArrayHandles(pInfos->GetMetaStructPointer(), pInfos->GetLength(), GetObjectInfoTable()); @@ -9700,7 +9700,7 @@ void VulkanReplayConsumer::Process_vkBuildMicromapsEXT( uint32_t infoCount, StructPointerDecoder* pInfos) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeferredOperationKHR in_deferredOperation = MapHandle(deferredOperation, &VulkanObjectInfoTable::GetDeferredOperationKHRInfo); const VkMicromapBuildInfoEXT* in_pInfos = pInfos->GetPointer(); @@ -9717,7 +9717,7 @@ void VulkanReplayConsumer::Process_vkCopyMicromapEXT( format::HandleId deferredOperation, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeferredOperationKHR in_deferredOperation = MapHandle(deferredOperation, &VulkanObjectInfoTable::GetDeferredOperationKHRInfo); const VkCopyMicromapInfoEXT* in_pInfo = pInfo->GetPointer(); @@ -9734,7 +9734,7 @@ void VulkanReplayConsumer::Process_vkCopyMicromapToMemoryEXT( format::HandleId deferredOperation, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeferredOperationKHR in_deferredOperation = MapHandle(deferredOperation, &VulkanObjectInfoTable::GetDeferredOperationKHRInfo); const VkCopyMicromapToMemoryInfoEXT* in_pInfo = pInfo->GetPointer(); @@ -9751,7 +9751,7 @@ void VulkanReplayConsumer::Process_vkCopyMemoryToMicromapEXT( format::HandleId deferredOperation, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeferredOperationKHR in_deferredOperation = MapHandle(deferredOperation, &VulkanObjectInfoTable::GetDeferredOperationKHRInfo); const VkCopyMemoryToMicromapInfoEXT* in_pInfo = pInfo->GetPointer(); @@ -9772,7 +9772,7 @@ void VulkanReplayConsumer::Process_vkWriteMicromapsPropertiesEXT( PointerDecoder* pData, size_t stride) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMicromapEXT* in_pMicromaps = MapHandles(pMicromaps, micromapCount, &VulkanObjectInfoTable::GetMicromapEXTInfo); void* out_pData = pData->IsNull() ? nullptr : pData->AllocateOutputData(dataSize); @@ -9786,7 +9786,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyMicromapEXT( format::HandleId commandBuffer, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyMicromapInfoEXT* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9804,7 +9804,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyMicromapToMemoryEXT( format::HandleId commandBuffer, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyMicromapToMemoryInfoEXT* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9822,7 +9822,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyMemoryToMicromapEXT( format::HandleId commandBuffer, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyMemoryToMicromapInfoEXT* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9844,7 +9844,7 @@ void VulkanReplayConsumer::Process_vkCmdWriteMicromapsPropertiesEXT( format::HandleId queryPool, uint32_t firstQuery) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkMicromapEXT* in_pMicromaps = MapHandles(pMicromaps, micromapCount, &VulkanObjectInfoTable::GetMicromapEXTInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -9863,7 +9863,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceMicromapCompatibilityEXT( StructPointerDecoder* pVersionInfo, PointerDecoder* pCompatibility) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMicromapVersionInfoEXT* in_pVersionInfo = pVersionInfo->GetPointer(); VkAccelerationStructureCompatibilityKHR* out_pCompatibility = pCompatibility->IsNull() ? nullptr : pCompatibility->AllocateOutputData(1, static_cast(0)); @@ -9878,7 +9878,7 @@ void VulkanReplayConsumer::Process_vkGetMicromapBuildSizesEXT( StructPointerDecoder* pBuildInfo, StructPointerDecoder* pSizeInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkMicromapBuildInfoEXT* in_pBuildInfo = pBuildInfo->GetPointer(); MapStructHandles(pBuildInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9895,7 +9895,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawClusterHUAWEI( uint32_t groupCountY, uint32_t groupCountZ) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdDrawClusterHUAWEI(in_commandBuffer, groupCountX, groupCountY, groupCountZ); @@ -9912,7 +9912,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawClusterIndirectHUAWEI( format::HandleId buffer, VkDeviceSize offset) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -9930,7 +9930,7 @@ void VulkanReplayConsumer::Process_vkSetDeviceMemoryPriorityEXT( format::HandleId memory, float priority) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeviceMemory in_memory = MapHandle(memory, &VulkanObjectInfoTable::GetDeviceMemoryInfo); @@ -9943,7 +9943,7 @@ void VulkanReplayConsumer::Process_vkGetDescriptorSetLayoutHostMappingInfoVALVE( StructPointerDecoder* pBindingReference, StructPointerDecoder* pHostMapping) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkDescriptorSetBindingReferenceVALVE* in_pBindingReference = pBindingReference->GetPointer(); MapStructHandles(pBindingReference->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9959,7 +9959,7 @@ void VulkanReplayConsumer::Process_vkGetDescriptorSetHostMappingVALVE( format::HandleId descriptorSet, PointerDecoder* ppData) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDescriptorSet in_descriptorSet = MapHandle(descriptorSet, &VulkanObjectInfoTable::GetDescriptorSetInfo); void** out_ppData = ppData->IsNull() ? nullptr : ppData->AllocateOutputData(1); @@ -9975,7 +9975,7 @@ void VulkanReplayConsumer::Process_vkGetPipelineIndirectMemoryRequirementsNV( StructPointerDecoder* pCreateInfo, StructPointerDecoder* pMemoryRequirements) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkComputePipelineCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -9991,7 +9991,7 @@ void VulkanReplayConsumer::Process_vkCmdUpdatePipelineIndirectBufferNV( VkPipelineBindPoint pipelineBindPoint, format::HandleId pipeline) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkPipeline in_pipeline = MapHandle(pipeline, &VulkanObjectInfoTable::GetPipelineInfo); @@ -10009,7 +10009,7 @@ void VulkanReplayConsumer::Process_vkGetPipelineIndirectDeviceAddressNV( format::HandleId device, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkPipelineIndirectDeviceAddressInfoNV* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -10022,7 +10022,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthClampEnableEXT( format::HandleId commandBuffer, VkBool32 depthClampEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthClampEnableEXT(in_commandBuffer, depthClampEnable); @@ -10038,7 +10038,7 @@ void VulkanReplayConsumer::Process_vkCmdSetPolygonModeEXT( format::HandleId commandBuffer, VkPolygonMode polygonMode) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetPolygonModeEXT(in_commandBuffer, polygonMode); @@ -10054,7 +10054,7 @@ void VulkanReplayConsumer::Process_vkCmdSetRasterizationSamplesEXT( format::HandleId commandBuffer, VkSampleCountFlagBits rasterizationSamples) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetRasterizationSamplesEXT(in_commandBuffer, rasterizationSamples); @@ -10071,7 +10071,7 @@ void VulkanReplayConsumer::Process_vkCmdSetSampleMaskEXT( VkSampleCountFlagBits samples, PointerDecoder* pSampleMask) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkSampleMask* in_pSampleMask = pSampleMask->GetPointer(); @@ -10088,7 +10088,7 @@ void VulkanReplayConsumer::Process_vkCmdSetAlphaToCoverageEnableEXT( format::HandleId commandBuffer, VkBool32 alphaToCoverageEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetAlphaToCoverageEnableEXT(in_commandBuffer, alphaToCoverageEnable); @@ -10104,7 +10104,7 @@ void VulkanReplayConsumer::Process_vkCmdSetAlphaToOneEnableEXT( format::HandleId commandBuffer, VkBool32 alphaToOneEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetAlphaToOneEnableEXT(in_commandBuffer, alphaToOneEnable); @@ -10120,7 +10120,7 @@ void VulkanReplayConsumer::Process_vkCmdSetLogicOpEnableEXT( format::HandleId commandBuffer, VkBool32 logicOpEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetLogicOpEnableEXT(in_commandBuffer, logicOpEnable); @@ -10138,7 +10138,7 @@ void VulkanReplayConsumer::Process_vkCmdSetColorBlendEnableEXT( uint32_t attachmentCount, PointerDecoder* pColorBlendEnables) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkBool32* in_pColorBlendEnables = pColorBlendEnables->GetPointer(); @@ -10157,7 +10157,7 @@ void VulkanReplayConsumer::Process_vkCmdSetColorBlendEquationEXT( uint32_t attachmentCount, StructPointerDecoder* pColorBlendEquations) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkColorBlendEquationEXT* in_pColorBlendEquations = pColorBlendEquations->GetPointer(); @@ -10176,7 +10176,7 @@ void VulkanReplayConsumer::Process_vkCmdSetColorWriteMaskEXT( uint32_t attachmentCount, PointerDecoder* pColorWriteMasks) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkColorComponentFlags* in_pColorWriteMasks = pColorWriteMasks->GetPointer(); @@ -10193,7 +10193,7 @@ void VulkanReplayConsumer::Process_vkCmdSetTessellationDomainOriginEXT( format::HandleId commandBuffer, VkTessellationDomainOrigin domainOrigin) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetTessellationDomainOriginEXT(in_commandBuffer, domainOrigin); @@ -10209,7 +10209,7 @@ void VulkanReplayConsumer::Process_vkCmdSetRasterizationStreamEXT( format::HandleId commandBuffer, uint32_t rasterizationStream) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetRasterizationStreamEXT(in_commandBuffer, rasterizationStream); @@ -10225,7 +10225,7 @@ void VulkanReplayConsumer::Process_vkCmdSetConservativeRasterizationModeEXT( format::HandleId commandBuffer, VkConservativeRasterizationModeEXT conservativeRasterizationMode) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetConservativeRasterizationModeEXT(in_commandBuffer, conservativeRasterizationMode); @@ -10241,7 +10241,7 @@ void VulkanReplayConsumer::Process_vkCmdSetExtraPrimitiveOverestimationSizeEXT( format::HandleId commandBuffer, float extraPrimitiveOverestimationSize) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetExtraPrimitiveOverestimationSizeEXT(in_commandBuffer, extraPrimitiveOverestimationSize); @@ -10257,7 +10257,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthClipEnableEXT( format::HandleId commandBuffer, VkBool32 depthClipEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthClipEnableEXT(in_commandBuffer, depthClipEnable); @@ -10273,7 +10273,7 @@ void VulkanReplayConsumer::Process_vkCmdSetSampleLocationsEnableEXT( format::HandleId commandBuffer, VkBool32 sampleLocationsEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetSampleLocationsEnableEXT(in_commandBuffer, sampleLocationsEnable); @@ -10291,7 +10291,7 @@ void VulkanReplayConsumer::Process_vkCmdSetColorBlendAdvancedEXT( uint32_t attachmentCount, StructPointerDecoder* pColorBlendAdvanced) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkColorBlendAdvancedEXT* in_pColorBlendAdvanced = pColorBlendAdvanced->GetPointer(); @@ -10308,7 +10308,7 @@ void VulkanReplayConsumer::Process_vkCmdSetProvokingVertexModeEXT( format::HandleId commandBuffer, VkProvokingVertexModeEXT provokingVertexMode) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetProvokingVertexModeEXT(in_commandBuffer, provokingVertexMode); @@ -10324,7 +10324,7 @@ void VulkanReplayConsumer::Process_vkCmdSetLineRasterizationModeEXT( format::HandleId commandBuffer, VkLineRasterizationModeEXT lineRasterizationMode) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetLineRasterizationModeEXT(in_commandBuffer, lineRasterizationMode); @@ -10340,7 +10340,7 @@ void VulkanReplayConsumer::Process_vkCmdSetLineStippleEnableEXT( format::HandleId commandBuffer, VkBool32 stippledLineEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetLineStippleEnableEXT(in_commandBuffer, stippledLineEnable); @@ -10356,7 +10356,7 @@ void VulkanReplayConsumer::Process_vkCmdSetDepthClipNegativeOneToOneEXT( format::HandleId commandBuffer, VkBool32 negativeOneToOne) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetDepthClipNegativeOneToOneEXT(in_commandBuffer, negativeOneToOne); @@ -10372,7 +10372,7 @@ void VulkanReplayConsumer::Process_vkCmdSetViewportWScalingEnableNV( format::HandleId commandBuffer, VkBool32 viewportWScalingEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetViewportWScalingEnableNV(in_commandBuffer, viewportWScalingEnable); @@ -10390,7 +10390,7 @@ void VulkanReplayConsumer::Process_vkCmdSetViewportSwizzleNV( uint32_t viewportCount, StructPointerDecoder* pViewportSwizzles) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkViewportSwizzleNV* in_pViewportSwizzles = pViewportSwizzles->GetPointer(); @@ -10407,7 +10407,7 @@ void VulkanReplayConsumer::Process_vkCmdSetCoverageToColorEnableNV( format::HandleId commandBuffer, VkBool32 coverageToColorEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetCoverageToColorEnableNV(in_commandBuffer, coverageToColorEnable); @@ -10423,7 +10423,7 @@ void VulkanReplayConsumer::Process_vkCmdSetCoverageToColorLocationNV( format::HandleId commandBuffer, uint32_t coverageToColorLocation) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetCoverageToColorLocationNV(in_commandBuffer, coverageToColorLocation); @@ -10439,7 +10439,7 @@ void VulkanReplayConsumer::Process_vkCmdSetCoverageModulationModeNV( format::HandleId commandBuffer, VkCoverageModulationModeNV coverageModulationMode) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetCoverageModulationModeNV(in_commandBuffer, coverageModulationMode); @@ -10455,7 +10455,7 @@ void VulkanReplayConsumer::Process_vkCmdSetCoverageModulationTableEnableNV( format::HandleId commandBuffer, VkBool32 coverageModulationTableEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetCoverageModulationTableEnableNV(in_commandBuffer, coverageModulationTableEnable); @@ -10472,7 +10472,7 @@ void VulkanReplayConsumer::Process_vkCmdSetCoverageModulationTableNV( uint32_t coverageModulationTableCount, PointerDecoder* pCoverageModulationTable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const float* in_pCoverageModulationTable = pCoverageModulationTable->GetPointer(); @@ -10489,7 +10489,7 @@ void VulkanReplayConsumer::Process_vkCmdSetShadingRateImageEnableNV( format::HandleId commandBuffer, VkBool32 shadingRateImageEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetShadingRateImageEnableNV(in_commandBuffer, shadingRateImageEnable); @@ -10505,7 +10505,7 @@ void VulkanReplayConsumer::Process_vkCmdSetRepresentativeFragmentTestEnableNV( format::HandleId commandBuffer, VkBool32 representativeFragmentTestEnable) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetRepresentativeFragmentTestEnableNV(in_commandBuffer, representativeFragmentTestEnable); @@ -10521,7 +10521,7 @@ void VulkanReplayConsumer::Process_vkCmdSetCoverageReductionModeNV( format::HandleId commandBuffer, VkCoverageReductionModeNV coverageReductionMode) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetCoverageReductionModeNV(in_commandBuffer, coverageReductionMode); @@ -10538,7 +10538,7 @@ void VulkanReplayConsumer::Process_vkGetShaderModuleIdentifierEXT( format::HandleId shaderModule, StructPointerDecoder* pIdentifier) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkShaderModule in_shaderModule = MapHandle(shaderModule, &VulkanObjectInfoTable::GetShaderModuleInfo); VkShaderModuleIdentifierEXT* out_pIdentifier = pIdentifier->IsNull() ? nullptr : pIdentifier->AllocateOutputData(1, { VK_STRUCTURE_TYPE_SHADER_MODULE_IDENTIFIER_EXT, nullptr }); @@ -10553,7 +10553,7 @@ void VulkanReplayConsumer::Process_vkGetShaderModuleCreateInfoIdentifierEXT( StructPointerDecoder* pCreateInfo, StructPointerDecoder* pIdentifier) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkShaderModuleCreateInfo* in_pCreateInfo = pCreateInfo->GetPointer(); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -10571,7 +10571,7 @@ void VulkanReplayConsumer::Process_vkGetPhysicalDeviceOpticalFlowImageFormatsNV( PointerDecoder* pFormatCount, StructPointerDecoder* pImageFormatProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkPhysicalDevice in_physicalDevice = MapHandle(physicalDevice, &VulkanObjectInfoTable::GetPhysicalDeviceInfo); const VkOpticalFlowImageFormatInfoNV* in_pOpticalFlowImageFormatInfo = pOpticalFlowImageFormatInfo->GetPointer(); uint32_t* out_pFormatCount = pFormatCount->IsNull() ? nullptr : pFormatCount->AllocateOutputData(1, GetOutputArrayCount("vkGetPhysicalDeviceOpticalFlowImageFormatsNV", returnValue, physicalDevice, kPhysicalDeviceArrayGetPhysicalDeviceOpticalFlowImageFormatsNV, pFormatCount, pImageFormatProperties, &VulkanObjectInfoTable::GetPhysicalDeviceInfo)); @@ -10591,7 +10591,7 @@ void VulkanReplayConsumer::Process_vkCreateOpticalFlowSessionNV( StructPointerDecoder* pAllocator, HandlePointerDecoder* pSession) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkOpticalFlowSessionCreateInfoNV* in_pCreateInfo = pCreateInfo->GetPointer(); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -10611,7 +10611,7 @@ void VulkanReplayConsumer::Process_vkDestroyOpticalFlowSessionNV( format::HandleId session, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkOpticalFlowSessionNV in_session = MapHandle(session, &VulkanObjectInfoTable::GetOpticalFlowSessionNVInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -10629,7 +10629,7 @@ void VulkanReplayConsumer::Process_vkBindOpticalFlowSessionImageNV( format::HandleId view, VkImageLayout layout) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkOpticalFlowSessionNV in_session = MapHandle(session, &VulkanObjectInfoTable::GetOpticalFlowSessionNVInfo); VkImageView in_view = MapHandle(view, &VulkanObjectInfoTable::GetImageViewInfo); @@ -10644,7 +10644,7 @@ void VulkanReplayConsumer::Process_vkCmdOpticalFlowExecuteNV( format::HandleId session, StructPointerDecoder* pExecuteInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkOpticalFlowSessionNV in_session = MapHandle(session, &VulkanObjectInfoTable::GetOpticalFlowSessionNVInfo); const VkOpticalFlowExecuteInfoNV* in_pExecuteInfo = pExecuteInfo->GetPointer(); @@ -10666,7 +10666,7 @@ void VulkanReplayConsumer::Process_vkCreateShadersEXT( StructPointerDecoder* pAllocator, HandlePointerDecoder* pShaders) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructArrayHandles(pCreateInfos->GetMetaStructPointer(), pCreateInfos->GetLength(), GetObjectInfoTable()); @@ -10698,7 +10698,7 @@ void VulkanReplayConsumer::Process_vkDestroyShaderEXT( format::HandleId shader, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkShaderEXT in_shader = MapHandle(shader, &VulkanObjectInfoTable::GetShaderEXTInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -10715,7 +10715,7 @@ void VulkanReplayConsumer::Process_vkGetShaderBinaryDataEXT( PointerDecoder* pDataSize, PointerDecoder* pData) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkShaderEXT in_shader = MapHandle(shader, &VulkanObjectInfoTable::GetShaderEXTInfo); size_t* out_pDataSize = pDataSize->IsNull() ? nullptr : pDataSize->AllocateOutputData(1, GetOutputArrayCount("vkGetShaderBinaryDataEXT", returnValue, shader, kShaderEXTArrayGetShaderBinaryDataEXT, pDataSize, pData, &VulkanObjectInfoTable::GetShaderEXTInfo)); @@ -10734,7 +10734,7 @@ void VulkanReplayConsumer::Process_vkCmdBindShadersEXT( PointerDecoder* pStages, HandlePointerDecoder* pShaders) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkShaderStageFlagBits* in_pStages = pStages->GetPointer(); const VkShaderEXT* in_pShaders = MapHandles(pShaders, stageCount, &VulkanObjectInfoTable::GetShaderEXTInfo); @@ -10755,7 +10755,7 @@ void VulkanReplayConsumer::Process_vkGetFramebufferTilePropertiesQCOM( PointerDecoder* pPropertiesCount, StructPointerDecoder* pProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkFramebuffer in_framebuffer = MapHandle(framebuffer, &VulkanObjectInfoTable::GetFramebufferInfo); uint32_t* out_pPropertiesCount = pPropertiesCount->IsNull() ? nullptr : pPropertiesCount->AllocateOutputData(1, GetOutputArrayCount("vkGetFramebufferTilePropertiesQCOM", returnValue, framebuffer, kFramebufferArrayGetFramebufferTilePropertiesQCOM, pPropertiesCount, pProperties, &VulkanObjectInfoTable::GetFramebufferInfo)); @@ -10774,7 +10774,7 @@ void VulkanReplayConsumer::Process_vkGetDynamicRenderingTilePropertiesQCOM( StructPointerDecoder* pRenderingInfo, StructPointerDecoder* pProperties) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkRenderingInfo* in_pRenderingInfo = pRenderingInfo->GetPointer(); MapStructHandles(pRenderingInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -10797,7 +10797,7 @@ void VulkanReplayConsumer::Process_vkSetLatencySleepModeNV( GFXRECON_LOG_DEBUG("Skip vkSetLatencySleepModeNV for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapchain = MapHandle(swapchain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id)->surface_creation_skipped) { return; } @@ -10819,7 +10819,7 @@ void VulkanReplayConsumer::Process_vkLatencySleepNV( GFXRECON_LOG_DEBUG("Skip vkLatencySleepNV for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapchain = MapHandle(swapchain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id)->surface_creation_skipped) { return; } @@ -10841,7 +10841,7 @@ void VulkanReplayConsumer::Process_vkSetLatencyMarkerNV( GFXRECON_LOG_DEBUG("Skip vkSetLatencyMarkerNV for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapchain = MapHandle(swapchain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id)->surface_creation_skipped) { return; } @@ -10861,7 +10861,7 @@ void VulkanReplayConsumer::Process_vkGetLatencyTimingsNV( GFXRECON_LOG_DEBUG("Skip vkGetLatencyTimingsNV for offscreen."); return; } - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkSwapchainKHR in_swapchain = MapHandle(swapchain, &VulkanObjectInfoTable::GetSwapchainKHRInfo); if (GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id) == nullptr || GetObjectInfoTable().GetSurfaceKHRInfo(GetObjectInfoTable().GetSwapchainKHRInfo(swapchain)->surface_id)->surface_creation_skipped) { return; } @@ -10876,7 +10876,7 @@ void VulkanReplayConsumer::Process_vkQueueNotifyOutOfBandNV( format::HandleId queue, StructPointerDecoder* pQueueTypeInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkQueue in_queue = MapHandle(queue, &VulkanObjectInfoTable::GetQueueInfo); const VkOutOfBandQueueTypeInfoNV* in_pQueueTypeInfo = pQueueTypeInfo->GetPointer(); @@ -10888,7 +10888,7 @@ void VulkanReplayConsumer::Process_vkCmdSetAttachmentFeedbackLoopEnableEXT( format::HandleId commandBuffer, VkImageAspectFlags aspectMask) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetAttachmentFeedbackLoopEnableEXT(in_commandBuffer, aspectMask); @@ -10907,7 +10907,7 @@ void VulkanReplayConsumer::Process_vkCreateAccelerationStructureKHR( StructPointerDecoder* pAllocator, HandlePointerDecoder* pAccelerationStructure) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pCreateInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -10928,7 +10928,7 @@ void VulkanReplayConsumer::Process_vkDestroyAccelerationStructureKHR( format::HandleId accelerationStructure, StructPointerDecoder* pAllocator) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkAccelerationStructureKHR in_accelerationStructure = MapHandle(accelerationStructure, &VulkanObjectInfoTable::GetAccelerationStructureKHRInfo); const VkAllocationCallbacks* in_pAllocator = GetAllocationCallbacks(pAllocator); @@ -10944,7 +10944,7 @@ void VulkanReplayConsumer::Process_vkCmdBuildAccelerationStructuresKHR( StructPointerDecoder* pInfos, StructPointerDecoder* ppBuildRangeInfos) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkAccelerationStructureBuildGeometryInfoKHR* in_pInfos = pInfos->GetPointer(); MapStructArrayHandles(pInfos->GetMetaStructPointer(), pInfos->GetLength(), GetObjectInfoTable()); @@ -10967,7 +10967,7 @@ void VulkanReplayConsumer::Process_vkCmdBuildAccelerationStructuresIndirectKHR( PointerDecoder* pIndirectStrides, PointerDecoder* ppMaxPrimitiveCounts) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkAccelerationStructureBuildGeometryInfoKHR* in_pInfos = pInfos->GetPointer(); MapStructArrayHandles(pInfos->GetMetaStructPointer(), pInfos->GetLength(), GetObjectInfoTable()); @@ -10990,7 +10990,7 @@ void VulkanReplayConsumer::Process_vkCopyAccelerationStructureToMemoryKHR( format::HandleId deferredOperation, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeferredOperationKHR in_deferredOperation = MapHandle(deferredOperation, &VulkanObjectInfoTable::GetDeferredOperationKHRInfo); const VkCopyAccelerationStructureToMemoryInfoKHR* in_pInfo = pInfo->GetPointer(); @@ -11007,7 +11007,7 @@ void VulkanReplayConsumer::Process_vkCopyMemoryToAccelerationStructureKHR( format::HandleId deferredOperation, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkDeferredOperationKHR in_deferredOperation = MapHandle(deferredOperation, &VulkanObjectInfoTable::GetDeferredOperationKHRInfo); const VkCopyMemoryToAccelerationStructureInfoKHR* in_pInfo = pInfo->GetPointer(); @@ -11028,7 +11028,7 @@ void VulkanReplayConsumer::Process_vkWriteAccelerationStructuresPropertiesKHR( PointerDecoder* pData, size_t stride) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkAccelerationStructureKHR* in_pAccelerationStructures = MapHandles(pAccelerationStructures, accelerationStructureCount, &VulkanObjectInfoTable::GetAccelerationStructureKHRInfo); void* out_pData = pData->IsNull() ? nullptr : pData->AllocateOutputData(dataSize); @@ -11042,7 +11042,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyAccelerationStructureKHR( format::HandleId commandBuffer, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyAccelerationStructureInfoKHR* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -11060,7 +11060,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyAccelerationStructureToMemoryKHR( format::HandleId commandBuffer, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyAccelerationStructureToMemoryInfoKHR* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -11078,7 +11078,7 @@ void VulkanReplayConsumer::Process_vkCmdCopyMemoryToAccelerationStructureKHR( format::HandleId commandBuffer, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkCopyMemoryToAccelerationStructureInfoKHR* in_pInfo = pInfo->GetPointer(); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -11097,7 +11097,7 @@ void VulkanReplayConsumer::Process_vkGetAccelerationStructureDeviceAddressKHR( format::HandleId device, StructPointerDecoder* pInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) auto in_device = GetObjectInfoTable().GetDeviceInfo(device); MapStructHandles(pInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -11114,7 +11114,7 @@ void VulkanReplayConsumer::Process_vkCmdWriteAccelerationStructuresPropertiesKHR format::HandleId queryPool, uint32_t firstQuery) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkAccelerationStructureKHR* in_pAccelerationStructures = MapHandles(pAccelerationStructures, accelerationStructureCount, &VulkanObjectInfoTable::GetAccelerationStructureKHRInfo); VkQueryPool in_queryPool = MapHandle(queryPool, &VulkanObjectInfoTable::GetQueryPoolInfo); @@ -11133,7 +11133,7 @@ void VulkanReplayConsumer::Process_vkGetDeviceAccelerationStructureCompatibility StructPointerDecoder* pVersionInfo, PointerDecoder* pCompatibility) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkAccelerationStructureVersionInfoKHR* in_pVersionInfo = pVersionInfo->GetPointer(); VkAccelerationStructureCompatibilityKHR* out_pCompatibility = pCompatibility->IsNull() ? nullptr : pCompatibility->AllocateOutputData(1, static_cast(0)); @@ -11149,7 +11149,7 @@ void VulkanReplayConsumer::Process_vkGetAccelerationStructureBuildSizesKHR( PointerDecoder* pMaxPrimitiveCounts, StructPointerDecoder* pSizeInfo) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); const VkAccelerationStructureBuildGeometryInfoKHR* in_pBuildInfo = pBuildInfo->GetPointer(); MapStructHandles(pBuildInfo->GetMetaStructPointer(), GetObjectInfoTable()); @@ -11171,7 +11171,7 @@ void VulkanReplayConsumer::Process_vkCmdTraceRaysKHR( uint32_t height, uint32_t depth) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkStridedDeviceAddressRegionKHR* in_pRaygenShaderBindingTable = pRaygenShaderBindingTable->GetPointer(); const VkStridedDeviceAddressRegionKHR* in_pMissShaderBindingTable = pMissShaderBindingTable->GetPointer(); @@ -11196,7 +11196,7 @@ void VulkanReplayConsumer::Process_vkGetRayTracingCaptureReplayShaderGroupHandle size_t dataSize, PointerDecoder* pData) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPipeline in_pipeline = MapHandle(pipeline, &VulkanObjectInfoTable::GetPipelineInfo); void* out_pData = pData->IsNull() ? nullptr : pData->AllocateOutputData(dataSize); @@ -11214,7 +11214,7 @@ void VulkanReplayConsumer::Process_vkCmdTraceRaysIndirectKHR( StructPointerDecoder* pCallableShaderBindingTable, VkDeviceAddress indirectDeviceAddress) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); const VkStridedDeviceAddressRegionKHR* in_pRaygenShaderBindingTable = pRaygenShaderBindingTable->GetPointer(); const VkStridedDeviceAddressRegionKHR* in_pMissShaderBindingTable = pMissShaderBindingTable->GetPointer(); @@ -11237,7 +11237,7 @@ void VulkanReplayConsumer::Process_vkGetRayTracingShaderGroupStackSizeKHR( uint32_t group, VkShaderGroupShaderKHR groupShader) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkDevice in_device = MapHandle(device, &VulkanObjectInfoTable::GetDeviceInfo); VkPipeline in_pipeline = MapHandle(pipeline, &VulkanObjectInfoTable::GetPipelineInfo); @@ -11249,7 +11249,7 @@ void VulkanReplayConsumer::Process_vkCmdSetRayTracingPipelineStackSizeKHR( format::HandleId commandBuffer, uint32_t pipelineStackSize) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdSetRayTracingPipelineStackSizeKHR(in_commandBuffer, pipelineStackSize); @@ -11267,7 +11267,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawMeshTasksEXT( uint32_t groupCountY, uint32_t groupCountZ) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); GetDeviceTable(in_commandBuffer)->CmdDrawMeshTasksEXT(in_commandBuffer, groupCountX, groupCountY, groupCountZ); @@ -11286,7 +11286,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawMeshTasksIndirectEXT( uint32_t drawCount, uint32_t stride) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); @@ -11308,7 +11308,7 @@ void VulkanReplayConsumer::Process_vkCmdDrawMeshTasksIndirectCountEXT( uint32_t maxDrawCount, uint32_t stride) { - GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) + // GFXRECON_WRITE_CONSOLE("[REPLAY] %s()", __func__) VkCommandBuffer in_commandBuffer = MapHandle(commandBuffer, &VulkanObjectInfoTable::GetCommandBufferInfo); VkBuffer in_buffer = MapHandle(buffer, &VulkanObjectInfoTable::GetBufferInfo); VkBuffer in_countBuffer = MapHandle(countBuffer, &VulkanObjectInfoTable::GetBufferInfo); From 4d6bd1cceca42dc6f4e594dd6ddee065c5fbc59a Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 9 Sep 2024 16:51:20 +0300 Subject: [PATCH 89/99] init_from_asset_file flag hack --- framework/encode/vulkan_handle_wrappers.h | 2 + framework/encode/vulkan_state_tracker.h | 2 +- .../vulkan_state_tracker_initializers.h | 9 ++- framework/encode/vulkan_state_writer.cpp | 77 ++++++++++++++----- 4 files changed, 66 insertions(+), 24 deletions(-) diff --git a/framework/encode/vulkan_handle_wrappers.h b/framework/encode/vulkan_handle_wrappers.h index b01452fb83..d0744b06db 100644 --- a/framework/encode/vulkan_handle_wrappers.h +++ b/framework/encode/vulkan_handle_wrappers.h @@ -242,6 +242,7 @@ struct AssetWrapperBase VkDeviceSize size{ 0 }; bool dirty{ true }; + bool init_from_asset_file{ false }; std::unordered_set descriptor_sets_bound_to; }; @@ -414,6 +415,7 @@ struct DescriptorSetWrapper : public HandleWrapper vulkan_state_info::CreateDependencyInfo set_layout_dependency; bool dirty{ true }; + bool init_from_asset_file{ false }; }; struct DescriptorPoolWrapper : public HandleWrapper diff --git a/framework/encode/vulkan_state_tracker.h b/framework/encode/vulkan_state_tracker.h index 7a20a6b76f..74c04fe8d7 100644 --- a/framework/encode/vulkan_state_tracker.h +++ b/framework/encode/vulkan_state_tracker.h @@ -687,7 +687,7 @@ class VulkanStateTracker void TrackBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo); - void LoadAssetFileOffsets(const format::AssetFileOffsets& offsets) { asset_file_offsets_ = offsets; } + void LoadAssetFileOffsets(const format::AssetFileOffsets& offsets); private: template diff --git a/framework/encode/vulkan_state_tracker_initializers.h b/framework/encode/vulkan_state_tracker_initializers.h index 4eca94e582..114f0f43dd 100644 --- a/framework/encode/vulkan_state_tracker_initializers.h +++ b/framework/encode/vulkan_state_tracker_initializers.h @@ -640,7 +640,8 @@ inline void InitializeStaterbegin(); if (last_frame_entry->second.find(wrapper->handle_id) != last_frame_entry->second.end()) { - wrapper->dirty = false; + wrapper->init_from_asset_file = true; + wrapper->dirty = false; } } } @@ -689,7 +690,8 @@ inline void InitializeStaterbegin(); if (last_frame_entry->second.find(wrapper->handle_id) != last_frame_entry->second.end()) { - wrapper->dirty = false; + wrapper->dirty = false; + wrapper->init_from_asset_file = true; } } } @@ -968,7 +970,8 @@ inline void InitializePoolObjectState(VkDevice par auto last_frame_entry = asset_file_offsets->rbegin(); if (last_frame_entry->second.find(wrapper->handle_id) != last_frame_entry->second.end()) { - wrapper->dirty = false; + wrapper->init_from_asset_file = true; + wrapper->dirty = false; } } } diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index 857eb7ed1f..636333a390 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -1016,7 +1016,7 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa // Create a temporary object on first encounter. if (dep_inserted.second) { - if (wrapper->dirty) + if (wrapper->dirty && !wrapper->init_from_asset_file) { const int64_t offset = asset_file_stream_->GetOffset(); (*asset_file_offsets_)[wrapper->handle_id] = offset; @@ -1031,9 +1031,16 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa { if (output_stream_ != nullptr) { - assert((*asset_file_offsets_).find(wrapper->handle_id) != (*asset_file_offsets_).end()); - const int64_t offset = (*asset_file_offsets_)[wrapper->handle_id]; - WriteExecuteFromFile(asset_file_stream_->GetFilename(), 1, offset); + if ((*asset_file_offsets_).find(wrapper->handle_id) != (*asset_file_offsets_).end()) + { + const int64_t offset = (*asset_file_offsets_)[wrapper->handle_id]; + WriteExecuteFromFile(asset_file_stream_->GetFilename(), 1, offset); + } + else + { + GFXRECON_LOG_WARNING( + "%s() Desc set %" PRIu64 " was not in offset map", __func__, wrapper->handle_id); + } } } } @@ -1045,14 +1052,20 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa uint32_t n_blocks = 0; int64_t offset; - if (wrapper->dirty) + if (wrapper->dirty && !wrapper->init_from_asset_file) { offset = asset_file_stream_->GetOffset(); } else { - assert((*asset_file_offsets_).find(wrapper->handle_id) != (*asset_file_offsets_).end()); - offset = (*asset_file_offsets_)[wrapper->handle_id]; + if ((*asset_file_offsets_).find(wrapper->handle_id) != (*asset_file_offsets_).end()) + { + offset = (*asset_file_offsets_)[wrapper->handle_id]; + } + else + { + GFXRECON_LOG_WARNING("%s() Desc set %" PRIu64 " was not in offset map", __func__, wrapper->handle_id); + } } // Filter duplicate calls to vkAllocateDescriptorSets for descriptor sets that were allocated by the same @@ -1060,7 +1073,7 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa const auto new_entry = processed.insert(wrapper->create_parameters.get()); if (new_entry.second) { - if (wrapper->dirty) + if (wrapper->dirty && !wrapper->init_from_asset_file) { // Write descriptor set creation call and add the parameter buffer to the processed set. WriteFunctionCall(wrapper->create_call_id, wrapper->create_parameters.get(), asset_file_stream_); @@ -1098,7 +1111,7 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa // End of an active descriptor write range. active = false; write.descriptorCount = i - write.dstArrayElement; - if (wrapper->dirty) + if (wrapper->dirty && !wrapper->init_from_asset_file) { WriteDescriptorUpdateCommand( wrapper->device->handle_id, binding, &write, asset_file_stream_); @@ -1111,7 +1124,7 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa // Mutable descriptor type change within an active write range // End current range write.descriptorCount = i - write.dstArrayElement; - if (wrapper->dirty) + if (wrapper->dirty && !wrapper->init_from_asset_file) { WriteDescriptorUpdateCommand(wrapper->device->handle_id, binding, &write, asset_file_stream_); } @@ -1128,7 +1141,7 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa { write.descriptorCount = binding->count - write.dstArrayElement; - if (wrapper->dirty) + if (wrapper->dirty && !wrapper->init_from_asset_file) { WriteDescriptorUpdateCommand(wrapper->device->handle_id, binding, &write, asset_file_stream_); } @@ -1143,13 +1156,18 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa WriteExecuteFromFile(asset_file_stream_->GetFilename(), n_blocks, offset); } - if (wrapper->dirty) + if (wrapper->dirty && !wrapper->init_from_asset_file) { wrapper->dirty = false; (*asset_file_offsets_)[wrapper->handle_id] = offset; fprintf(debug, "%" PRIu64 " -> %" PRId64 "\n", wrapper->handle_id, offset); } + else + { + wrapper->dirty = false; + wrapper->init_from_asset_file = false; + } }); // Temporary object destruction. @@ -1669,7 +1687,7 @@ void VulkanStateWriter::ProcessBufferMemoryWithAssetFile(const vulkan_wrappers:: assert((buffer_wrapper != nullptr)); - if (buffer_wrapper->dirty) + if (buffer_wrapper->dirty && !buffer_wrapper->init_from_asset_file) { assert(memory_wrapper != nullptr); buffer_wrapper->dirty = false; @@ -1777,11 +1795,21 @@ void VulkanStateWriter::ProcessBufferMemoryWithAssetFile(const vulkan_wrappers:: } else { + buffer_wrapper->dirty = false; + buffer_wrapper->init_from_asset_file = false; + if (output_stream_ != nullptr) { - assert((*asset_file_offsets_).find(buffer_wrapper->handle_id) != (*asset_file_offsets_).end()); - const int64_t offset = (*asset_file_offsets_)[buffer_wrapper->handle_id]; - WriteExecuteFromFile(asset_file_stream_->GetFilename(), 1, offset); + if ((*asset_file_offsets_).find(buffer_wrapper->handle_id) != (*asset_file_offsets_).end()) + { + const int64_t offset = (*asset_file_offsets_)[buffer_wrapper->handle_id]; + WriteExecuteFromFile(asset_file_stream_->GetFilename(), 1, offset); + } + else + { + GFXRECON_LOG_WARNING( + "%s() Buffer %" PRIu64 " was not in offset map", __func__, buffer_wrapper->handle_id); + } } } } @@ -1954,7 +1982,7 @@ void VulkanStateWriter::ProcessImageMemoryWithAssetFile(const vulkan_wrappers::D assert(image_wrapper != nullptr); - if (image_wrapper->dirty) + if (image_wrapper->dirty && !image_wrapper->init_from_asset_file) { assert((image_wrapper->is_swapchain_image && memory_wrapper == nullptr) || (!image_wrapper->is_swapchain_image && memory_wrapper != nullptr)); @@ -2107,11 +2135,20 @@ void VulkanStateWriter::ProcessImageMemoryWithAssetFile(const vulkan_wrappers::D } else { + image_wrapper->dirty = false; + image_wrapper->init_from_asset_file = false; if (output_stream_ != nullptr) { - assert((*asset_file_offsets_).find(image_wrapper->handle_id) != (*asset_file_offsets_).end()); - const int64_t offset = (*asset_file_offsets_)[image_wrapper->handle_id]; - WriteExecuteFromFile(asset_file_stream_->GetFilename(), 1, offset); + if ((*asset_file_offsets_).find(image_wrapper->handle_id) != (*asset_file_offsets_).end()) + { + const int64_t offset = (*asset_file_offsets_)[image_wrapper->handle_id]; + WriteExecuteFromFile(asset_file_stream_->GetFilename(), 1, offset); + } + else + { + GFXRECON_LOG_WARNING( + "%s() Image %" PRIu64 " was not in offset map", __func__, image_wrapper->handle_id); + } } } } From 5c70695cdb817b581c0411848466f4c1499c6e10 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 9 Sep 2024 17:58:21 +0300 Subject: [PATCH 90/99] Remove more instrumentation --- framework/decode/asset_file_consumer.cpp | 12 +++---- framework/decode/asset_file_consumer.h | 26 +++++++------- .../decode/vulkan_replay_consumer_base.cpp | 12 +++---- framework/encode/capture_manager.cpp | 6 ++-- framework/encode/vulkan_state_writer.cpp | 36 ++++++++++++------- 5 files changed, 51 insertions(+), 41 deletions(-) diff --git a/framework/decode/asset_file_consumer.cpp b/framework/decode/asset_file_consumer.cpp index 9d7fb5b07f..875cf691ae 100644 --- a/framework/decode/asset_file_consumer.cpp +++ b/framework/decode/asset_file_consumer.cpp @@ -52,8 +52,8 @@ void AssetFileConsumer::ProcessFrameBeginMarker(uint64_t frame_number) asset_file_offsets_[frame_number] = last_frame_entry->second; } - fprintf(debug_, "%s() %" PRId64 "\n", __func__, frame_number); - fsync(fileno(debug_)); + // fprintf(debug_, "%s() %" PRId64 "\n", __func__, frame_number); + // fsync(fileno(debug_)); } void AssetFileConsumer::ProcessInitBufferCommand(format::HandleId device_id, @@ -67,7 +67,7 @@ void AssetFileConsumer::ProcessInitBufferCommand(format::HandleId device_id, format::FrameAssetFileOffsets& frame_offsets = asset_file_offsets_[current_frame_]; frame_offsets[buffer_id] = block_header_file_offset_; - fprintf(debug_, "buffer %" PRIu64 " -> %" PRId64 "\n", buffer_id, block_header_file_offset_); + // fprintf(debug_, "buffer %" PRIu64 " -> %" PRId64 "\n", buffer_id, block_header_file_offset_); // fsync(fileno(debug_)); if (buffer_id > greatest_id_) @@ -93,7 +93,7 @@ void AssetFileConsumer::ProcessInitImageCommand(format::HandleId dev format::FrameAssetFileOffsets& frame_offsets = asset_file_offsets_[current_frame_]; frame_offsets[image_id] = block_header_file_offset_; - fprintf(debug_, "image %" PRIu64 " -> %" PRId64 "\n", image_id, block_header_file_offset_); + // fprintf(debug_, "image %" PRIu64 " -> %" PRId64 "\n", image_id, block_header_file_offset_); // fsync(fileno(debug_)); if (image_id > greatest_id_) @@ -121,7 +121,7 @@ void AssetFileConsumer::Process_vkAllocateDescriptorSets( format::FrameAssetFileOffsets& frame_offsets = asset_file_offsets_[current_frame_]; asset_file_offsets_[current_frame_][desc_id] = block_header_file_offset_; - fprintf(debug_, "%" PRIu64 " -> %" PRId64 "\n", desc_id, block_header_file_offset_); + // fprintf(debug_, "%" PRIu64 " -> %" PRId64 "\n", desc_id, block_header_file_offset_); // fsync(fileno(debug_)); if (desc_id > greatest_id_) @@ -150,7 +150,7 @@ void AssetFileConsumer::Process_vkUpdateDescriptorSets( const auto new_entry = frame_offsets.insert({ desc_id, block_header_file_offset_ }); if (new_entry.second) { - fprintf(debug_, "%" PRIu64 " -> %" PRId64 "\n", desc_id, block_header_file_offset_); + // fprintf(debug_, "%" PRIu64 " -> %" PRId64 "\n", desc_id, block_header_file_offset_); // fsync(fileno(debug_)); } diff --git a/framework/decode/asset_file_consumer.h b/framework/decode/asset_file_consumer.h index d54342acdb..d420abc57c 100644 --- a/framework/decode/asset_file_consumer.h +++ b/framework/decode/asset_file_consumer.h @@ -42,22 +42,22 @@ 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() { - if (debug_) - { - util::platform::FileClose(debug_); - } + // if (debug_) + // { + // util::platform::FileClose(debug_); + // } } virtual void ProcessFrameBeginMarker(uint64_t frame_number) override; @@ -108,7 +108,7 @@ class AssetFileConsumer : public VulkanConsumer format::AssetFileOffsets asset_file_offsets_; format::FrameNumber current_frame_; format::HandleId greatest_id_; - FILE* debug_; + // FILE* debug_; }; GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/decode/vulkan_replay_consumer_base.cpp b/framework/decode/vulkan_replay_consumer_base.cpp index aa7bacea3d..fbc7770f3a 100644 --- a/framework/decode/vulkan_replay_consumer_base.cpp +++ b/framework/decode/vulkan_replay_consumer_base.cpp @@ -287,8 +287,8 @@ void VulkanReplayConsumerBase::ProcessStateBeginMarker(uint64_t frame_number) // If a trace file has the state begin marker, it must be a trim trace file. replaying_trimmed_capture_ = true; - GFXRECON_WRITE_CONSOLE("%s() current_frame_: %" PRIu64, __func__, current_frame_) - GFXRECON_WRITE_CONSOLE("%s() frame_number: %" PRIu64, __func__, frame_number) + // GFXRECON_WRITE_CONSOLE("%s() current_frame_: %" PRIu64, __func__, current_frame_) + // GFXRECON_WRITE_CONSOLE("%s() frame_number: %" PRIu64, __func__, frame_number) } void VulkanReplayConsumerBase::ProcessStateEndMarker(uint64_t frame_number) @@ -301,7 +301,7 @@ void VulkanReplayConsumerBase::ProcessStateEndMarker(uint64_t frame_number) } current_frame_ = frame_number; - GFXRECON_WRITE_CONSOLE("%s() current_frame_: %" PRIu64, __func__, current_frame_) + // GFXRECON_WRITE_CONSOLE("%s() current_frame_: %" PRIu64, __func__, current_frame_) if (override_frame_number_fp_ != nullptr) { @@ -311,7 +311,7 @@ void VulkanReplayConsumerBase::ProcessStateEndMarker(uint64_t frame_number) void VulkanReplayConsumerBase::ProcessFrameBeginMarker(uint64_t frame_number) { - GFXRECON_WRITE_CONSOLE("%s() frame_number: %" PRIu64, __func__, frame_number) + // GFXRECON_WRITE_CONSOLE("%s() frame_number: %" PRIu64, __func__, frame_number) current_frame_ = frame_number; if (override_frame_number_fp_ != nullptr) @@ -322,9 +322,9 @@ void VulkanReplayConsumerBase::ProcessFrameBeginMarker(uint64_t frame_number) void VulkanReplayConsumerBase::ProcessFrameEndMarker(uint64_t frame_number) { - GFXRECON_WRITE_CONSOLE("%s() frame_number: %" PRIu64, __func__, frame_number) + // GFXRECON_WRITE_CONSOLE("%s() frame_number: %" PRIu64, __func__, frame_number) current_frame_ = frame_number + 1; - GFXRECON_WRITE_CONSOLE("%s() current_frame_: %" PRIu64, __func__, current_frame_) + // GFXRECON_WRITE_CONSOLE("%s() current_frame_: %" PRIu64, __func__, current_frame_) if (override_frame_number_fp_ != nullptr) { diff --git a/framework/encode/capture_manager.cpp b/framework/encode/capture_manager.cpp index 4da861c822..27ac8a38cf 100644 --- a/framework/encode/capture_manager.cpp +++ b/framework/encode/capture_manager.cpp @@ -1855,7 +1855,7 @@ void CommonCaptureManager::OverrideFrame(format::FrameNumber frame) format::HandleId CommonCaptureManager::GetUniqueId(VkObjectType type) { - GFXRECON_WRITE_CONSOLE("%s(type: %s)", __func__, VkObjectTypeToStr(type)); + // GFXRECON_WRITE_CONSOLE("%s(type: %s)", __func__, VkObjectTypeToStr(type)); if (!handle_ids_override.empty()) { @@ -1871,13 +1871,13 @@ format::HandleId CommonCaptureManager::GetUniqueId(VkObjectType type) } handle_ids_override.pop(); - GFXRECON_WRITE_CONSOLE(" Removing from stack %" PRIu64 "(%zu)", top.first, handle_ids_override.size()); + // GFXRECON_WRITE_CONSOLE(" Removing from stack %" PRIu64 "(%zu)", top.first, handle_ids_override.size()); return top.first; } else { - GFXRECON_WRITE_CONSOLE(" Incrementing %" PRIu64, unique_id_counter_ + 1); + // GFXRECON_WRITE_CONSOLE(" Incrementing %" PRIu64, unique_id_counter_ + 1); return ++unique_id_counter_; } } diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index 636333a390..c3c7ffae19 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -46,7 +46,7 @@ GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(encode) -static FILE* debug = nullptr; +// static FILE* debug = nullptr; const uint32_t kDefaultQueueFamilyIndex = 0; static bool IsMemoryCoherent(VkMemoryPropertyFlags property_flags) @@ -103,7 +103,7 @@ WriteFrameMarker(format::MarkerType marker_type, uint64_t frame_number, util::Fi { assert(output_stream != nullptr); - fprintf(debug, "%s() %" PRId64 "\n", __func__, frame_number); + // fprintf(debug, "%s() %" PRId64 "\n", __func__, frame_number); format::Marker marker_cmd; uint64_t header_size = sizeof(format::Marker); @@ -121,16 +121,21 @@ uint64_t VulkanStateWriter::WriteAssets(const VulkanStateTable& state_table, uin blocks_written_ = 0; - debug = fopen("/storage/emulated/0/Download/WriteState.txt", "a"); - assert(debug); +// #if defined(VK_USE_PLATFORM_ANDROID_KHR) +// debug = fopen("/storage/emulated/0/Download/WriteState.txt", "a"); +// #else +// debug = fopen("WriteState.txt", "a"); +// #endif + + // assert(debug); WriteFrameMarker(format::MarkerType::kBeginMarker, frame_number, asset_file_stream_); WriteResourceMemoryState(state_table, false); WriteDescriptorSetStateWithAssetFile(state_table); - fsync(fileno(debug)); - fclose(debug); + // fsync(fileno(debug)); + // fclose(debug); return blocks_written_; } @@ -140,8 +145,13 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint // clang-format off blocks_written_ = 0; - debug = fopen("/storage/emulated/0/Download/WriteState.txt", "a"); - assert(debug); +// #if defined(VK_USE_PLATFORM_ANDROID_KHR) +// debug = fopen("/storage/emulated/0/Download/WriteState.txt", "a"); +// #else +// debug = fopen("WriteState.txt", "a"); +// #endif + +// assert(debug); auto started = std::chrono::high_resolution_clock::now(); @@ -252,8 +262,8 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint asset_file_stream_->Flush(); } - fsync(fileno(debug)); - fclose(debug); + // fsync(fileno(debug)); + // fclose(debug); // For the EndMarker meta command ++blocks_written_; @@ -1161,7 +1171,7 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa wrapper->dirty = false; (*asset_file_offsets_)[wrapper->handle_id] = offset; - fprintf(debug, "%" PRIu64 " -> %" PRId64 "\n", wrapper->handle_id, offset); + // fprintf(debug, "%" PRIu64 " -> %" PRId64 "\n", wrapper->handle_id, offset); } else { @@ -1773,7 +1783,7 @@ void VulkanStateWriter::ProcessBufferMemoryWithAssetFile(const vulkan_wrappers:: asset_file_stream_->Write(bytes, data_size); (*asset_file_offsets_)[buffer_wrapper->handle_id] = offset; - fprintf(debug, "buffer %" PRIu64 " -> %" PRId64 "\n", buffer_wrapper->handle_id, offset); + // fprintf(debug, "buffer %" PRIu64 " -> %" PRId64 "\n", buffer_wrapper->handle_id, offset); if (output_stream_ != nullptr) { @@ -2105,7 +2115,7 @@ void VulkanStateWriter::ProcessImageMemoryWithAssetFile(const vulkan_wrappers::D asset_file_stream_->Write(snapshot_entry.level_sizes.data(), levels_size); asset_file_stream_->Write(bytes, data_size); - fprintf(debug, "image %" PRIu64 " -> %" PRId64 "\n", image_wrapper->handle_id, offset); + // fprintf(debug, "image %" PRIu64 " -> %" PRId64 "\n", image_wrapper->handle_id, offset); if (output_stream_ != nullptr) { From 2674af44e8f5418cc9b52c7bd6d1099998968bd3 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 9 Sep 2024 18:01:12 +0300 Subject: [PATCH 91/99] Add framework/encode/custom_exported_layer_funcs.h --- .../encode/custom_exported_layer_funcs.h | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 framework/encode/custom_exported_layer_funcs.h diff --git a/framework/encode/custom_exported_layer_funcs.h b/framework/encode/custom_exported_layer_funcs.h new file mode 100644 index 0000000000..7c2eed08ac --- /dev/null +++ b/framework/encode/custom_exported_layer_funcs.h @@ -0,0 +1,50 @@ +/* +** Copyright (c) 2024 Valve Corporation +** Copyright (c) 2024 LunarG, Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and associated documentation files (the "Software"), +** to deal in the Software without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Software, and to permit persons to whom the +** Software is furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Software. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +*/ + +#ifndef GFXRECON_LAYER_CUSTOM_EXPORTED_FUNCS_H +#define GFXRECON_LAYER_CUSTOM_EXPORTED_FUNCS_H + +#include "format/format.h" +#include + +GFXRECON_BEGIN_NAMESPACE(gfxrecon) +GFXRECON_BEGIN_NAMESPACE(encode) + +typedef void (*GetBlockIndexGFXR_ptr)(void); +typedef void (*DumpAssetsGFXR_ptr)(void); +typedef void (*SetUniqueIdOffsetGFXRPtr)(format::HandleId); +typedef void (*LoadAssetFileOffsetsGFXRPtr)(const format::AssetFileOffsets&); +typedef void (*OverrideCaptureObjectIdFuncPtr)(format::HandleId, VkObjectType); +typedef void (*OverrideFrameNumberGFXRPtr)(format::FrameNumber); + +VKAPI_ATTR uint64_t VKAPI_CALL GetBlockIndexGFXR(); +VKAPI_ATTR void VKAPI_CALL DumpAssetsGFXR(); +VKAPI_ATTR void VKAPI_CALL SetUniqueIdOffsetGFXR(format::HandleId offset); +VKAPI_ATTR void VKAPI_CALL LoadAssetFileOffsetsGFXR(const format::AssetFileOffsets& offsets); +VKAPI_ATTR void VKAPI_CALL OverrideIdForNextVulkanObjectGFXR(format::HandleId id, VkObjectType type); +VKAPI_ATTR void VKAPI_CALL OverrideFrameNumberGFXR(format::FrameNumber frame); + +GFXRECON_END_NAMESPACE(encode) +GFXRECON_END_NAMESPACE(gfxrecon) + +#endif // GFXRECON_LAYER_CUSTOM_EXPORTED_FUNCS_H From 640b19288432f792a8ebe0c9ec788c4f2fa6921d Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 9 Sep 2024 18:37:04 +0300 Subject: [PATCH 92/99] Fix win build --- framework/encode/api_capture_manager.h | 1 + framework/encode/capture_manager.h | 2 ++ framework/encode/vulkan_state_writer.cpp | 1 - 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/encode/api_capture_manager.h b/framework/encode/api_capture_manager.h index 281813e3c0..a6ecef2a0c 100644 --- a/framework/encode/api_capture_manager.h +++ b/framework/encode/api_capture_manager.h @@ -39,6 +39,7 @@ class ApiCaptureManager void SetCommonManager(CommonCaptureManager* common_manager) { common_manager_ = common_manager; } // Forwarded Statics + static format::HandleId GetUniqueId() { return CommonCaptureManager::GetUniqueId(); } static format::HandleId GetUniqueId(VkObjectType type) { return CommonCaptureManager::GetUniqueId(type); } static auto AcquireSharedApiCallLock() { return std::move(CommonCaptureManager::AcquireSharedApiCallLock()); } diff --git a/framework/encode/capture_manager.h b/framework/encode/capture_manager.h index 29c8f9e4e3..36b1f83678 100644 --- a/framework/encode/capture_manager.h +++ b/framework/encode/capture_manager.h @@ -67,6 +67,8 @@ class CommonCaptureManager typedef std::shared_mutex ApiCallMutexT; + static format::HandleId GetUniqueId() { return ++unique_id_counter_; } + static format::HandleId GetUniqueId(VkObjectType type); static auto AcquireSharedApiCallLock() { return std::move(std::shared_lock(api_call_mutex_)); } diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index c3c7ffae19..6ce6466649 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -36,7 +36,6 @@ #include #include #include -#include #include #if defined(VK_USE_PLATFORM_ANDROID_KHR) From d93fd22c7b9dabe30be6a5bdf9ed1d2e118a3964 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Mon, 9 Sep 2024 21:06:25 +0300 Subject: [PATCH 93/99] Fix tests --- framework/encode/test/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/encode/test/main.cpp b/framework/encode/test/main.cpp index 900acbc3f5..a3500393c3 100644 --- a/framework/encode/test/main.cpp +++ b/framework/encode/test/main.cpp @@ -36,8 +36,10 @@ const auto kBufferHandle = gfxrecon::format::FromHandleId(0xabcd); const gfxrecon::format::HandleId kBufferId = 12; -gfxrecon::format::HandleId GetHandleId() +gfxrecon::format::HandleId GetHandleId(VkObjectType type) { + GFXRECON_UNREFERENCED_PARAMETER(type); + return kBufferId; } From 5104c7b780a12ad8dacdde26de2f0726a2bf91b3 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Tue, 10 Sep 2024 15:45:13 +0300 Subject: [PATCH 94/99] Correct frame counting --- framework/encode/vulkan_capture_manager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/framework/encode/vulkan_capture_manager.cpp b/framework/encode/vulkan_capture_manager.cpp index b1fa4c5c0a..76fbfd3840 100644 --- a/framework/encode/vulkan_capture_manager.cpp +++ b/framework/encode/vulkan_capture_manager.cpp @@ -109,7 +109,11 @@ void VulkanCaptureManager::WriteTrackedState(util::FileOutputStream* file_stream assert(state_tracker_ != nullptr); format::FrameNumber frame = - GetOverrideFrame() != CommonCaptureManager::kInvalidFrame ? GetOverrideFrame() : GetCurrentFrame(); + GetOverrideFrame() != CommonCaptureManager::kInvalidFrame ? (GetOverrideFrame() + 1) : GetCurrentFrame(); + + GFXRECON_WRITE_CONSOLE("%s()", __func__) + GFXRECON_WRITE_CONSOLE(" GetOverrideFrame(): %" PRIu64, GetOverrideFrame()) + GFXRECON_WRITE_CONSOLE(" GetCurrentFrame(): %" PRIu64, GetCurrentFrame()) uint64_t n_blocks = state_tracker_->WriteState(file_stream, thread_id, asset_file_stream, GetCompressor(), frame); common_manager_->IncrementBlockIndex(n_blocks); From 9cd2a06d29671f75f11cc1bb8b6d2b98114098f3 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Tue, 10 Sep 2024 18:46:42 +0300 Subject: [PATCH 95/99] Drop GIPA in favor of VkLayerSettingsCreateInfoEXT --- .../decode/vulkan_replay_consumer_base.cpp | 71 +++++++++++++------ .../decode/vulkan_replay_consumer_base.h | 4 +- framework/encode/vulkan_capture_manager.cpp | 37 +++++++++- 3 files changed, 86 insertions(+), 26 deletions(-) diff --git a/framework/decode/vulkan_replay_consumer_base.cpp b/framework/decode/vulkan_replay_consumer_base.cpp index fbc7770f3a..b2b37a9dc9 100644 --- a/framework/decode/vulkan_replay_consumer_base.cpp +++ b/framework/decode/vulkan_replay_consumer_base.cpp @@ -22,7 +22,8 @@ ** DEALINGS IN THE SOFTWARE. */ -#include "decode/asset_file_consumer.h" +#include PROJECT_VERSION_HEADER_FILE + #include "generated/generated_vulkan_decoder.h" #include "decode/vulkan_replay_consumer_base.h" #include "decode/custom_vulkan_struct_handle_mappers.h" @@ -50,7 +51,6 @@ #include "util/hash.h" #include "util/platform.h" #include "util/logging.h" - #include "spirv_reflect.h" #include "generated/generated_vulkan_enum_to_string.h" @@ -2388,11 +2388,6 @@ VulkanReplayConsumerBase::OverrideCreateInstance(VkResult original_result, replay_create_info->pApplicationInfo->pEngineName) } - // if (override_capture_obj_id_fp == nullptr) - // { - // InitializeCaptureLayerCustomFuncs(); - // } - std::vector modified_layers; std::vector modified_extensions; VkInstanceCreateInfo modified_create_info = (*replay_create_info); @@ -2574,6 +2569,38 @@ VulkanReplayConsumerBase::OverrideCreateInstance(VkResult original_result, modified_create_info.ppEnabledLayerNames = modified_layers.data(); } + // Reuse asset file. + // Get proc addresses of capture layer's exposed custom functions. + std::vector layer_settings; + std::vector layer_custom_funcs_ptrs; + VkLayerSettingsCreateInfoEXT layer_settings_info; + if (!options_.reuse_asset_file.empty()) + { + layer_custom_funcs_ptrs.resize(4); + PFN_vkVoidFunction* func_ptr_base = layer_custom_funcs_ptrs.data(); + static const char* layer_func_names[] = { "SetUniqueIdOffsetGFXR", + "LoadAssetFileOffsetsGFXR", + "OverrideIdForNextVulkanObjectGFXR", + "OverrideFrameNumberGFXR" }; + + layer_settings.resize(4); + for (size_t i = 0; i < layer_settings.size(); ++i) + { + layer_settings[i].pLayerName = GFXRECON_PROJECT_VULKAN_LAYER_NAME; + layer_settings[i].pSettingName = layer_func_names[i]; + layer_settings[i].type = VK_LAYER_SETTING_TYPE_UINT64_EXT; + layer_settings[i].valueCount = 1; + layer_settings[i].pValues = func_ptr_base + i; + } + + layer_settings_info.sType = VK_STRUCTURE_TYPE_LAYER_SETTINGS_CREATE_INFO_EXT; + layer_settings_info.pNext = modified_create_info.pNext; + layer_settings_info.settingCount = layer_settings.size(); + layer_settings_info.pSettings = layer_settings.data(); + + modified_create_info.pNext = &layer_settings_info; + } + VkResult result = create_instance_proc_(&modified_create_info, GetAllocationCallbacks(pAllocator), replay_instance); if ((replay_instance != nullptr) && (result == VK_SUCCESS)) @@ -2591,24 +2618,22 @@ VulkanReplayConsumerBase::OverrideCreateInstance(VkResult original_result, modified_create_info.enabledExtensionCount); } - // Reuse asset file if (!options_.reuse_asset_file.empty()) { - auto instance_table = GetInstanceTable(*replay_instance); - override_capture_obj_id_fp_ = reinterpret_cast( - instance_table->GetInstanceProcAddr(*replay_instance, "OverrideIdForNextVulkanObjectGFXR")); + assert(layer_custom_funcs_ptrs.size() == 4); - if (override_capture_obj_id_fp_ == nullptr) + set_unique_id_offset_fp_ = reinterpret_cast(layer_custom_funcs_ptrs[0]); + if (set_unique_id_offset_fp_ == nullptr) { - GFXRECON_LOG_WARNING("Failed to discover OverrideIdForNextVulkanObjectGFXR()"); + GFXRECON_LOG_WARNING("Failed to discover SetUniqueIdOffsetGFXR()"); } else { - GFXRECON_WRITE_CONSOLE("override_capture_obj_id_fp: %p: ", override_capture_obj_id_fp_) + GFXRECON_WRITE_CONSOLE("set_unique_id_offset_fp: %p: ", set_unique_id_offset_fp_) } - load_asset_file_offsets_fp_ = reinterpret_cast( - instance_table->GetInstanceProcAddr(*replay_instance, "LoadAssetFileOffsetsGFXR")); + load_asset_file_offsets_fp_ = + reinterpret_cast(layer_custom_funcs_ptrs[1]); if (load_asset_file_offsets_fp_ == nullptr) { GFXRECON_LOG_WARNING("Failed to discover LoadAssetFileOffsetsGFXR()"); @@ -2618,19 +2643,19 @@ VulkanReplayConsumerBase::OverrideCreateInstance(VkResult original_result, GFXRECON_WRITE_CONSOLE("load_asset_file_offsets_fp: %p: ", load_asset_file_offsets_fp_) } - set_unique_id_offset_fp_ = reinterpret_cast( - instance_table->GetInstanceProcAddr(*replay_instance, "SetUniqueIdOffsetGFXR")); - if (set_unique_id_offset_fp_ == nullptr) + override_capture_obj_id_fp_ = + reinterpret_cast(layer_custom_funcs_ptrs[2]); + if (override_capture_obj_id_fp_ == nullptr) { - GFXRECON_LOG_WARNING("Failed to discover SetUniqueIdOffsetGFXR()"); + GFXRECON_LOG_WARNING("Failed to discover OverrideIdForNextVulkanObjectGFXR()"); } else { - GFXRECON_WRITE_CONSOLE("set_unique_id_offset_fp: %p: ", set_unique_id_offset_fp_) + GFXRECON_WRITE_CONSOLE("override_capture_obj_id_fp: %p: ", override_capture_obj_id_fp_) } - override_frame_number_fp_ = reinterpret_cast( - instance_table->GetInstanceProcAddr(*replay_instance, "OverrideFrameNumberGFXR")); + override_frame_number_fp_ = + reinterpret_cast(layer_custom_funcs_ptrs[3]); if (override_frame_number_fp_ == nullptr) { GFXRECON_LOG_WARNING("Failed to discover OverrideFrameNumberGFXR()"); diff --git a/framework/decode/vulkan_replay_consumer_base.h b/framework/decode/vulkan_replay_consumer_base.h index edb86752a3..c507f54b82 100644 --- a/framework/decode/vulkan_replay_consumer_base.h +++ b/framework/decode/vulkan_replay_consumer_base.h @@ -1581,9 +1581,9 @@ class VulkanReplayConsumerBase : public VulkanConsumer format::FrameNumber current_frame_ = 1; const gfxrecon::format::AssetFileOffsets* asset_file_offsets_ = nullptr; - encode::OverrideCaptureObjectIdFuncPtr override_capture_obj_id_fp_ = nullptr; - encode::LoadAssetFileOffsetsGFXRPtr load_asset_file_offsets_fp_ = nullptr; encode::SetUniqueIdOffsetGFXRPtr set_unique_id_offset_fp_ = nullptr; + encode::LoadAssetFileOffsetsGFXRPtr load_asset_file_offsets_fp_ = nullptr; + encode::OverrideCaptureObjectIdFuncPtr override_capture_obj_id_fp_ = nullptr; encode::OverrideFrameNumberGFXRPtr override_frame_number_fp_ = nullptr; }; diff --git a/framework/encode/vulkan_capture_manager.cpp b/framework/encode/vulkan_capture_manager.cpp index 76fbfd3840..8a1acb87a9 100644 --- a/framework/encode/vulkan_capture_manager.cpp +++ b/framework/encode/vulkan_capture_manager.cpp @@ -30,7 +30,7 @@ #include "encode/struct_pointer_encoder.h" #include "encode/vulkan_capture_manager.h" - +#include "encode/custom_layer_func_table.h" #include "encode/capture_manager.h" #include "encode/vulkan_handle_wrapper_util.h" #include "encode/vulkan_state_writer.h" @@ -692,6 +692,41 @@ VkResult VulkanCaptureManager::OverrideCreateInstance(const VkInstanceCreateInfo VK_VERSION_MINOR(api_version), VK_VERSION_PATCH(api_version)); } + + const VkLayerSettingsCreateInfoEXT* layer_settings_ext = + graphics::vulkan_struct_get_pnext(pCreateInfo); + if (layer_settings_ext != nullptr && layer_settings_ext->settingCount) + { + GFXRECON_LOG_INFO("%s() Discovered VkLayerSettingsCreateInfoEXT", __func__) + + for (uint32_t i = 0; i < layer_settings_ext->settingCount; ++i) + { + if (util::platform::StringCompare( + layer_settings_ext->pSettings[i].pLayerName, + GFXRECON_PROJECT_VULKAN_LAYER_NAME "\0", + util::platform::StringLength(GFXRECON_PROJECT_VULKAN_LAYER_NAME "\0")) || + !layer_settings_ext->pSettings[i].valueCount) + { + continue; + } + + auto table_entry = custom_func_table.find(layer_settings_ext->pSettings[i].pSettingName); + if (table_entry != custom_func_table.end()) + { + // Cast the const away + PFN_vkVoidFunction* func_ptr = reinterpret_cast( + const_cast(layer_settings_ext->pSettings[i].pValues)); + + GFXRECON_WRITE_CONSOLE(" %s -> %p", table_entry->first.c_str(), table_entry->second); + *func_ptr = table_entry->second; + } + else + { + GFXRECON_LOG_WARNING(" There is no function named \"%s\" exposed by the capture layer.", + layer_settings_ext->pSettings[i].pSettingName); + } + } + } } return result; From 2ec3894f52cdd06544723384ee0860d54d56b1dd Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Wed, 11 Sep 2024 12:16:10 +0300 Subject: [PATCH 96/99] Remove init_from_asset_file and clang-format --- framework/encode/custom_layer_func_table.h | 2 + framework/encode/vulkan_capture_manager.h | 15 +++++-- framework/encode/vulkan_handle_wrapper_util.h | 2 +- framework/encode/vulkan_handle_wrappers.h | 7 ++- framework/encode/vulkan_state_tracker.h | 2 +- .../vulkan_state_tracker_initializers.h | 9 ++-- framework/encode/vulkan_state_writer.cpp | 45 ++++++++++--------- 7 files changed, 46 insertions(+), 36 deletions(-) diff --git a/framework/encode/custom_layer_func_table.h b/framework/encode/custom_layer_func_table.h index 157c248b0d..ed53cd79ae 100644 --- a/framework/encode/custom_layer_func_table.h +++ b/framework/encode/custom_layer_func_table.h @@ -31,6 +31,7 @@ GFXRECON_BEGIN_NAMESPACE(gfxrecon) +// clang-format off const std::unordered_map custom_func_table = { { "GetBlockIndexGFXR", reinterpret_cast(encode::GetBlockIndexGFXR) }, { "DumpAssetsGFXR", reinterpret_cast(encode::DumpAssetsGFXR) }, @@ -39,6 +40,7 @@ const std::unordered_map custom_func_table = { { "OverrideIdForNextVulkanObjectGFXR", reinterpret_cast(encode::OverrideIdForNextVulkanObjectGFXR) }, { "OverrideFrameNumberGFXR", reinterpret_cast(encode::OverrideFrameNumberGFXR) }, }; +// clang-format on GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/vulkan_capture_manager.h b/framework/encode/vulkan_capture_manager.h index 55ba3ff0e7..42d7a2e0b2 100644 --- a/framework/encode/vulkan_capture_manager.h +++ b/framework/encode/vulkan_capture_manager.h @@ -1257,7 +1257,10 @@ class VulkanCaptureManager : public ApiCaptureManager void PostProcess_vkCmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); - void PostProcess_vkFrameBoundaryANDROID(VkDevice device, VkSemaphore semaphore, VkImage image) { EndFrame(); } + void PostProcess_vkFrameBoundaryANDROID(VkDevice device, VkSemaphore semaphore, VkImage image) + { + EndFrame(); + } void PostProcess_vkCmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo); @@ -1555,9 +1558,15 @@ class VulkanCaptureManager : public ApiCaptureManager virtual ~VulkanCaptureManager() {} - virtual void CreateStateTracker() override { state_tracker_ = std::make_unique(); } + virtual void CreateStateTracker() override + { + state_tracker_ = std::make_unique(); + } - virtual void DestroyStateTracker() override { state_tracker_ = nullptr; } + virtual void DestroyStateTracker() override + { + state_tracker_ = nullptr; + } virtual void WriteTrackedState(util::FileOutputStream* file_stream, format::ThreadId thread_id, diff --git a/framework/encode/vulkan_handle_wrapper_util.h b/framework/encode/vulkan_handle_wrapper_util.h index f68978d728..833ba8d709 100644 --- a/framework/encode/vulkan_handle_wrapper_util.h +++ b/framework/encode/vulkan_handle_wrapper_util.h @@ -56,7 +56,7 @@ static const VkCommandPool kTempCommandPool = UINT64_TO_VK_HANDLE(VkCommandPool, std::numeric_limits::max() - 2); static const format::HandleId kTempCommandPoolId = std::numeric_limits::max() - 2; static const format::HandleId kTempCommandBufferId = std::numeric_limits::max() - 3; -typedef format::HandleId (*PFN_GetHandleId)(VkObjectType); +typedef format::HandleId (*PFN_GetHandleId)(VkObjectType); extern VulkanStateHandleTable state_handle_table_; diff --git a/framework/encode/vulkan_handle_wrappers.h b/framework/encode/vulkan_handle_wrappers.h index d0744b06db..1e19f8ef96 100644 --- a/framework/encode/vulkan_handle_wrappers.h +++ b/framework/encode/vulkan_handle_wrappers.h @@ -240,9 +240,9 @@ struct AssetWrapperBase VkDeviceSize bind_offset{ 0 }; uint32_t queue_family_index{ 0 }; - VkDeviceSize size{ 0 }; - bool dirty{ true }; - bool init_from_asset_file{ false }; + VkDeviceSize size{ 0 }; + bool dirty{ true }; + std::unordered_set descriptor_sets_bound_to; }; @@ -415,7 +415,6 @@ struct DescriptorSetWrapper : public HandleWrapper vulkan_state_info::CreateDependencyInfo set_layout_dependency; bool dirty{ true }; - bool init_from_asset_file{ false }; }; struct DescriptorPoolWrapper : public HandleWrapper diff --git a/framework/encode/vulkan_state_tracker.h b/framework/encode/vulkan_state_tracker.h index 74c04fe8d7..403ea2a01d 100644 --- a/framework/encode/vulkan_state_tracker.h +++ b/framework/encode/vulkan_state_tracker.h @@ -789,7 +789,7 @@ class VulkanStateTracker if (entry == asset_file_offsets_.end()) { // Copy all entries from previous frame - auto last_frame_entry = asset_file_offsets_.rbegin(); + auto last_frame_entry = asset_file_offsets_.rbegin(); asset_file_offsets_[frame_number] = last_frame_entry->second; } else diff --git a/framework/encode/vulkan_state_tracker_initializers.h b/framework/encode/vulkan_state_tracker_initializers.h index 114f0f43dd..4eca94e582 100644 --- a/framework/encode/vulkan_state_tracker_initializers.h +++ b/framework/encode/vulkan_state_tracker_initializers.h @@ -640,8 +640,7 @@ inline void InitializeStaterbegin(); if (last_frame_entry->second.find(wrapper->handle_id) != last_frame_entry->second.end()) { - wrapper->init_from_asset_file = true; - wrapper->dirty = false; + wrapper->dirty = false; } } } @@ -690,8 +689,7 @@ inline void InitializeStaterbegin(); if (last_frame_entry->second.find(wrapper->handle_id) != last_frame_entry->second.end()) { - wrapper->dirty = false; - wrapper->init_from_asset_file = true; + wrapper->dirty = false; } } } @@ -970,8 +968,7 @@ inline void InitializePoolObjectState(VkDevice par auto last_frame_entry = asset_file_offsets->rbegin(); if (last_frame_entry->second.find(wrapper->handle_id) != last_frame_entry->second.end()) { - wrapper->init_from_asset_file = true; - wrapper->dirty = false; + wrapper->dirty = false; } } } diff --git a/framework/encode/vulkan_state_writer.cpp b/framework/encode/vulkan_state_writer.cpp index 6ce6466649..27a2ff418a 100644 --- a/framework/encode/vulkan_state_writer.cpp +++ b/framework/encode/vulkan_state_writer.cpp @@ -120,11 +120,11 @@ uint64_t VulkanStateWriter::WriteAssets(const VulkanStateTable& state_table, uin blocks_written_ = 0; -// #if defined(VK_USE_PLATFORM_ANDROID_KHR) -// debug = fopen("/storage/emulated/0/Download/WriteState.txt", "a"); -// #else -// debug = fopen("WriteState.txt", "a"); -// #endif + // #if defined(VK_USE_PLATFORM_ANDROID_KHR) + // debug = fopen("/storage/emulated/0/Download/WriteState.txt", "a"); + // #else + // debug = fopen("WriteState.txt", "a"); + // #endif // assert(debug); @@ -150,7 +150,12 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint // debug = fopen("WriteState.txt", "a"); // #endif -// assert(debug); + // if(debug == nullptr) + // { + // GFXRECON_WRITE_CONSOLE("debug == nullptr") + // } + + GFXRECON_WRITE_CONSOLE("%s(frame: %" PRIu64 ")", __func__, frame_number); auto started = std::chrono::high_resolution_clock::now(); @@ -1025,7 +1030,7 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa // Create a temporary object on first encounter. if (dep_inserted.second) { - if (wrapper->dirty && !wrapper->init_from_asset_file) + if (wrapper->dirty) { const int64_t offset = asset_file_stream_->GetOffset(); (*asset_file_offsets_)[wrapper->handle_id] = offset; @@ -1061,7 +1066,7 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa uint32_t n_blocks = 0; int64_t offset; - if (wrapper->dirty && !wrapper->init_from_asset_file) + if (wrapper->dirty) { offset = asset_file_stream_->GetOffset(); } @@ -1082,7 +1087,7 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa const auto new_entry = processed.insert(wrapper->create_parameters.get()); if (new_entry.second) { - if (wrapper->dirty && !wrapper->init_from_asset_file) + if (wrapper->dirty) { // Write descriptor set creation call and add the parameter buffer to the processed set. WriteFunctionCall(wrapper->create_call_id, wrapper->create_parameters.get(), asset_file_stream_); @@ -1120,7 +1125,7 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa // End of an active descriptor write range. active = false; write.descriptorCount = i - write.dstArrayElement; - if (wrapper->dirty && !wrapper->init_from_asset_file) + if (wrapper->dirty) { WriteDescriptorUpdateCommand( wrapper->device->handle_id, binding, &write, asset_file_stream_); @@ -1133,7 +1138,7 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa // Mutable descriptor type change within an active write range // End current range write.descriptorCount = i - write.dstArrayElement; - if (wrapper->dirty && !wrapper->init_from_asset_file) + if (wrapper->dirty) { WriteDescriptorUpdateCommand(wrapper->device->handle_id, binding, &write, asset_file_stream_); } @@ -1150,7 +1155,7 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa { write.descriptorCount = binding->count - write.dstArrayElement; - if (wrapper->dirty && !wrapper->init_from_asset_file) + if (wrapper->dirty) { WriteDescriptorUpdateCommand(wrapper->device->handle_id, binding, &write, asset_file_stream_); } @@ -1165,7 +1170,7 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa WriteExecuteFromFile(asset_file_stream_->GetFilename(), n_blocks, offset); } - if (wrapper->dirty && !wrapper->init_from_asset_file) + if (wrapper->dirty) { wrapper->dirty = false; (*asset_file_offsets_)[wrapper->handle_id] = offset; @@ -1174,8 +1179,7 @@ void VulkanStateWriter::WriteDescriptorSetStateWithAssetFile(const VulkanStateTa } else { - wrapper->dirty = false; - wrapper->init_from_asset_file = false; + wrapper->dirty = false; } }); @@ -1696,7 +1700,7 @@ void VulkanStateWriter::ProcessBufferMemoryWithAssetFile(const vulkan_wrappers:: assert((buffer_wrapper != nullptr)); - if (buffer_wrapper->dirty && !buffer_wrapper->init_from_asset_file) + if (buffer_wrapper->dirty) { assert(memory_wrapper != nullptr); buffer_wrapper->dirty = false; @@ -1804,8 +1808,7 @@ void VulkanStateWriter::ProcessBufferMemoryWithAssetFile(const vulkan_wrappers:: } else { - buffer_wrapper->dirty = false; - buffer_wrapper->init_from_asset_file = false; + buffer_wrapper->dirty = false; if (output_stream_ != nullptr) { @@ -1991,7 +1994,7 @@ void VulkanStateWriter::ProcessImageMemoryWithAssetFile(const vulkan_wrappers::D assert(image_wrapper != nullptr); - if (image_wrapper->dirty && !image_wrapper->init_from_asset_file) + if (image_wrapper->dirty) { assert((image_wrapper->is_swapchain_image && memory_wrapper == nullptr) || (!image_wrapper->is_swapchain_image && memory_wrapper != nullptr)); @@ -2144,8 +2147,8 @@ void VulkanStateWriter::ProcessImageMemoryWithAssetFile(const vulkan_wrappers::D } else { - image_wrapper->dirty = false; - image_wrapper->init_from_asset_file = false; + image_wrapper->dirty = false; + if (output_stream_ != nullptr) { if ((*asset_file_offsets_).find(image_wrapper->handle_id) != (*asset_file_offsets_).end()) From 045909da479bb286bfcc804f06520f0e4636083c Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Thu, 12 Sep 2024 13:50:38 +0300 Subject: [PATCH 97/99] Notify capture laye about frame state begin/end markers --- .../decode/vulkan_replay_consumer_base.cpp | 41 +++++++++++++++---- .../decode/vulkan_replay_consumer_base.h | 11 ++--- framework/encode/api_capture_manager.h | 2 +- framework/encode/capture_manager.cpp | 2 +- framework/encode/capture_manager.h | 1 + .../encode/custom_exported_layer_funcs.h | 16 +++++--- framework/encode/custom_layer_func_table.h | 1 + .../custom_vulkan_api_call_encoders.cpp | 6 +++ framework/encode/vulkan_capture_manager.h | 13 +++++- framework/encode/vulkan_state_tracker.cpp | 26 ++++++------ framework/encode/vulkan_state_tracker.h | 9 +++- framework/util/defines.h | 2 + 12 files changed, 92 insertions(+), 38 deletions(-) diff --git a/framework/decode/vulkan_replay_consumer_base.cpp b/framework/decode/vulkan_replay_consumer_base.cpp index b2b37a9dc9..aea3c6d7c1 100644 --- a/framework/decode/vulkan_replay_consumer_base.cpp +++ b/framework/decode/vulkan_replay_consumer_base.cpp @@ -288,7 +288,12 @@ void VulkanReplayConsumerBase::ProcessStateBeginMarker(uint64_t frame_number) replaying_trimmed_capture_ = true; // GFXRECON_WRITE_CONSOLE("%s() current_frame_: %" PRIu64, __func__, current_frame_) - // GFXRECON_WRITE_CONSOLE("%s() frame_number: %" PRIu64, __func__, frame_number) + GFXRECON_WRITE_CONSOLE("%s() frame_number: %" PRIu64, __func__, frame_number) + + if (notify_frame_state_setup_fp_ != nullptr) + { + notify_frame_state_setup_fp_(1); + } } void VulkanReplayConsumerBase::ProcessStateEndMarker(uint64_t frame_number) @@ -301,12 +306,17 @@ void VulkanReplayConsumerBase::ProcessStateEndMarker(uint64_t frame_number) } current_frame_ = frame_number; - // GFXRECON_WRITE_CONSOLE("%s() current_frame_: %" PRIu64, __func__, current_frame_) + GFXRECON_WRITE_CONSOLE("%s() current_frame_: %" PRIu64, __func__, current_frame_) if (override_frame_number_fp_ != nullptr) { override_frame_number_fp_(current_frame_); } + + if (notify_frame_state_setup_fp_ != nullptr) + { + notify_frame_state_setup_fp_(0); + } } void VulkanReplayConsumerBase::ProcessFrameBeginMarker(uint64_t frame_number) @@ -2576,14 +2586,16 @@ VulkanReplayConsumerBase::OverrideCreateInstance(VkResult original_result, VkLayerSettingsCreateInfoEXT layer_settings_info; if (!options_.reuse_asset_file.empty()) { - layer_custom_funcs_ptrs.resize(4); - PFN_vkVoidFunction* func_ptr_base = layer_custom_funcs_ptrs.data(); - static const char* layer_func_names[] = { "SetUniqueIdOffsetGFXR", - "LoadAssetFileOffsetsGFXR", - "OverrideIdForNextVulkanObjectGFXR", - "OverrideFrameNumberGFXR" }; + static const char* layer_func_names[] = { "SetUniqueIdOffsetGFXR", + "LoadAssetFileOffsetsGFXR", + "OverrideIdForNextVulkanObjectGFXR", + "OverrideFrameNumberGFXR", + "NotifyFrameStateSetupGFXR" }; - layer_settings.resize(4); + layer_custom_funcs_ptrs.resize(GFXRECON_ARRAY_ELEMENTS(layer_func_names)); + PFN_vkVoidFunction* func_ptr_base = layer_custom_funcs_ptrs.data(); + + layer_settings.resize(GFXRECON_ARRAY_ELEMENTS(layer_func_names)); for (size_t i = 0; i < layer_settings.size(); ++i) { layer_settings[i].pLayerName = GFXRECON_PROJECT_VULKAN_LAYER_NAME; @@ -2665,6 +2677,17 @@ VulkanReplayConsumerBase::OverrideCreateInstance(VkResult original_result, GFXRECON_WRITE_CONSOLE("set_unique_id_offset_fp: %p: ", override_frame_number_fp_) } + notify_frame_state_setup_fp_ = + reinterpret_cast(layer_custom_funcs_ptrs[4]); + if (notify_frame_state_setup_fp_ == nullptr) + { + GFXRECON_LOG_WARNING("Failed to discover NotifyFrameStateSetupGFXR()"); + } + else + { + GFXRECON_WRITE_CONSOLE("notify_frame_state_setup_fp_: %p: ", notify_frame_state_setup_fp_) + } + if (load_asset_file_offsets_fp_ != nullptr && asset_file_offsets_ != nullptr) { load_asset_file_offsets_fp_(*asset_file_offsets_); diff --git a/framework/decode/vulkan_replay_consumer_base.h b/framework/decode/vulkan_replay_consumer_base.h index c507f54b82..4137ee2c10 100644 --- a/framework/decode/vulkan_replay_consumer_base.h +++ b/framework/decode/vulkan_replay_consumer_base.h @@ -1580,11 +1580,12 @@ class VulkanReplayConsumerBase : public VulkanConsumer std::vector matched_replay_cache_data_; format::FrameNumber current_frame_ = 1; - const gfxrecon::format::AssetFileOffsets* asset_file_offsets_ = nullptr; - encode::SetUniqueIdOffsetGFXRPtr set_unique_id_offset_fp_ = nullptr; - encode::LoadAssetFileOffsetsGFXRPtr load_asset_file_offsets_fp_ = nullptr; - encode::OverrideCaptureObjectIdFuncPtr override_capture_obj_id_fp_ = nullptr; - encode::OverrideFrameNumberGFXRPtr override_frame_number_fp_ = nullptr; + const gfxrecon::format::AssetFileOffsets* asset_file_offsets_ = nullptr; + encode::SetUniqueIdOffsetGFXRPtr set_unique_id_offset_fp_ = nullptr; + encode::LoadAssetFileOffsetsGFXRPtr load_asset_file_offsets_fp_ = nullptr; + encode::OverrideCaptureObjectIdFuncPtr override_capture_obj_id_fp_ = nullptr; + encode::OverrideFrameNumberGFXRPtr override_frame_number_fp_ = nullptr; + encode::NotifyFrameStateSetupGFXRPtr notify_frame_state_setup_fp_ = nullptr; }; GFXRECON_END_NAMESPACE(decode) diff --git a/framework/encode/api_capture_manager.h b/framework/encode/api_capture_manager.h index a6ecef2a0c..a16d743e62 100644 --- a/framework/encode/api_capture_manager.h +++ b/framework/encode/api_capture_manager.h @@ -46,7 +46,7 @@ class ApiCaptureManager static auto AcquireExclusiveApiCallLock() { return std::move(CommonCaptureManager::AcquireExclusiveApiCallLock()); } // Virtual interface - virtual void CreateStateTracker() = 0; + virtual void CreateStateTracker(bool recapturing = false) = 0; virtual void DestroyStateTracker() = 0; virtual void WriteTrackedState(util::FileOutputStream* file_stream, format::ThreadId thread_id, diff --git a/framework/encode/capture_manager.cpp b/framework/encode/capture_manager.cpp index 27ac8a38cf..5f2a31e70a 100644 --- a/framework/encode/capture_manager.cpp +++ b/framework/encode/capture_manager.cpp @@ -202,7 +202,7 @@ bool CommonCaptureManager::LockedCreateInstance(ApiCaptureManager* api // state trackers are in the correct state given the differing settings that may be present. if ((capture_mode_ & kModeTrack) == kModeTrack || write_state_files_) { - api_capture_singleton->CreateStateTracker(); + api_capture_singleton->CreateStateTracker(!capture_settings_.GetTraceSettings().reuse_asset_file.empty()); } } else diff --git a/framework/encode/capture_manager.h b/framework/encode/capture_manager.h index 36b1f83678..7f9eb56f03 100644 --- a/framework/encode/capture_manager.h +++ b/framework/encode/capture_manager.h @@ -432,6 +432,7 @@ class CommonCaptureManager bool write_state_files_; std::string asset_file_name_; bool reuse_asset_file{ false }; + bool is_replay_in_frame_state_setup{ false }; struct { diff --git a/framework/encode/custom_exported_layer_funcs.h b/framework/encode/custom_exported_layer_funcs.h index 7c2eed08ac..083dd755c0 100644 --- a/framework/encode/custom_exported_layer_funcs.h +++ b/framework/encode/custom_exported_layer_funcs.h @@ -30,12 +30,15 @@ GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(encode) -typedef void (*GetBlockIndexGFXR_ptr)(void); -typedef void (*DumpAssetsGFXR_ptr)(void); -typedef void (*SetUniqueIdOffsetGFXRPtr)(format::HandleId); -typedef void (*LoadAssetFileOffsetsGFXRPtr)(const format::AssetFileOffsets&); -typedef void (*OverrideCaptureObjectIdFuncPtr)(format::HandleId, VkObjectType); -typedef void (*OverrideFrameNumberGFXRPtr)(format::FrameNumber); +// clang-format off +using GetBlockIndexGFXR_ptr = void(*)(void); +using DumpAssetsGFXR_ptr = void(*)(void); +using SetUniqueIdOffsetGFXRPtr = void(*)(format::HandleId); +using LoadAssetFileOffsetsGFXRPtr = void(*)(const format::AssetFileOffsets&); +using OverrideCaptureObjectIdFuncPtr = void(*)(format::HandleId, VkObjectType); +using OverrideFrameNumberGFXRPtr = void(*)(format::FrameNumber); +using NotifyFrameStateSetupGFXRPtr = void(*)(uint32_t); +// clang-format on VKAPI_ATTR uint64_t VKAPI_CALL GetBlockIndexGFXR(); VKAPI_ATTR void VKAPI_CALL DumpAssetsGFXR(); @@ -43,6 +46,7 @@ VKAPI_ATTR void VKAPI_CALL SetUniqueIdOffsetGFXR(format::HandleId offset); VKAPI_ATTR void VKAPI_CALL LoadAssetFileOffsetsGFXR(const format::AssetFileOffsets& offsets); VKAPI_ATTR void VKAPI_CALL OverrideIdForNextVulkanObjectGFXR(format::HandleId id, VkObjectType type); VKAPI_ATTR void VKAPI_CALL OverrideFrameNumberGFXR(format::FrameNumber frame); +VKAPI_ATTR void VKAPI_CALL NotifyFrameStateSetupGFXR(uint32_t is_in_frame_state_setup); GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/custom_layer_func_table.h b/framework/encode/custom_layer_func_table.h index ed53cd79ae..3d5976a15e 100644 --- a/framework/encode/custom_layer_func_table.h +++ b/framework/encode/custom_layer_func_table.h @@ -39,6 +39,7 @@ const std::unordered_map custom_func_table = { { "LoadAssetFileOffsetsGFXR", reinterpret_cast(encode::LoadAssetFileOffsetsGFXR) }, { "OverrideIdForNextVulkanObjectGFXR", reinterpret_cast(encode::OverrideIdForNextVulkanObjectGFXR) }, { "OverrideFrameNumberGFXR", reinterpret_cast(encode::OverrideFrameNumberGFXR) }, + { "NotifyFrameStateSetupGFXR", reinterpret_cast(encode::NotifyFrameStateSetupGFXR) }, }; // clang-format on diff --git a/framework/encode/custom_vulkan_api_call_encoders.cpp b/framework/encode/custom_vulkan_api_call_encoders.cpp index c7de299dc8..2f48adb364 100644 --- a/framework/encode/custom_vulkan_api_call_encoders.cpp +++ b/framework/encode/custom_vulkan_api_call_encoders.cpp @@ -435,6 +435,12 @@ VKAPI_ATTR void VKAPI_CALL OverrideFrameNumberGFXR(format::FrameNumber frame) manager->OverrideFrameNumber(frame); } +VKAPI_ATTR void VKAPI_CALL NotifyFrameStateSetupGFXR(uint32_t is_in_frame_state_setup) +{ + VulkanCaptureManager* manager = VulkanCaptureManager::Get(); + manager->NotifyFrameStateSetup(is_in_frame_state_setup); +} + VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, diff --git a/framework/encode/vulkan_capture_manager.h b/framework/encode/vulkan_capture_manager.h index 42d7a2e0b2..ef4da9d4a8 100644 --- a/framework/encode/vulkan_capture_manager.h +++ b/framework/encode/vulkan_capture_manager.h @@ -1553,14 +1553,23 @@ class VulkanCaptureManager : public ApiCaptureManager void OverrideGetPhysicalDeviceSurfacePresentModesKHR(uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes); #endif + void NotifyFrameStateSetup(uint32_t is_in_frame_state_setup) + { + GFXRECON_WRITE_CONSOLE("%s(is_in_frame_state_setup: %u)", __func__, is_in_frame_state_setup) + if (state_tracker_ != nullptr) + { + state_tracker_->NotifyFrameStateSetup(!!is_in_frame_state_setup); + } + } + protected: VulkanCaptureManager() : ApiCaptureManager(format::ApiFamilyId::ApiFamily_Vulkan) {} virtual ~VulkanCaptureManager() {} - virtual void CreateStateTracker() override + virtual void CreateStateTracker(bool recapturing = false) override { - state_tracker_ = std::make_unique(); + state_tracker_ = std::make_unique(recapturing); } virtual void DestroyStateTracker() override diff --git a/framework/encode/vulkan_state_tracker.cpp b/framework/encode/vulkan_state_tracker.cpp index 1234eda0b0..6a90917fef 100644 --- a/framework/encode/vulkan_state_tracker.cpp +++ b/framework/encode/vulkan_state_tracker.cpp @@ -45,7 +45,7 @@ GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(encode) -VulkanStateTracker::VulkanStateTracker() {} +VulkanStateTracker::VulkanStateTracker(bool recapturing) : is_in_frame_state_setup_(recapturing) {} VulkanStateTracker::~VulkanStateTracker() {} @@ -694,7 +694,7 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w auto wrapper = vulkan_wrappers::GetWrapper(write->dstSet); assert(wrapper != nullptr); - wrapper->dirty = true; + wrapper->dirty = !is_in_frame_state_setup_; // Descriptor update rules specify that a write descriptorCount that is greater than the binding's count // will result in updates to consecutive bindings, where the next binding is dstBinding+1 and @@ -1021,7 +1021,7 @@ void VulkanStateTracker::TrackUpdateDescriptorSets(uint32_t w auto src_wrapper = vulkan_wrappers::GetWrapper(copy->srcSet); assert((dst_wrapper != nullptr) && (src_wrapper != nullptr)); - dst_wrapper->dirty = true; + dst_wrapper->dirty = !is_in_frame_state_setup_; // Descriptor update rules specify that a write descriptorCount that is greater than the binding's count // will result in updates to/from consecutive bindings. @@ -1160,7 +1160,7 @@ void VulkanStateTracker::TrackUpdateDescriptorSetWithTemplate(VkDescriptorSet auto wrapper = vulkan_wrappers::GetWrapper(set); const uint8_t* bytes = reinterpret_cast(data); - wrapper->dirty = true; + wrapper->dirty = !is_in_frame_state_setup_; for (const auto& entry : template_info->image_info) { @@ -1796,7 +1796,7 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::AccelerationStructureKHRW for (auto entry : wrapper->descriptor_sets_bound_to) { - entry->dirty = true; + entry->dirty = !is_in_frame_state_setup_; } wrapper->descriptor_sets_bound_to.clear(); @@ -1808,7 +1808,7 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::AccelerationStructureNVWr for (auto entry : wrapper->descriptor_sets_bound_to) { - entry->dirty = true; + entry->dirty = !is_in_frame_state_setup_; } wrapper->descriptor_sets_bound_to.clear(); @@ -1835,7 +1835,7 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::ImageWrapper* wrapper) for (auto entry : wrapper->descriptor_sets_bound_to) { - entry->dirty = true; + entry->dirty = !is_in_frame_state_setup_; } wrapper->descriptor_sets_bound_to.clear(); @@ -1847,7 +1847,7 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::ImageViewWrapper* wrapper for (auto entry : wrapper->descriptor_sets_bound_to) { - entry->dirty = true; + entry->dirty = !is_in_frame_state_setup_; } wrapper->descriptor_sets_bound_to.clear(); @@ -1874,7 +1874,7 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::BufferWrapper* wrapper) for (auto entry : wrapper->descriptor_sets_bound_to) { - entry->dirty = true; + entry->dirty = !is_in_frame_state_setup_; } wrapper->descriptor_sets_bound_to.clear(); @@ -1886,7 +1886,7 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::BufferViewWrapper* wrappe for (auto entry : wrapper->descriptor_sets_bound_to) { - entry->dirty = true; + entry->dirty = !is_in_frame_state_setup_; } wrapper->descriptor_sets_bound_to.clear(); @@ -1898,7 +1898,7 @@ void VulkanStateTracker::DestroyState(vulkan_wrappers::SamplerWrapper* wrapper) for (auto entry : wrapper->descriptor_sets_bound_to) { - entry->dirty = true; + entry->dirty = !is_in_frame_state_setup_; } wrapper->descriptor_sets_bound_to.clear(); @@ -2612,7 +2612,7 @@ void VulkanStateTracker::TrackMappedAssetsWrites() { if (entry.second[page]) { - asset->dirty = true; + asset->dirty = !is_in_frame_state_setup_; break; } } @@ -2907,7 +2907,7 @@ void VulkanStateTracker::MarkReferencedAssetsAsDirty(vulkan_wrappers::CommandBuf for (auto asset : cmd_buf_wrapper->modified_assets) { assert(asset); - asset->dirty = true; + asset->dirty = !is_in_frame_state_setup_; } } diff --git a/framework/encode/vulkan_state_tracker.h b/framework/encode/vulkan_state_tracker.h index 403ea2a01d..2cdae3c557 100644 --- a/framework/encode/vulkan_state_tracker.h +++ b/framework/encode/vulkan_state_tracker.h @@ -50,7 +50,7 @@ GFXRECON_BEGIN_NAMESPACE(encode) class VulkanStateTracker { public: - VulkanStateTracker(); + VulkanStateTracker(bool recapturing = false); ~VulkanStateTracker(); @@ -689,6 +689,12 @@ class VulkanStateTracker void LoadAssetFileOffsets(const format::AssetFileOffsets& offsets); + void NotifyFrameStateSetup(uint32_t is_in_frame_state_setup) + { + GFXRECON_WRITE_CONSOLE("%s(is_in_frame_state_setup: %u)", __func__, is_in_frame_state_setup) + is_in_frame_state_setup_ = is_in_frame_state_setup; + } + private: template void AddGroupHandles(ParentHandle parent_handle, @@ -809,6 +815,7 @@ class VulkanStateTracker std::unordered_map as_device_addresses_map; format::AssetFileOffsets asset_file_offsets_; + bool is_in_frame_state_setup_; }; GFXRECON_END_NAMESPACE(encode) diff --git a/framework/util/defines.h b/framework/util/defines.h index 19a6cfc837..ae34e2a7ea 100644 --- a/framework/util/defines.h +++ b/framework/util/defines.h @@ -67,6 +67,8 @@ static constexpr uint64_t GFXRECON_PTR_TO_UINT64(T ptr) return static_cast(reinterpret_cast(ptr)); } +#define GFXRECON_ARRAY_ELEMENTS(_array_) sizeof((_array_)) / sizeof((_array_)[0]) + #ifdef NDEBUG #define GFXRECON_RELEASE_BUILD 1 #else From 813bcf8237f1bee38f40287a25b9d708da5dd0d9 Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Thu, 12 Sep 2024 14:59:56 +0300 Subject: [PATCH 98/99] Fix windows build --- framework/encode/d3d12_capture_manager.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/encode/d3d12_capture_manager.h b/framework/encode/d3d12_capture_manager.h index 30224666ad..ddddb77792 100644 --- a/framework/encode/d3d12_capture_manager.h +++ b/framework/encode/d3d12_capture_manager.h @@ -765,7 +765,10 @@ class D3D12CaptureManager : public ApiCaptureManager virtual ~D3D12CaptureManager() {} - virtual void CreateStateTracker() override { state_tracker_ = std::make_unique(); } + virtual void CreateStateTracker(bool recapturing = false) override + { + state_tracker_ = std::make_unique(); + } virtual void DestroyStateTracker() override { state_tracker_ = nullptr; } From 46ede91b31b363d242f88a574c808fa6b9aad06a Mon Sep 17 00:00:00 2001 From: Panagiotis Apostolou Date: Thu, 12 Sep 2024 15:06:50 +0300 Subject: [PATCH 99/99] clang-format --- framework/decode/asset_file_consumer.cpp | 2 +- framework/decode/asset_file_consumer.h | 16 +++++----- framework/decode/vulkan_handle_mapping_util.h | 30 ++++++++--------- .../decode/vulkan_replay_consumer_base.cpp | 2 -- .../decode/vulkan_replay_consumer_base.h | 32 +++++++++---------- framework/encode/capture_manager.cpp | 3 +- 6 files changed, 42 insertions(+), 43 deletions(-) diff --git a/framework/decode/asset_file_consumer.cpp b/framework/decode/asset_file_consumer.cpp index 875cf691ae..2693730a48 100644 --- a/framework/decode/asset_file_consumer.cpp +++ b/framework/decode/asset_file_consumer.cpp @@ -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_)); diff --git a/framework/decode/asset_file_consumer.h b/framework/decode/asset_file_consumer.h index d420abc57c..c60f207aa6 100644 --- a/framework/decode/asset_file_consumer.h +++ b/framework/decode/asset_file_consumer.h @@ -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() diff --git a/framework/decode/vulkan_handle_mapping_util.h b/framework/decode/vulkan_handle_mapping_util.h index aaacf55127..ce314f534a 100644 --- a/framework/decode/vulkan_handle_mapping_util.h +++ b/framework/decode/vulkan_handle_mapping_util.h @@ -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); @@ -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); @@ -165,7 +165,7 @@ static void AddHandleArray(format::HandleId parent_id, size_t handles_len, std::vector&& initial_infos, VulkanObjectInfoTable* object_info_table, - void (VulkanObjectInfoTable::*AddFunc)(T&&)) + void (VulkanObjectInfoTable::*AddFunc)(T&&)) { assert(object_info_table != nullptr); @@ -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); @@ -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> future) { static_assert(has_handle_future_v, "handle-type does not support asynchronous creation"); @@ -243,7 +243,7 @@ static void AddHandleArrayAsync(format::HandleId parent_id, size_t ids_len, VulkanObjectInfoTable* object_info_table, std::vector&& initial_infos, - void (VulkanObjectInfoTable::*AddFunc)(T&&), + void (VulkanObjectInfoTable::*AddFunc)(T&&), std::shared_future> future) { static_assert(has_handle_future_v, "handle-type does not support asynchronous creation"); @@ -275,8 +275,8 @@ static void AddHandleArray(format::HandleId parent_id, size_t handles_len, std::vector&& 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); @@ -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); @@ -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); @@ -366,9 +366,9 @@ inline void RemoveHandle(format::HandleId id, template 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); @@ -389,7 +389,7 @@ template void RemoveHandleArray(format::HandleId pool_id, const HandlePointerDecoder* 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)); diff --git a/framework/decode/vulkan_replay_consumer_base.cpp b/framework/decode/vulkan_replay_consumer_base.cpp index aea3c6d7c1..65306eb1b4 100644 --- a/framework/decode/vulkan_replay_consumer_base.cpp +++ b/framework/decode/vulkan_replay_consumer_base.cpp @@ -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(layer_custom_funcs_ptrs[0]); if (set_unique_id_offset_fp_ == nullptr) { diff --git a/framework/decode/vulkan_replay_consumer_base.h b/framework/decode/vulkan_replay_consumer_base.h index 4137ee2c10..93c5f35032 100644 --- a/framework/decode/vulkan_replay_consumer_base.h +++ b/framework/decode/vulkan_replay_consumer_base.h @@ -246,7 +246,7 @@ class VulkanReplayConsumerBase : public VulkanConsumer template 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); } @@ -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)) { @@ -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)) { @@ -323,7 +323,7 @@ class VulkanReplayConsumerBase : public VulkanConsumer const typename T::HandleType* handles, size_t handles_len, std::vector&& 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); @@ -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); } @@ -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()> create_function) { if (create_function) @@ -401,7 +401,7 @@ class VulkanReplayConsumerBase : public VulkanConsumer const format::HandleId* ids, size_t ids_len, std::vector&& initial_infos, - void (VulkanObjectInfoTable::*AddFunc)(T&&), + void (VulkanObjectInfoTable::*AddFunc)(T&&), std::function()> create_function) { if (create_function) @@ -461,8 +461,8 @@ class VulkanReplayConsumerBase : public VulkanConsumer const typename T::HandleType* handles, size_t handles_len, std::vector&& 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, @@ -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, @@ -505,9 +505,9 @@ class VulkanReplayConsumerBase : public VulkanConsumer template 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); } @@ -516,7 +516,7 @@ class VulkanReplayConsumerBase : public VulkanConsumer void RemovePoolHandles(format::HandleId pool_id, const HandlePointerDecoder* 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. @@ -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) diff --git a/framework/encode/capture_manager.cpp b/framework/encode/capture_manager.cpp index 5f2a31e70a..a5af04de76 100644 --- a/framework/encode/capture_manager.cpp +++ b/framework/encode/capture_manager.cpp @@ -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)); } }