- add some support for using the HDR10 ST2084 color space on monitors that support it (unfortunately it doesn't work, and with virtually no documentation either from nvidia or khronos it is hard to say why)

This commit is contained in:
Magnus Norddahl 2019-03-14 00:21:53 +01:00
commit 2d885d4e4c
3 changed files with 80 additions and 5 deletions

View file

@ -184,6 +184,18 @@ void VulkanDevice::SelectPhysicalDevice()
if (selected >= SupportedDevices.size())
selected = 0;
// Enable optional extensions we are interested in, if they are available on this device
for (const auto &ext : SupportedDevices[selected].device->Extensions)
{
for (const auto &opt : OptionalDeviceExtensions)
{
if (strcmp(ext.extensionName, opt) == 0)
{
EnabledDeviceExtensions.push_back(opt);
}
}
}
PhysicalDevice = *SupportedDevices[selected].device;
graphicsFamily = SupportedDevices[selected].graphicsFamily;
presentFamily = SupportedDevices[selected].presentFamily;
@ -313,6 +325,18 @@ void VulkanDevice::CreateInstance()
}
}
// Enable optional instance extensions we are interested in
for (const auto &ext : Extensions)
{
for (const auto &opt : OptionalExtensions)
{
if (strcmp(ext.extensionName, opt) == 0)
{
EnabledExtensions.push_back(opt);
}
}
}
VkApplicationInfo appInfo = {};
appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
appInfo.pApplicationName = "GZDoom";