Skip to content

Repeat of #367, but with get_physical_device_queue_family_properties2 (Incorrect stype causing validation errors) #407

Description

@LilyIsTrans

Pretty much exactly what it says in the title: get_physical_device_queue_family_properties2 throws a validation error for every queue family on the physical device, presumably because the implementation of get_physical_device_queue_family_properties2 has the out pointer set to fully uninitialized memory (as opposed to default-initialized QueueFamilyProperties2 objects.

I suspect the same fix will work as for #367, just default-initialize the Vec before the second call. I'll open a pull request later today with that fix if it works.

If it does, it might make sense to default-initialize any out pointers to structs (or arrays thereof) with sType fields as policy (or at least set the sType itself); it is genuinely technically a violation in all cases to pass a pointer to the implementation that doesn't have the correct sType field, the validation layers probably just don't check it very thoroughly.

The specific output I'm getting is:

Validation Error: [ VUID-VkQueueFamilyProperties2-sType-sType ] | MessageID = 0x3feff2ec
vkGetPhysicalDeviceQueueFamilyProperties2(): pQueueFamilyProperties[0].sType must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2
The Vulkan spec states: sType must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2 (https://docs.vulkan.org/spec/latest/chapters/devsandqueues.html#VUID-VkQueueFamilyProperties2-sType-sType)
Objects: 1
    [0] VkPhysicalDevice 0x55705d19a000

Validation Error: [ VUID-VkQueueFamilyProperties2-sType-sType ] | MessageID = 0x3feff2ec
vkGetPhysicalDeviceQueueFamilyProperties2(): pQueueFamilyProperties[1].sType must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2
The Vulkan spec states: sType must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2 (https://docs.vulkan.org/spec/latest/chapters/devsandqueues.html#VUID-VkQueueFamilyProperties2-sType-sType)
Objects: 1
    [0] VkPhysicalDevice 0x55705d19a000

Validation Error: [ VUID-VkQueueFamilyProperties2-sType-sType ] | MessageID = 0x3feff2ec
vkGetPhysicalDeviceQueueFamilyProperties2(): pQueueFamilyProperties[2].sType must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2
The Vulkan spec states: sType must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2 (https://docs.vulkan.org/spec/latest/chapters/devsandqueues.html#VUID-VkQueueFamilyProperties2-sType-sType)
Objects: 1
    [0] VkPhysicalDevice 0x55705d19a000

Validation Error: [ VUID-VkQueueFamilyProperties2-sType-sType ] | MessageID = 0x3feff2ec
vkGetPhysicalDeviceQueueFamilyProperties2(): pQueueFamilyProperties[3].sType must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2
The Vulkan spec states: sType must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2 (https://docs.vulkan.org/spec/latest/chapters/devsandqueues.html#VUID-VkQueueFamilyProperties2-sType-sType)
Objects: 1
    [0] VkPhysicalDevice 0x55705d19a000

Validation Error: [ VUID-VkQueueFamilyProperties2-sType-sType ] | MessageID = 0x3feff2ec
vkGetPhysicalDeviceQueueFamilyProperties2(): pQueueFamilyProperties[4].sType must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2
The Vulkan spec states: sType must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2 (https://docs.vulkan.org/spec/latest/chapters/devsandqueues.html#VUID-VkQueueFamilyProperties2-sType-sType)
Objects: 1
    [0] VkPhysicalDevice 0x55705d19a000

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions