Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/DeviceManagerOverride/DeviceManagerOverride.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
19 changes: 19 additions & 0 deletions src/DeviceManagerOverride/DeviceManagerOverride_VK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
3 changes: 3 additions & 0 deletions src/SLWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down