Skip to content

Commit

Permalink
work review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian-lunarg committed Nov 26, 2024
1 parent 0e4bc55 commit d980476
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions framework/decode/vulkan_replay_consumer_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ VulkanReplayConsumerBase::VulkanReplayConsumerBase(std::shared_ptr<application::
{
GFXRECON_LOG_WARNING("Requested both asynchronous pipeline-creation (--pipeline-creation-jobs) and "
"explicit pipeline-caches (--save-pipeline-cache | --load-pipeline-cache). This is "
"currently not supported and will "
"prevent usage of pipeline-caches.");
"currently not supported and will prevent usage of pipeline-caches.");
}
}

Expand Down Expand Up @@ -6034,7 +6033,6 @@ VkResult VulkanReplayConsumerBase::OverrideCreatePipelineCache(
VkPipelineCacheCreateInfo override_create_info = *pCreateInfo->GetPointer();

// If pipeline cache must be loaded from file

std::vector<char> pipelineCacheData;
if (!options_.load_pipeline_cache_filename.empty())
{
Expand All @@ -6056,7 +6054,6 @@ VkResult VulkanReplayConsumerBase::OverrideCreatePipelineCache(
}

// If pipeline cache must not be loaded

else if (options_.omit_pipeline_cache_data)
{
if (override_create_info.initialDataSize != 0)
Expand All @@ -6069,7 +6066,6 @@ VkResult VulkanReplayConsumerBase::OverrideCreatePipelineCache(
}

// If tracked pipeline cache data can be used

else if ((override_create_info.pInitialData != nullptr) && (override_create_info.initialDataSize != 0))
{
// This vkCreatePipelineCache call has initial pipeline cache data, the data is valid for capture time,
Expand Down Expand Up @@ -6130,20 +6126,23 @@ VkResult VulkanReplayConsumerBase::OverrideCreatePipelineCache(
}

// Actual pipeline cache creation call

VkResult result = func(device_info->handle,
&override_create_info,
GetAllocationCallbacks(pAllocator),
pPipelineCache->GetHandlePointer());

// If we are creating a pipeline cache file, add this pipeline cache to the tracked list

if (!options_.save_pipeline_cache_filename.empty())
{
tracked_pipeline_caches_.emplace(*pPipelineCache->GetPointer(),
std::make_pair(device_info, *pPipelineCache->GetHandlePointer()));
}

// keep track if external synchronization is required
auto handle_info = reinterpret_cast<VulkanPipelineCacheInfo*>(pPipelineCache->GetConsumerData(0));
handle_info->requires_external_synchronization =
override_create_info.flags & VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT;

return result;
}

Expand Down

0 comments on commit d980476

Please sign in to comment.