Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | List of all members
vulkan::VulkanDebugReport Class Reference

#include <vulkan_debug_report.h>

Public Member Functions

 VulkanDebugReport (const VulkanProcTable &vk, const VulkanHandle< VkInstance > &application)
 
 ~VulkanDebugReport ()
 
bool IsValid () const
 

Static Public Member Functions

static std::string DebugExtensionName ()
 

Detailed Description

Definition at line 15 of file vulkan_debug_report.h.

Constructor & Destructor Documentation

◆ VulkanDebugReport()

vulkan::VulkanDebugReport::VulkanDebugReport ( const VulkanProcTable vk,
const VulkanHandle< VkInstance > &  application 
)

Definition at line 185 of file vulkan_debug_report.cc.

188 : vk_(p_vk), application_(application), valid_(false) {
189 if (!vk_.CreateDebugReportCallbackEXT || !vk_.DestroyDebugReportCallbackEXT) {
190 return;
191 }
192
193 if (!application_) {
194 return;
195 }
196
197 VkDebugReportFlagsEXT flags = kVulkanErrorFlags;
199 flags |= kVulkanInfoFlags;
200 }
201 const VkDebugReportCallbackCreateInfoEXT create_info = {
203 .pNext = nullptr,
204 .flags = flags,
206 .pUserData = nullptr,
207 };
208
209 VkDebugReportCallbackEXT handle = VK_NULL_HANDLE;
210 if (VK_CALL_LOG_ERROR(vk_.CreateDebugReportCallbackEXT(
211 application_, &create_info, nullptr, &handle)) != VK_SUCCESS) {
212 return;
213 }
214
215 handle_ = VulkanHandle<VkDebugReportCallbackEXT>{
216 handle, [this](VkDebugReportCallbackEXT handle) {
217 vk_.DestroyDebugReportCallbackEXT(application_, handle, nullptr);
218 }};
219
220 valid_ = true;
221}
FlutterSemanticsFlag flags
static VKAPI_ATTR VkBool32 OnVulkanDebugReportCallback(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT object_type, uint64_t object, size_t location, int32_t message_code, const char *layer_prefix, const char *message, void *user_data)
bool ValidationLayerInfoMessagesEnabled()
@ VK_SUCCESS
Definition: vulkan_core.h:141
VkFlags VkDebugReportFlagsEXT
#define VK_NULL_HANDLE
Definition: vulkan_core.h:46
@ VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT
Definition: vulkan_core.h:1148
#define VK_CALL_LOG_ERROR(expression)

◆ ~VulkanDebugReport()

vulkan::VulkanDebugReport::~VulkanDebugReport ( )
default

Member Function Documentation

◆ DebugExtensionName()

std::string vulkan::VulkanDebugReport::DebugExtensionName ( )
static

Definition at line 23 of file vulkan_debug_report.cc.

23 {
25}
#define VK_EXT_DEBUG_REPORT_EXTENSION_NAME

◆ IsValid()

bool vulkan::VulkanDebugReport::IsValid ( ) const

Definition at line 225 of file vulkan_debug_report.cc.

225 {
226 return valid_;
227}

The documentation for this class was generated from the following files: