Skip to content

Commit 9b7d005

Browse files
Vulkan: enable extensions required by DLSS
1 parent 713ada0 commit 9b7d005

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,28 @@ void EngineFactoryVkImpl::CreateDeviceAndContextsVk(const EngineVkCreateInfo& En
12861286
LOG_ERROR_MESSAGE("Can not enable extended device features when VK_KHR_get_physical_device_properties2 extension is not supported by device");
12871287
}
12881288

1289+
// Extensions required by DLSS
1290+
{
1291+
constexpr std::array<const char*, 3> DLSSReqExts = {
1292+
VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME,
1293+
VK_NVX_BINARY_IMPORT_EXTENSION_NAME,
1294+
VK_NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME,
1295+
};
1296+
bool DLSSReqExtsSupported = true;
1297+
for (const char* Ext : DLSSReqExts)
1298+
{
1299+
if (!PhysicalDevice->IsExtensionSupported(Ext))
1300+
{
1301+
DLSSReqExtsSupported = false;
1302+
break;
1303+
}
1304+
}
1305+
if (DLSSReqExtsSupported)
1306+
{
1307+
DeviceExtensions.insert(DeviceExtensions.end(), DLSSReqExts.begin(), DLSSReqExts.end());
1308+
}
1309+
}
1310+
12891311
ASSERT_SIZEOF(DeviceFeatures, 48, "Did you add a new feature to DeviceFeatures? Please handle its status here.");
12901312

12911313
for (Uint32 i = 0; i < EngineCI.DeviceExtensionCount; ++i)

0 commit comments

Comments
 (0)