1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-29 01:24:11 +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_vertex_attribute_divisor": 1,
"VK_EXT_custom_border_color": 1, "VK_EXT_custom_border_color": 1,
"VK_EXT_depth_clip_enable": 1, "VK_EXT_depth_clip_enable": 1,
"VK_EXT_swapchain_colorspace": 1 "VK_EXT_swapchain_colorspace": 1,
"VK_EXT_hdr_metadata": 1
}, },
"features": { "features": {
"VkPhysicalDeviceFeatures": { "VkPhysicalDeviceFeatures": {
@ -390,7 +391,7 @@
"revision": 4, "revision": 4,
"date": "2022-12-18", "date": "2022-12-18",
"author": "Joshua Ashton", "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, "revision": 3,

View File

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

View File

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

View File

@ -293,6 +293,7 @@ namespace dxvk {
DxvkExt extShaderModuleIdentifier = { VK_EXT_SHADER_MODULE_IDENTIFIER_EXTENSION_NAME, DxvkExtMode::Optional }; DxvkExt extShaderModuleIdentifier = { VK_EXT_SHADER_MODULE_IDENTIFIER_EXTENSION_NAME, DxvkExtMode::Optional };
DxvkExt extShaderStencilExport = { VK_EXT_SHADER_STENCIL_EXPORT_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 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 extTransformFeedback = { VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME, DxvkExtMode::Optional };
DxvkExt extVertexAttributeDivisor = { VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_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 }; DxvkExt khrExternalMemoryWin32 = { VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME, DxvkExtMode::Optional };

View File

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