Enable Vulkan validation layers on Fuchsia in debug mode. (flutter/engine#3663)
Disable info debug messages from the layers to cut down log spam.
This commit is contained in:
@@ -224,10 +224,13 @@ VulkanDebugReport::VulkanDebugReport(
|
||||
return;
|
||||
}
|
||||
|
||||
VkDebugReportFlagsEXT flags = kVulkanErrorFlags;
|
||||
if (ValidationLayerInfoMessagesEnabled())
|
||||
flags |= kVulkanInfoFlags;
|
||||
const VkDebugReportCallbackCreateInfoEXT create_info = {
|
||||
.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT,
|
||||
.pNext = nullptr,
|
||||
.flags = kVulkanErrorFlags | kVulkanInfoFlags,
|
||||
.flags = flags,
|
||||
.pfnCallback = &vulkan::OnVulkanDebugReportCallback,
|
||||
.pUserData = nullptr,
|
||||
};
|
||||
|
||||
@@ -10,10 +10,6 @@
|
||||
namespace vulkan {
|
||||
|
||||
bool IsDebuggingEnabled() {
|
||||
#if OS_FUCHSIA
|
||||
return false;
|
||||
#endif
|
||||
|
||||
#ifndef NDEBUG
|
||||
return true;
|
||||
#else
|
||||
@@ -21,6 +17,12 @@ bool IsDebuggingEnabled() {
|
||||
#endif
|
||||
}
|
||||
|
||||
// Whether to show Vulkan validation layer info messages in addition
|
||||
// to the error messages.
|
||||
bool ValidationLayerInfoMessagesEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
static std::vector<std::string> InstanceOrDeviceLayersToEnable(
|
||||
const VulkanProcTable& vk,
|
||||
VkPhysicalDevice physical_device) {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
namespace vulkan {
|
||||
|
||||
bool IsDebuggingEnabled();
|
||||
bool ValidationLayerInfoMessagesEnabled();
|
||||
|
||||
std::vector<std::string> InstanceLayersToEnable(const VulkanProcTable& vk);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user