1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-28 16:24:13 +01:00

[dxvk] Enable VK_EXT_hdr_metadata

This commit is contained in:
Joshua Ashton 2022-12-18 17:29:33 +00:00 committed by Philip Rebohle
parent 4335eccae9
commit 731bf84edd
5 changed files with 21 additions and 3 deletions

View File

@ -186,7 +186,8 @@
"VK_EXT_vertex_attribute_divisor": 1,
"VK_EXT_custom_border_color": 1,
"VK_EXT_depth_clip_enable": 1,
"VK_EXT_swapchain_colorspace": 1
"VK_EXT_swapchain_colorspace": 1,
"VK_EXT_hdr_metadata": 1
},
"features": {
"VkPhysicalDeviceFeatures": {
@ -390,7 +391,7 @@
"revision": 4,
"date": "2022-12-18",
"author": "Joshua Ashton",
"comment": "Add VK_EXT_swapchain_colorspace to d3d11_baseline_optional"
"comment": "Add VK_EXT_swapchain_colorspace and VK_EXT_hdr_metadata to d3d11_baseline_optional"
},
{
"revision": 3,

View File

@ -318,6 +318,8 @@ namespace dxvk {
|| !required.extShaderStencilExport)
&& (m_deviceFeatures.extShaderStencilExport
|| !required.extSwapchainColorSpace)
&& (m_deviceFeatures.extHdrMetadata
|| !required.extHdrMetadata)
&& (m_deviceFeatures.extTransformFeedback.transformFeedback
|| !required.extTransformFeedback.transformFeedback)
&& (m_deviceFeatures.extVertexAttributeDivisor.vertexAttributeInstanceRateDivisor
@ -337,7 +339,7 @@ namespace dxvk {
DxvkDeviceFeatures enabledFeatures) {
DxvkDeviceExtensions devExtensions;
std::array<DxvkExt*, 25> devExtensionList = {{
std::array<DxvkExt*, 26> devExtensionList = {{
&devExtensions.amdMemoryOverallocationBehaviour,
&devExtensions.amdShaderFragmentMask,
&devExtensions.extAttachmentFeedbackLoopLayout,
@ -348,6 +350,7 @@ namespace dxvk {
&devExtensions.extFragmentShaderInterlock,
&devExtensions.extFullScreenExclusive,
&devExtensions.extGraphicsPipelineLibrary,
&devExtensions.extHdrMetadata,
&devExtensions.extMemoryBudget,
&devExtensions.extMemoryPriority,
&devExtensions.extNonSeamlessCubeMap,
@ -543,6 +546,9 @@ namespace dxvk {
if (devExtensions.extSwapchainColorSpace)
enabledFeatures.extSwapchainColorSpace = VK_TRUE;
if (devExtensions.extHdrMetadata)
enabledFeatures.extHdrMetadata = VK_TRUE;
if (devExtensions.extTransformFeedback) {
enabledFeatures.extTransformFeedback.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT;
enabledFeatures.extTransformFeedback.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.extTransformFeedback);
@ -884,6 +890,9 @@ namespace dxvk {
if (m_deviceExtensions.supports(VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME))
m_deviceFeatures.extSwapchainColorSpace = VK_TRUE;
if (m_deviceExtensions.supports(VK_EXT_HDR_METADATA_EXTENSION_NAME))
m_deviceFeatures.extHdrMetadata = VK_TRUE;
if (m_deviceExtensions.supports(VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME)) {
m_deviceFeatures.extTransformFeedback.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT;
m_deviceFeatures.extTransformFeedback.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extTransformFeedback);
@ -1035,6 +1044,8 @@ namespace dxvk {
"\n extension supported : ", features.extShaderStencilExport ? "1" : "0",
"\n", VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME,
"\n extension supported : ", features.extSwapchainColorSpace ? "1" : "0",
"\n", VK_EXT_HDR_METADATA_EXTENSION_NAME,
"\n extension supported : ", features.extHdrMetadata ? "1" : "0",
"\n", VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME,
"\n transformFeedback : ", features.extTransformFeedback.transformFeedback ? "1" : "0",
"\n geometryStreams : ", features.extTransformFeedback.geometryStreams ? "1" : "0",

View File

@ -55,6 +55,7 @@ namespace dxvk {
VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT extShaderModuleIdentifier;
VkBool32 extShaderStencilExport;
VkBool32 extSwapchainColorSpace;
VkBool32 extHdrMetadata;
VkPhysicalDeviceTransformFeedbackFeaturesEXT extTransformFeedback;
VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT extVertexAttributeDivisor;
VkBool32 khrExternalMemoryWin32;

View File

@ -293,6 +293,7 @@ namespace dxvk {
DxvkExt extShaderModuleIdentifier = { VK_EXT_SHADER_MODULE_IDENTIFIER_EXTENSION_NAME, DxvkExtMode::Optional };
DxvkExt extShaderStencilExport = { VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME, DxvkExtMode::Optional };
DxvkExt extSwapchainColorSpace = { VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME, DxvkExtMode::Optional };
DxvkExt extHdrMetadata = { VK_EXT_HDR_METADATA_EXTENSION_NAME, DxvkExtMode::Optional };
DxvkExt extTransformFeedback = { VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME, DxvkExtMode::Optional };
DxvkExt extVertexAttributeDivisor = { VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME, DxvkExtMode::Optional };
DxvkExt khrExternalMemoryWin32 = { VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME, DxvkExtMode::Optional };

View File

@ -384,6 +384,10 @@ namespace dxvk::vk {
VULKAN_FN(vkGetDeviceGroupSurfacePresentModes2EXT);
#endif
#ifdef VK_EXT_hdr_metadata
VULKAN_FN(vkSetHdrMetadataEXT);
#endif
#ifdef VK_EXT_shader_module_identifier
VULKAN_FN(vkGetShaderModuleCreateInfoIdentifierEXT);
VULKAN_FN(vkGetShaderModuleIdentifierEXT);