Module: Mesa Branch: staging/21.0 Commit: 0ce1f091012ebc9936803f74e41493b032806571 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0ce1f091012ebc9936803f74e41493b032806571
Author: Dylan Baker <dylan.c.ba...@intel.com> Date: Thu Feb 18 11:29:07 2021 -0800 Revert "vulkan: Make vk_debug_report_callback derive from vk_object_base" This reverts commit ca39949a27dcd4d9715afbb616a9896ce2e8b388. --- .pick_status.json | 2 +- src/vulkan/util/vk_debug_report.c | 15 ++++++--------- src/vulkan/util/vk_debug_report.h | 7 ------- 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 0455f70815e..905367429bf 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -8221,7 +8221,7 @@ "description": "vulkan: Make vk_debug_report_callback derive from vk_object_base", "nominated": true, "nomination_type": 1, - "resolution": 1, + "resolution": 0, "master_sha": null, "because_sha": "51c6bc13ce3a70b1948ce5c4edbc1d29c5460986" }, diff --git a/src/vulkan/util/vk_debug_report.c b/src/vulkan/util/vk_debug_report.c index 2fc19ea3f26..4673e9a3342 100644 --- a/src/vulkan/util/vk_debug_report.c +++ b/src/vulkan/util/vk_debug_report.c @@ -58,9 +58,6 @@ vk_create_debug_report_callback(struct vk_debug_report_instance *instance, if (!cb) return VK_ERROR_OUT_OF_HOST_MEMORY; - vk_object_base_init(NULL, &cb->base, - VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT); - cb->flags = pCreateInfo->flags; cb->callback = pCreateInfo->pfnCallback; cb->data = pCreateInfo->pUserData; @@ -69,7 +66,7 @@ vk_create_debug_report_callback(struct vk_debug_report_instance *instance, list_addtail(&cb->link, &instance->callbacks); mtx_unlock(&instance->callbacks_mutex); - *pCallback = vk_debug_report_callback_to_handle(cb); + *pCallback = (VkDebugReportCallbackEXT)(uintptr_t)cb; return VK_SUCCESS; } @@ -80,20 +77,20 @@ vk_destroy_debug_report_callback(struct vk_debug_report_instance *instance, const VkAllocationCallbacks* pAllocator, const VkAllocationCallbacks* instance_allocator) { - VK_FROM_HANDLE(vk_debug_report_callback, callback, _callback); - - if (callback == NULL) + if (_callback == VK_NULL_HANDLE) return; + struct vk_debug_report_callback *callback = + (struct vk_debug_report_callback *)(uintptr_t)_callback; + /* Remove from list and destroy given callback. */ mtx_lock(&instance->callbacks_mutex); list_del(&callback->link); vk_free2(instance_allocator, pAllocator, callback); mtx_unlock(&instance->callbacks_mutex); - - vk_object_base_finish(&callback->base); } + void vk_debug_report(struct vk_debug_report_instance *instance, VkDebugReportFlagsEXT flags, diff --git a/src/vulkan/util/vk_debug_report.h b/src/vulkan/util/vk_debug_report.h index e6ee06967d8..8cd09418795 100644 --- a/src/vulkan/util/vk_debug_report.h +++ b/src/vulkan/util/vk_debug_report.h @@ -26,15 +26,11 @@ #ifndef VK_DEBUG_REPORT_H #define VK_DEBUG_REPORT_H -#include "vk_object.h" - #include "c11/threads.h" #include "util/list.h" #include <vulkan/vulkan.h> struct vk_debug_report_callback { - struct vk_object_base base; - /* Link in the 'callbacks' list in anv_instance struct. */ struct list_head link; VkDebugReportFlagsEXT flags; @@ -42,9 +38,6 @@ struct vk_debug_report_callback { void * data; }; -VK_DEFINE_HANDLE_CASTS(vk_debug_report_callback, base, VkDebugReportCallbackEXT, - VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT) - struct vk_debug_report_instance { /* VK_EXT_debug_report debug callbacks */ mtx_t callbacks_mutex; _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit