anv: Misc allocation scope fixes
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 18 Jan 2016 22:04:13 +0000 (14:04 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 18 Jan 2016 22:04:13 +0000 (14:04 -0800)
src/vulkan/anv_device.c
src/vulkan/anv_wsi_wayland.c

index 7493ff7b7fc59c4cacd31d0c790b851ca31113ce..abc9ed66dd07cf541e7e2a01f9ce59fb7bb61619 100644 (file)
@@ -227,7 +227,7 @@ VkResult anv_CreateInstance(
    }
 
    instance = anv_alloc2(&default_alloc, pAllocator, sizeof(*instance), 8,
-                         VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
+                         VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
    if (!instance)
       return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
 
@@ -698,7 +698,7 @@ VkResult anv_CreateDevice(
 
    device = anv_alloc2(&physical_device->instance->alloc, pAllocator,
                        sizeof(*device), 8,
-                       VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
+                       VK_SYSTEM_ALLOCATION_SCOPE_DEVICE);
    if (!device)
       return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
 
index d708341c98fa13b40a31b8ea15f01a3f483c5751..5e8a3a56f6826933c5c1b642e1d32586712b6310 100644 (file)
@@ -239,7 +239,7 @@ wsi_wl_display_create(struct wsi_wayland *wsi, struct wl_display *wl_display)
 {
    struct wsi_wl_display *display =
       anv_alloc(&wsi->instance->alloc, sizeof(*display), 8,
-                VK_SYSTEM_ALLOCATION_SCOPE_CACHE);
+                VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
    if (!display)
       return NULL;
 
@@ -820,7 +820,7 @@ anv_wl_init_wsi(struct anv_instance *instance)
    VkResult result;
 
    wsi = anv_alloc(&instance->alloc, sizeof(*wsi), 8,
-                   VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
+                   VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
    if (!wsi) {
       result = vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
       goto fail;