Home > other >  Vulkan extensions is listed by vulkaninfo but not by enumerateInstanceExtensions
Vulkan extensions is listed by vulkaninfo but not by enumerateInstanceExtensions

Time:08-07

I am trying to enable conservative rasterization.

To that effect I am calling vk::enumerateExtensionProperties() to see the extensions supported on my system.

That gives me this list:

VK_KHR_device_group_creation
VK_KHR_display
VK_KHR_external_fence_capabilities
VK_KHR_external_memory_capabilities
VK_KHR_external_semaphore_capabilities
VK_KHR_get_display_properties2
VK_KHR_get_physical_device_properties2
VK_KHR_get_surface_capabilities2
VK_KHR_surface
VK_KHR_surface_protected_capabilities
VK_KHR_wayland_surface
VK_KHR_xcb_surface
VK_KHR_xlib_surface
VK_EXT_acquire_drm_display
VK_EXT_acquire_xlib_display
VK_EXT_debug_report
VK_EXT_direct_mode_display
VK_EXT_display_surface_counter
VK_EXT_debug_utils
VK_KHR_portability_enumeration

Printed by:

    auto [result, extensions] = vk::enumerateInstanceExtensionProperties();
    Assert(
        result == vk::Result::eSuccess, "Error: Failed to request available extensions");

    for(const auto& extension: extensions)
    {
        std::cout << extension.extensionName << std::endl;
    }

Conservative rasterization is not enabled.

But when I use vulkaninfo it does show:

Device Extensions: count = 138
    VK_EXT_4444_formats                       : extension revision 1
    VK_EXT_blend_operation_advanced           : extension revision 2
    VK_EXT_border_color_swizzle               : extension revision 1
    VK_EXT_buffer_device_address              : extension revision 2
    VK_EXT_calibrated_timestamps              : extension revision 2
    VK_EXT_color_write_enable                 : extension revision 1
    VK_EXT_conditional_rendering              : extension revision 2
    VK_EXT_conservative_rasterization         : extension revision 1
    ...

How come it is found by vulkan ino and not by enumerateExtenions?

CodePudding user response:

You are comparing instance extensions (on your side) with device extensions in vulkaninfo. To get a list of device extensions, you need to call vkEnumerateDeviceExtensionPropertiesinstead of vkEnumerateInstanceExtensionProperties. That should give you the same list as vulkaninfo does.

  • Related