Mesa (staging/21.2): anv: use vk_object_zalloc for wsi fences created
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Oct 14 20:22:36 UTC 2021
Module: Mesa
Branch: staging/21.2
Commit: 6d4f4ade711dc849200342dd0d953983bd769265
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6d4f4ade711dc849200342dd0d953983bd769265
Author: Tapani Pälli <tapani.palli at intel.com>
Date: Wed Oct 13 10:37:32 2021 +0300
anv: use vk_object_zalloc for wsi fences created
Otherwise we hit assert in vk_object_base_assert_valid when attemping to
create handle from anv_fence with unknown base type.
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13330>
(cherry picked from commit d729038c073d267e1c04bdd49cc5a53f34acbf63)
---
.pick_status.json | 2 +-
src/intel/vulkan/anv_wsi_display.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 94b7aa3c931..a4ebe86f0de 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -409,7 +409,7 @@
"description": "anv: use vk_object_zalloc for wsi fences created",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/intel/vulkan/anv_wsi_display.c b/src/intel/vulkan/anv_wsi_display.c
index 4bb0453f55f..cd1b00cb2d2 100644
--- a/src/intel/vulkan/anv_wsi_display.c
+++ b/src/intel/vulkan/anv_wsi_display.c
@@ -254,8 +254,8 @@ anv_RegisterDeviceEventEXT(VkDevice _device,
struct anv_fence *fence;
VkResult ret;
- fence = vk_zalloc2(&device->vk.alloc, allocator, sizeof (*fence), 8,
- VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
+ fence = vk_object_zalloc(&device->vk, allocator, sizeof (*fence),
+ VK_OBJECT_TYPE_FENCE);
if (!fence)
return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
@@ -285,8 +285,8 @@ anv_RegisterDisplayEventEXT(VkDevice _device,
struct anv_fence *fence;
VkResult ret;
- fence = vk_zalloc2(&device->vk.alloc, allocator, sizeof (*fence), 8,
- VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
+ fence = vk_object_zalloc(&device->vk, allocator, sizeof (*fence),
+ VK_OBJECT_TYPE_FENCE);
if (!fence)
return VK_ERROR_OUT_OF_HOST_MEMORY;
More information about the mesa-commit
mailing list