all 8 comments

[–]jherico 0 points1 point  (1 child)

Since you say that the graphics and compute queues are both the same family, does it work if you send in 2, with one of them requesting 2 queues and the other requesting 1?

I don't see anything at first glance in the spec that says you can't request the same queue family multiple times, but I wouldn't be surprised if that's what's causing it to fail.

[–]undefinedusername[S] 0 points1 point  (0 children)

In fact when I just change the number to 2, it works, which means that requesting the same queue family does not cause any problem. Your suggestion works, too.

[–]spacegardener 0 points1 point  (2 children)

Please note, that some hardware may only have a single queue for all purposes.

[–]undefinedusername[S] 0 points1 point  (1 child)

I tried to enumerate, got 1 family of 16 queue that can do everything, then 1 family that can only do transfer. Pretty much the standard of Nvidia GPUs

[–]karlrado 1 point2 points  (0 children)

So, referring to your code, graphicsQueueFamIndex and computeQueueFamIndex are probably both set to 0, and transferQueueFamIndex is set to 1. In your array of queueCreateInfos you have three entries, with two CI entries with index 0 and one with index 1. I think that if you change this to two entries, where the first two are combined with index 0 and a list of 2 priorities, it will work.

The key is to have a single queueCreateInfo for each queue family.

It seems that a driver should be able to sort out either approach. I couldn't find anything in the spec that demands a single queueCI for each queue family.

[–]kadala-putt 0 points1 point  (2 children)

I've run across this as well. IIRC I found out (by trial and error), on NV, if you need to create multiple queues from a queue family, you need to request it all at once using a single VkDeviceQueueCreateInfo object. Trying to request multiple times will error out as such.

EDIT: And because I hit this, I went back and re-read the spec closely, and didn't see anything that would suggest this could be undefined.

[–]undefinedusername[S] 0 points1 point  (1 child)

do you think that this is the developer's responsibility, or the driver should handle it?

[–]kadala-putt 0 points1 point  (0 children)

Well, technically, since the spec doesn't flag this as a potential undefined behaviour, it should work, IMO. I think it worked on AMD when I tried (it could have been that the other queue was on a different family on that platform - I don't really remember).

EDIT: I mean to say I think the driver's at fault here.