[Bug 101183] Crash in getPhysicalDeviceFeatures/Properties2KHR

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu May 25 10:04:22 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=101183

            Bug ID: 101183
           Summary: Crash in getPhysicalDeviceFeatures/Properties2KHR
           Product: Mesa
           Version: git
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/Vulkan/intel
          Assignee: intel-3d-bugs at lists.freedesktop.org
          Reporter: webmaster at saschawillems.de
        QA Contact: intel-3d-bugs at lists.freedesktop.org
                CC: jason at jlekstrand.net

I'm preparing a new release of my Vulkan Hardware Capability viewer that uses
vkGetPhysicalDeviceFeatures/Properties2KHR to read out additional features and
properties for new extensions (when available) and on my Intel Haswell with a
recent MESA version (os is Ubuntu 16.04) calling one of these functions always
crashes. 

The function pointers are valid, and running these on other devices/operating
systems works fine so this may be a driver related problem.

To support the new feature and property functions I do the following:
- Enable "VK_KHR_get_physical_device_properties2" at instance level
- Get function pointers for both functions:

        pfnGetPhysicalDeviceFeatures2KHR =
reinterpret_cast<PFN_vkGetPhysicalDeviceFeatures2KHR>(vkGetInstanceProcAddr(vkInstance,
"vkGetPhysicalDeviceFeatures2KHR"));
        pfnGetPhysicalDeviceProperties2KHR =
reinterpret_cast<PFN_vkGetPhysicalDeviceProperties2KHR>(vkGetInstanceProcAddr(vkInstance,
"vkGetPhysicalDeviceProperties2KHR"));

- Both function pointers are valid
- Read out an extension specific feature/property like this:

        if (extensionSupported(VK_KHX_MULTIVIEW_EXTENSION_NAME)) {
                VkPhysicalDeviceFeatures2KHR deviceFeatures2{};
                VkPhysicalDeviceMultiviewFeaturesKHX multiViewFeatures{};
                multiViewFeatures.sType =
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX;
                deviceFeatures2.sType =
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR;
                deviceFeatures2.pNext = &multiViewFeatures;
                pfnGetPhysicalDeviceFeatures2KHR(device, &deviceFeatures2);
                features2.push_back(Feature2("multiview",
multiViewFeatures.multiview, VK_KHX_MULTIVIEW_EXTENSION_NAME));
                features2.push_back(Feature2("multiviewGeometryShader",
multiViewFeatures.multiviewGeometryShader, VK_KHX_MULTIVIEW_EXTENSION_NAME));
                features2.push_back(Feature2("multiviewTessellationShader",
multiViewFeatures.multiviewTessellationShader,
VK_KHX_MULTIVIEW_EXTENSION_NAME));
        }

This will always crash at pfnGetPhysicalDeviceFeatures2KHR, same for
pfnGetPhysicalDeviceProperties2KHR.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20170525/4c0eb1b2/attachment.html>


More information about the intel-3d-bugs mailing list