vulkan - compute queuefamily - vkGetDeviceQueue - access violation

0

let me preface this with I've only tested this on my card (AMD r9 380).

vkGetPhysicalDeviceQueueFamilyProperties() finds 3 QueueFamilies. One containing all the normal bits (graphics, compute, transfer), one missing graphics, and one missing compute and graphics. I've taken it as the one missing Graphics is the Compute queue family, and the one missing compute and graphics is the Transfer queue family.

vkGetDeviceQueue(instance, computeFamily, 0, &pComputeQueue); instance being VkInstance, computeFamily being a uint32_t index value, 0 being the index of the queue requested, and pComputeQueue is a VkQueue. Attempting to run this function with this parameters generates Vulkan01.exe: 0xC0000005: Access violation writing location 0x0000000000000000.

vkGetDeviceQueue() returns just fine for Graphics, Presentation (which returns the same as graphics on my implementation, as expected), and transfer.

So the question is: Why would I get an error trying to return a handle to one of my listed Queue Families? Is it likely just my card? (some of the Sascha Williams examples won't run on my computer either, so I theorize that perhaps my card is just too old for some features?)

c++
access-violation
vulkan
asked on Stack Overflow Jan 1, 2019 by FrozenFirebat • edited Jan 1, 2019 by FrozenFirebat

1 Answer

1

Why would I get an error trying to return a handle to one of my listed Queue Families?

Because they're not "your" queue families. They're the device's queue families.

They only become "your" queue families if you ask for them at device creation time. Your VkDeviceCreateInfo structure must have a VkDeviceQueueCreateInfo that has a queueFamilyIndex referencing the compute queue family, requesting (at least) one queue from that family.

answered on Stack Overflow Jan 1, 2019 by Nicol Bolas

User contributions licensed under CC BY-SA 3.0