Vulkan Hardware Capability Viewer 2.00 released

Version 2.00 of the Vulkan Hardware Capability Viewer is now available for all platforms (Windows, Linux, Android).

The major version bump is caused by a big change in how the code for reading device extension properties and features is generated. You can find a detailled rundown on how this works below.

You can download the new version from vulkan.gpuinfo.org/download.php.

Appimage for Linux

Deploying Qt applications on Linux is not as easy as on Windows, esp. when targeting recent versions. So from my now on instead of providing just the applications binary I’ll provide an appimage that is self-contained and should work on most distros out-of-the-box. I hope this will make it easier for Linux users to run the application.

Auto-generated extension code

Up until now I manually checked the Vulkan headers upon release for new extension property and feature structures and then added them by hand. That’s tedious and also error-prone, so I decided to ditch the manual approach for an automated process instead.

That’s possible as the whole Vulkan api spec is described by a single xml, which is also used to generate the official Vulkan headers. So I decided to write a small php script. This parses the api spec xml for all extensions with structs that extend VkPhysicalDeviceProperties2 and/or VkPhysicalDeviceFeatures2, and will then generate a C++ header and implementation file ready to be used by the Vulkan Hardware Capability Viewer.

For example, the following extension and type definition from the api spec:

<extension name="VK_KHR_driver_properties" number="197" type="device" requires="VK_KHR_get_physical_device_properties2" author="KHR" contact="Daniel Rakos @drakos-amd" supported="vulkan">
    <require>
        <enum value="1"                                         name="VK_KHR_DRIVER_PROPERTIES_SPEC_VERSION"/>
        <enum value="&quot;VK_KHR_driver_properties&quot;"      name="VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME"/>
        <enum offset="0" extends="VkStructureType"              name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR"/>
        <enum name="VK_MAX_DRIVER_NAME_SIZE_KHR"/>
        <enum name="VK_MAX_DRIVER_INFO_SIZE_KHR"/>
        <type name="VkDriverIdKHR"/>
        <type name="VkConformanceVersionKHR"/>
        <type name="VkPhysicalDeviceDriverPropertiesKHR"/>
    </require>
</extension>
...
<type category="struct" name="VkPhysicalDeviceDriverPropertiesKHR" structextends="VkPhysicalDeviceProperties2" returnedonly="true">
    <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR"><type>VkStructureType</type> <name>sType</name></member>
    <member><type>void</type>*                            <name>pNext</name></member>
    <member><type>VkDriverIdKHR</type>                    <name>driverID</name></member>
    <member><type>char</type>                             <name>driverName</name>[<enum>VK_MAX_DRIVER_NAME_SIZE_KHR</enum>]</member>
    <member><type>char</type>                             <name>driverInfo</name>[<enum>VK_MAX_DRIVER_INFO_SIZE_KHR</enum>]</member>
    <member><type>VkConformanceVersionKHR</type>          <name>conformanceVersion</name></member>
</type>

Into this C++ implementation:

if (extensionSupported("VK_KHR_driver_properties")) {
    const char* extension("VK_KHR_driver_properties");
    VkPhysicalDeviceDriverPropertiesKHR extProps { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR };
    VkPhysicalDeviceProperties2 deviceProps2(initDeviceProperties2(&extProps));
    pfnGetPhysicalDeviceProperties2KHR(device, &deviceProps2);
    pushProperty2(extension, "driverID", QVariant(extProps.driverID));
    pushProperty2(extension, "driverName", QVariant(extProps.driverName));
    pushProperty2(extension, "driverInfo", QVariant(extProps.driverInfo));
    pushProperty2(extension, "conformanceVersion", QString::fromStdString(vulkanResources::conformanceVersionKHRString(extProps.conformanceVersion)));
}

So updating to the most recent version of the Vulkan specification is now much easier, and with the first 2.00 release all extensions up to Vulkan header version 1.1.121 are included.

New extensions

Thanks to the change above, the application will now always support all extensions that are part of the spec. Compared to the last release, this version adds support for reading features and/or properties for the following extensions:

  • VK_AMD_shader_core_properties2
  • VK_AMD_device_coherent_memory
  • VK_EXT_texture_compression_astc_hdr
  • VK_EXT_astc_decode_mode
  • VK_EXT_external_memory_host
  • VK_EXT_scalar_block_layout
  • VK_EXT_subgroup_size_control
  • VK_EXT_ycbcr_image_arrays
  • VK_EXT_line_rasterization
  • VK_EXT_host_query_reset
  • VK_EXT_index_type_uint8
  • VK_EXT_shader_demote_to_helper_invocation
  • VK_EXT_texel_buffer_alignment
  • VK_INTEL_shader_integer_functions2
  • VK_KHR_external_memory_capabilities
  • VK_KHR_external_semaphore_capabilities
  • VK_KHR_imageless_framebuffer
  • VK_KHR_external_fence_capabilities
  • VK_KHR_maintenance2
  • VK_KHR_uniform_buffer_standard_layout
  • VK_KHR_pipeline_executable_properties
  • VK_NV_corner_sampled_image
  • VK_NV_representative_fragment_test
  • VK_NV_fragment_shader_barycentric
  • VK_NV_shader_image_footprint
  • VK_NV_scissor_exclusive
  • VK_NV_dedicated_allocation_image_aliasing
  • VK_NV_cooperative_matrix
  • VK_NV_coverage_reduction_mode