From c0a21f09c5973ae6da0a8f5cae9f70fca8dbd757 Mon Sep 17 00:00:00 2001 From: Sylvain Doremus Date: Tue, 16 Sep 2025 10:42:26 +0200 Subject: [PATCH 1/2] Fixed running with Vulkan. --- .../DeviceManagerOverride.h | 3 +++ .../DeviceManagerOverride_VK.cpp | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/DeviceManagerOverride/DeviceManagerOverride.h b/src/DeviceManagerOverride/DeviceManagerOverride.h index d30436ec..473d6901 100644 --- a/src/DeviceManagerOverride/DeviceManagerOverride.h +++ b/src/DeviceManagerOverride/DeviceManagerOverride.h @@ -77,5 +77,8 @@ class DeviceManagerOverride_VK : public DeviceManager_VK vk::PhysicalDevice GetPhysicalDevice() { return m_VulkanPhysicalDevice; } const donut::app::DeviceCreationParameters& GetDeviceParams() { return m_DeviceParams; } DeviceManagerOverride_VK(); + +private: + bool CreateDevice() final; }; #endif diff --git a/src/DeviceManagerOverride/DeviceManagerOverride_VK.cpp b/src/DeviceManagerOverride/DeviceManagerOverride_VK.cpp index f2facc34..4e006b76 100644 --- a/src/DeviceManagerOverride/DeviceManagerOverride_VK.cpp +++ b/src/DeviceManagerOverride/DeviceManagerOverride_VK.cpp @@ -75,6 +75,25 @@ using namespace donut::app; DeviceManagerOverride_VK::DeviceManagerOverride_VK() { } +bool DeviceManagerOverride_VK::CreateDevice() +{ + bool ok = DeviceManager_VK::CreateDevice(); + + if (ok) + { + sl::VulkanInfo vulkanInfo; + vulkanInfo.device = m_VulkanDevice; + vulkanInfo.instance = m_VulkanInstance; + vulkanInfo.physicalDevice = m_VulkanPhysicalDevice; + vulkanInfo.computeQueueIndex = 0; + vulkanInfo.computeQueueFamily = m_ComputeQueueFamily; + vulkanInfo.graphicsQueueIndex = 0; + vulkanInfo.graphicsQueueFamily = m_GraphicsQueueFamily; + NVWrapper::Get().SetDevice_raw(&vulkanInfo); + } + + return ok; +} DeviceManager* CreateVK() { From b3e6fae0855b6fbc7a7c366a49ab9ed31c51cf17 Mon Sep 17 00:00:00 2001 From: Sylvain Doremus Date: Tue, 16 Sep 2025 10:43:27 +0200 Subject: [PATCH 2/2] Enabled imgui debug plugin when enabled from CMake. --- src/SLWrapper.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/SLWrapper.cpp b/src/SLWrapper.cpp index 95976ec2..0fb40194 100644 --- a/src/SLWrapper.cpp +++ b/src/SLWrapper.cpp @@ -222,6 +222,9 @@ bool SLWrapper::Initialize_preDevice(nvrhi::GraphicsAPI api) #endif #ifdef STREAMLINE_FEATURE_LATEWARP sl::kFeatureLatewarp, +#endif +#ifdef STREAMLINE_FEATURE_IMGUI + sl::kFeatureImGUI, #endif // PCL is always implicitly loaded, but request it to ensure we never have 0-sized array sl::kFeaturePCL