Module: Mesa Branch: main Commit: d41fe63d99e67dcc4095f8636ea427a014e155a3 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d41fe63d99e67dcc4095f8636ea427a014e155a3
Author: Faith Ekstrand <faith.ekstr...@collabora.com> Date: Fri Dec 8 18:39:41 2023 -0600 nvk: Add debug flags to the physical device These should probably go on the instance but everything is tangled up too badly right now. This at least moves them to some place where we have them without a nouveau_ws_device. It's fine to do this because debug flags are an environment variable and won't change across a run. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615> --- src/nouveau/vulkan/nvk_physical_device.c | 2 ++ src/nouveau/vulkan/nvk_physical_device.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/nouveau/vulkan/nvk_physical_device.c b/src/nouveau/vulkan/nvk_physical_device.c index 1bd97bd1860..2d5cf0ae4bd 100644 --- a/src/nouveau/vulkan/nvk_physical_device.c +++ b/src/nouveau/vulkan/nvk_physical_device.c @@ -896,6 +896,7 @@ nvk_create_drm_physical_device(struct vk_instance *_instance, return vk_error(instance, VK_ERROR_INCOMPATIBLE_DRIVER); const struct nv_device_info info = ws_dev->info; + enum nvk_debug debug_flags = ws_dev->debug_flags; const bool has_vm_bind = ws_dev->has_vm_bind; const struct vk_sync_type syncobj_sync_type = vk_drm_syncobj_get_type(ws_dev->fd); @@ -981,6 +982,7 @@ nvk_create_drm_physical_device(struct vk_instance *_instance, pdev->render_dev = render_dev; pdev->info = info; + pdev->debug_flags = debug_flags; pdev->nak = nak_compiler_create(&pdev->info); if (pdev->nak == NULL) { diff --git a/src/nouveau/vulkan/nvk_physical_device.h b/src/nouveau/vulkan/nvk_physical_device.h index 5bcda67d5dc..cd78496daf0 100644 --- a/src/nouveau/vulkan/nvk_physical_device.h +++ b/src/nouveau/vulkan/nvk_physical_device.h @@ -23,6 +23,7 @@ struct nvk_instance; struct nvk_physical_device { struct vk_physical_device vk; struct nv_device_info info; + enum nvk_debug debug_flags; dev_t render_dev; dev_t primary_dev; struct nak_compiler *nak;