nvk: Add an nvk_device_physical helper
authorFaith Ekstrand <faith.ekstrand@collabora.com>
Tue, 31 Jan 2023 02:11:48 +0000 (20:11 -0600)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 21:31:54 +0000 (21:31 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

src/nouveau/vulkan/nvk_device.h

index f771ff6..d32444c 100644 (file)
@@ -22,4 +22,11 @@ struct nvk_device {
 };
 
 VK_DEFINE_HANDLE_CASTS(nvk_device, vk.base, VkDevice, VK_OBJECT_TYPE_DEVICE)
+
+static struct nvk_physical_device *
+nvk_device_physical(struct nvk_device *device)
+{
+   return (struct nvk_physical_device *)device->vk.physical;
+}
+
 #endif