From f249555504b40e1ef6e884194f06d2703ac88830 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 30 Jan 2023 20:11:59 -0600 Subject: [PATCH] nvk: Embed a nv_device_info in nvk_physical_device Part-of: --- src/nouveau/vulkan/nvk_physical_device.c | 7 +++++++ src/nouveau/vulkan/nvk_physical_device.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/nouveau/vulkan/nvk_physical_device.c b/src/nouveau/vulkan/nvk_physical_device.c index ee33b05..f6c601e 100644 --- a/src/nouveau/vulkan/nvk_physical_device.c +++ b/src/nouveau/vulkan/nvk_physical_device.c @@ -352,6 +352,13 @@ nvk_physical_device_try_create(struct nvk_instance *instance, device->instance = instance; device->dev = ndev; + device->info = (struct nv_device_info) { + .cls_copy = ndev->cls_copy, + .cls_eng2d = ndev->cls_eng2d, + .cls_eng3d = ndev->cls_eng3d, + .cls_m2mf = ndev->cls_m2mf, + .cls_compute = ndev->cls_compute, + }; device->mem_heaps[0].flags = VK_MEMORY_HEAP_DEVICE_LOCAL_BIT; device->mem_types[0].propertyFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; diff --git a/src/nouveau/vulkan/nvk_physical_device.h b/src/nouveau/vulkan/nvk_physical_device.h index b41550e..b86e2e0 100644 --- a/src/nouveau/vulkan/nvk_physical_device.h +++ b/src/nouveau/vulkan/nvk_physical_device.h @@ -4,6 +4,7 @@ #include "nvk_private.h" #include "nouveau_device.h" +#include "nv_device_info.h" #include "vulkan/runtime/vk_physical_device.h" @@ -15,6 +16,7 @@ struct nvk_physical_device { struct vk_physical_device vk; struct nvk_instance *instance; struct nouveau_ws_device *dev; + struct nv_device_info info; struct wsi_device wsi_device; // TODO: add mapable VRAM heap if possible -- 2.7.4