Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller] Remove verbose logs in the Vulkan pipeline cache. #40651

Merged
merged 1 commit into from
Mar 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions impeller/renderer/backend/vulkan/pipeline_cache_vk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,17 @@ PipelineCacheVK::PipelineCacheVK(std::shared_ptr<const Capabilities> caps,

if (result == vk::Result::eSuccess) {
cache_ = std::move(existing_cache);
if (cache_info.pInitialData != nullptr) {
FML_LOG(INFO) << "Used existing pipeline cache of size: "
<< cache_info.initialDataSize << " bytes.";
}
} else {
// Even though we perform consistency checks because we don't trust the
// driver, the driver may have additional information that may cause it to
// reject the cache too.
VALIDATION_LOG << "Existing pipeline cache was invalid: "
<< vk::to_string(result) << ". Starting with a fresh cache.";
FML_LOG(INFO) << "Existing pipeline cache was invalid: "
<< vk::to_string(result) << ". Starting with a fresh cache.";
cache_info.pInitialData = nullptr;
cache_info.initialDataSize = 0u;
auto [result2, new_cache] = device_.createPipelineCacheUnique(cache_info);
if (result2 == vk::Result::eSuccess) {
cache_ = std::move(new_cache);

} else {
VALIDATION_LOG << "Could not create new pipeline cache: "
<< vk::to_string(result2);
Expand Down Expand Up @@ -134,6 +129,7 @@ std::shared_ptr<fml::Mapping> PipelineCacheVK::CopyPipelineCacheData() const {
auto [result, data] = device_.getPipelineCacheData(*cache_);
if (result != vk::Result::eSuccess) {
VALIDATION_LOG << "Could not get pipeline cache data to persist.";
return nullptr;
}
auto shared_data = std::make_shared<std::vector<uint8_t>>();
std::swap(*shared_data, data);
Expand All @@ -160,8 +156,6 @@ void PipelineCacheVK::PersistCacheToDisk() const {
VALIDATION_LOG << "Could not persist pipeline cache to disk.";
return;
}
FML_LOG(INFO) << "Persisted pipeline cache of size " << data->GetSize()
<< " bytes to disk.";
}

} // namespace impeller