diff --git a/renderdoc/driver/vulkan/extension_support.md b/renderdoc/driver/vulkan/extension_support.md index 4d71649a5b..f590fa776f 100644 --- a/renderdoc/driver/vulkan/extension_support.md +++ b/renderdoc/driver/vulkan/extension_support.md @@ -80,6 +80,7 @@ Maintainers can update this file by updating vk.xml in this folder and running ` * `VK_EXT_non_seamless_cube_map` * `VK_EXT_pageable_device_local_memory` * `VK_EXT_pci_bus_info` +* `VK_EXT_physical_device_drm` * `VK_EXT_pipeline_creation_cache_control` * `VK_EXT_pipeline_creation_feedback` * `VK_EXT_post_depth_coverage` @@ -292,7 +293,6 @@ Ray tracing extensions are now standard and will likely be supported at some poi * `VK_EXT_metal_objects` * `VK_EXT_multi_draw` * `VK_EXT_opacity_micromap` -* `VK_EXT_physical_device_drm` * `VK_EXT_pipeline_library_group_handles` * `VK_EXT_pipeline_properties` * `VK_EXT_pipeline_protected_access` diff --git a/renderdoc/driver/vulkan/vk_common.h b/renderdoc/driver/vulkan/vk_common.h index be5e7551b0..3041b99ca6 100644 --- a/renderdoc/driver/vulkan/vk_common.h +++ b/renderdoc/driver/vulkan/vk_common.h @@ -1334,6 +1334,7 @@ DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceDescriptorIndexingFeatures) DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceDescriptorIndexingProperties) DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceDiscardRectanglePropertiesEXT); DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceDriverProperties); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceDrmPropertiesEXT); DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceDynamicRenderingFeatures); DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceExtendedDynamicState2FeaturesEXT); DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceExtendedDynamicState3FeaturesEXT); @@ -1774,6 +1775,7 @@ DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceDescriptorIndexingFeatures) DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceDescriptorIndexingProperties) DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceDiscardRectanglePropertiesEXT); DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceDriverProperties); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceDrmPropertiesEXT); DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceDynamicRenderingFeatures); DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceExtendedDynamicState2FeaturesEXT); DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceExtendedDynamicState3FeaturesEXT); diff --git a/renderdoc/driver/vulkan/vk_core.cpp b/renderdoc/driver/vulkan/vk_core.cpp index bdeef59443..a82f9c9cec 100644 --- a/renderdoc/driver/vulkan/vk_core.cpp +++ b/renderdoc/driver/vulkan/vk_core.cpp @@ -1220,6 +1220,10 @@ static const VkExtensionProperties supportedExtensions[] = { VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, VK_EXT_PCI_BUS_INFO_SPEC_VERSION, }, + { + VK_EXT_PHYSICAL_DEVICE_DRM_EXTENSION_NAME, + VK_EXT_PHYSICAL_DEVICE_DRM_SPEC_VERSION, + }, { VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_EXTENSION_NAME, VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_SPEC_VERSION, diff --git a/renderdoc/driver/vulkan/vk_next_chains.cpp b/renderdoc/driver/vulkan/vk_next_chains.cpp index dd05904255..ed44931a2c 100644 --- a/renderdoc/driver/vulkan/vk_next_chains.cpp +++ b/renderdoc/driver/vulkan/vk_next_chains.cpp @@ -270,6 +270,8 @@ static void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct, VkPhysicalDeviceDiscardRectanglePropertiesEXT); \ COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES, \ VkPhysicalDeviceDriverProperties); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRM_PROPERTIES_EXT, \ + VkPhysicalDeviceDrmPropertiesEXT); \ COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES, \ VkPhysicalDeviceDynamicRenderingFeatures) \ COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT, \ @@ -997,7 +999,6 @@ static void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct, case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV: \ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT: \ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV: \ - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRM_PROPERTIES_EXT: \ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES_KHR: \ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT: \ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV: \ diff --git a/renderdoc/driver/vulkan/vk_serialise.cpp b/renderdoc/driver/vulkan/vk_serialise.cpp index 2559a8c537..20b88915c3 100644 --- a/renderdoc/driver/vulkan/vk_serialise.cpp +++ b/renderdoc/driver/vulkan/vk_serialise.cpp @@ -1456,6 +1456,10 @@ SERIALISE_VK_HANDLES(); PNEXT_STRUCT(VK_STRUCTURE_TYPE_SUBPASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_QCOM, \ VkSubpassFragmentDensityMapOffsetEndInfoQCOM) \ \ + /* VK_EXT_physical_device_drm */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRM_PROPERTIES_EXT, \ + VkPhysicalDeviceDrmPropertiesEXT) \ + \ /* Surface creation structs. These would pull in dependencies on OS-specific includes. */ \ /* So treat them as unsupported. */ \ PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR) \ @@ -1648,9 +1652,6 @@ SERIALISE_VK_HANDLES(); PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXT) \ PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT) \ \ - /* VK_EXT_physical_device_drm */ \ - PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRM_PROPERTIES_EXT) \ - \ /* VK_EXT_pipeline_library_group_handles */ \ PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT) \ \ @@ -6800,6 +6801,26 @@ void Deserialise(const VkSubpassFragmentDensityMapOffsetEndInfoQCOM &el) delete[] el.pFragmentDensityOffsets; } +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceDrmPropertiesEXT &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRM_PROPERTIES_EXT); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(hasPrimary); + SERIALISE_MEMBER(hasRender); + SERIALISE_MEMBER(primaryMajor); + SERIALISE_MEMBER(primaryMinor); + SERIALISE_MEMBER(renderMajor); + SERIALISE_MEMBER(renderMinor); +} + +template <> +void Deserialise(const VkPhysicalDeviceDrmPropertiesEXT &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT &el) { @@ -12584,6 +12605,7 @@ INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceDescriptorIndexingFeatures) INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceDescriptorIndexingProperties) INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceDiscardRectanglePropertiesEXT); INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceDriverProperties); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceDrmPropertiesEXT); INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceDynamicRenderingFeatures); INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceExtendedDynamicState2FeaturesEXT); INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceExtendedDynamicState3FeaturesEXT);