Skip to content

Commit 84820b4

Browse files
Vulkan: enable extensions required by DLSS
1 parent 573036f commit 84820b4

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp

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

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

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

0 commit comments

Comments
 (0)