vk/0.132: Dispatch vkDestroyObject to new destructors
authorChad Versace <chad.versace@intel.com>
Tue, 14 Jul 2015 16:56:48 +0000 (09:56 -0700)
committerChad Versace <chad.versace@intel.com>
Tue, 14 Jul 2015 16:58:22 +0000 (09:58 -0700)
Oops. My recent commits added new destructors, but forgot to teach
vkDestroyObject about them. They are:
  vkDestroyFence
  vkDestroyEvent
  vkDestroySemaphore
  vkDestroyQueryPool
  vkDestroyBuffer

src/vulkan/device.c

index 02e00c4a326d9c02ca4826222070b8a53b5b01cd..0256b66791fe5c2494a24326401a65b8a6bc15f2 100644 (file)
@@ -1184,6 +1184,9 @@ VkResult anv_DestroyObject(
    struct anv_object *object = (struct anv_object *) _object;
 
    switch (objType) {
+   case VK_OBJECT_TYPE_FENCE:
+      return anv_DestroyFence(_device, (VkFence) _object);
+
    case VK_OBJECT_TYPE_INSTANCE:
       return anv_DestroyInstance((VkInstance) _object);
 
@@ -1223,6 +1226,8 @@ VkResult anv_DestroyObject(
       return anv_DestroyImage(_device, _object);
 
    case VK_OBJECT_TYPE_BUFFER:
+      return anv_DestroyBuffer(_device, (VkBuffer) _object);
+
    case VK_OBJECT_TYPE_SHADER:
    case VK_OBJECT_TYPE_SHADER_MODULE:
    case VK_OBJECT_TYPE_PIPELINE_LAYOUT:
@@ -1240,15 +1245,18 @@ VkResult anv_DestroyObject(
    case VK_OBJECT_TYPE_COMMAND_BUFFER:
    case VK_OBJECT_TYPE_PIPELINE:
    case VK_OBJECT_TYPE_DYNAMIC_VP_STATE:
-   case VK_OBJECT_TYPE_FENCE:
-   case VK_OBJECT_TYPE_QUERY_POOL:
    case VK_OBJECT_TYPE_FRAMEBUFFER:
       (object->destructor)(device, object, objType);
       return VK_SUCCESS;
 
+   case VK_OBJECT_TYPE_QUERY_POOL:
+      return anv_DestroyQueryPool(_device, (VkQueryPool) _object);
+
    case VK_OBJECT_TYPE_SEMAPHORE:
+      return anv_DestroySemaphore(_device, (VkSemaphore) _object);
+
    case VK_OBJECT_TYPE_EVENT:
-      stub_return(VK_UNSUPPORTED);
+      return anv_DestroyEvent(_device, (VkEvent) _object);
 
    default:
       unreachable("Invalid object type");