turnip: Switch to the common VK_EXT_debug_report
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 28 Jan 2021 20:56:34 +0000 (14:56 -0600)
committerMarge Bot <eric+marge@anholt.net>
Mon, 1 Feb 2021 18:54:24 +0000 (18:54 +0000)
Acked-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

src/freedreno/vulkan/tu_device.c
src/freedreno/vulkan/tu_private.h

index 0ab59cd..a248c1d 100644 (file)
@@ -256,13 +256,6 @@ tu_CreateInstance(const VkInstanceCreateInfo *pCreateInfo,
    if (instance->debug_flags & TU_DEBUG_STARTUP)
       mesa_logi("Created an instance");
 
-   result = vk_debug_report_instance_init(&instance->debug_report_callbacks);
-   if (result != VK_SUCCESS) {
-      vk_instance_finish(&instance->vk);
-      vk_free(pAllocator, instance);
-      return vk_startup_errorf(instance, result, "debug_report setup failure");
-   }
-
    glsl_type_singleton_init_or_ref();
 
    VG(VALGRIND_CREATE_MEMPOOL(instance, 0, false));
@@ -289,8 +282,6 @@ tu_DestroyInstance(VkInstance _instance,
 
    glsl_type_singleton_decref();
 
-   vk_debug_report_instance_destroy(&instance->debug_report_callbacks);
-
    vk_instance_finish(&instance->vk);
    vk_free(&instance->vk.alloc, instance);
 }
@@ -2022,44 +2013,6 @@ tu_GetPhysicalDeviceExternalFenceProperties(
    pExternalFenceProperties->externalFenceFeatures = 0;
 }
 
-VkResult
-tu_CreateDebugReportCallbackEXT(
-   VkInstance _instance,
-   const VkDebugReportCallbackCreateInfoEXT *pCreateInfo,
-   const VkAllocationCallbacks *pAllocator,
-   VkDebugReportCallbackEXT *pCallback)
-{
-   TU_FROM_HANDLE(tu_instance, instance, _instance);
-   return vk_create_debug_report_callback(&instance->debug_report_callbacks,
-                                          pCreateInfo, pAllocator,
-                                          &instance->alloc, pCallback);
-}
-
-void
-tu_DestroyDebugReportCallbackEXT(VkInstance _instance,
-                                 VkDebugReportCallbackEXT _callback,
-                                 const VkAllocationCallbacks *pAllocator)
-{
-   TU_FROM_HANDLE(tu_instance, instance, _instance);
-   vk_destroy_debug_report_callback(&instance->debug_report_callbacks,
-                                    _callback, pAllocator, &instance->alloc);
-}
-
-void
-tu_DebugReportMessageEXT(VkInstance _instance,
-                         VkDebugReportFlagsEXT flags,
-                         VkDebugReportObjectTypeEXT objectType,
-                         uint64_t object,
-                         size_t location,
-                         int32_t messageCode,
-                         const char *pLayerPrefix,
-                         const char *pMessage)
-{
-   TU_FROM_HANDLE(tu_instance, instance, _instance);
-   vk_debug_report(&instance->debug_report_callbacks, flags, objectType,
-                   object, location, messageCode, pLayerPrefix, pMessage);
-}
-
 void
 tu_GetDeviceGroupPeerMemoryFeatures(
    VkDevice device,
index 92f54a9..1b71a8d 100644 (file)
@@ -228,8 +228,6 @@ struct tu_instance
    struct tu_physical_device physical_devices[TU_MAX_DRM_DEVICES];
 
    enum tu_debug_flags debug_flags;
-
-   struct vk_debug_report_instance debug_report_callbacks;
 };
 
 VkResult