Mesa (staging/19.3): anv: Stop allocating WSI event fences off the instance

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 21 20:16:13 UTC 2020


Module: Mesa
Branch: staging/19.3
Commit: 41d867247af8bf90c4bd4be30de92aa1fc3190ab
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=41d867247af8bf90c4bd4be30de92aa1fc3190ab

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Jan 17 23:03:41 2020 -0600

anv: Stop allocating WSI event fences off the instance

Fixes: 16eb390834d "anv: add VK_EXT_display_control to anv driver [v5]"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3461>
(cherry picked from commit f0519c9cf9fdccf93b0c3b81b47911de2422b285)

---

 .pick_status.json                  | 2 +-
 src/intel/vulkan/anv_wsi_display.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 1413c8200fa..6488aebf7fc 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -202,7 +202,7 @@
         "description": "anv: Stop allocating WSI event fences off the instance",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "16eb390834daaa153522e63bb17df9526eb9123c"
     },
diff --git a/src/intel/vulkan/anv_wsi_display.c b/src/intel/vulkan/anv_wsi_display.c
index 3212c235bab..60722eeb7a7 100644
--- a/src/intel/vulkan/anv_wsi_display.c
+++ b/src/intel/vulkan/anv_wsi_display.c
@@ -255,7 +255,7 @@ anv_RegisterDeviceEventEXT(VkDevice _device,
    struct anv_fence *fence;
    VkResult ret;
 
-   fence = vk_zalloc2(&device->instance->alloc, allocator, sizeof (*fence), 8,
+   fence = vk_zalloc2(&device->alloc, allocator, sizeof (*fence), 8,
                       VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
    if (!fence)
       return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
@@ -270,7 +270,7 @@ anv_RegisterDeviceEventEXT(VkDevice _device,
    if (ret == VK_SUCCESS)
       *_fence = anv_fence_to_handle(fence);
    else
-      vk_free2(&device->instance->alloc, allocator, fence);
+      vk_free2(&device->alloc, allocator, fence);
    return ret;
 }
 



More information about the mesa-commit mailing list