check_sparse_queue_family: skip CONCURRENT contract on single-family GPUs (OLD-7268) #618
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!618
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/618/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@KarolKurzyna on GitHub · 2026-11-24 10:00 UTC · original
KarolKurzyna:fix/sparse-queue-family-single-family→main· +325 −3 · 2 files · 2 commits · merged 2026-11-24 16:39 UTCClaimed in the coordination issue as: OLD-7268 (#14)
Carried over from upstream
ItsNotRexed/LeonidaPR#7268(b75d669b0a, incorporating@wasonidas's review suggestions), where it received 5/5 independentPASSreviews (@claudetools-gh,@rideinstead,@garuspl,@airp1ane,@lines9686-rgb).What was wrong
GRAPHICS | COMPUTE | TRANSFER | SPARSE_BINDING),VulkanDeviceselects the same family for graphics, compute, and DMA, so only 1 distinct sparse-capable family exists andVK_SHARING_MODE_EXCLUSIVEis valid per the Vulkan specification. However,runtime/test/check_sparse_queue_family.pyunconditionally failed whenVK_SHARING_MODE_CONCURRENTwas absent fromvkCreateBuffer/vkCreateImagein theVK_LAYER_LUNARG_api_dumpoutput.runtime/src/queue_families.h(pick_queue_familiesfollowed bysparse_capable_queue_families) in exact selection order and strictly validatevkGetPhysicalDeviceQueueFamilyPropertiesagainstpQueueFamilyPropertyCount.What changed
runtime/src/queue_families.h(pick_queue_families->sparse_capable_queue_families) inruntime/test/check_sparse_queue_family.py: pick the first non-graphics async compute and fine-grained (1x1x1) DMA transfer families first, fall back to the graphics family if the chosen family lacksVK_QUEUE_SPARSE_BINDING_BIT, and requireVK_SHARING_MODE_CONCURRENTonly when>= 2distinct sparse-capable families are selected.vkGetPhysicalDeviceQueueFamilyPropertiesdumps againstpQueueFamilyPropertyCountand contiguous indices0..count-1so truncated or malformed dumps are never silently ignored.tests/test_check_sparse_queue_family.pycovering single-family GPUs, non-sparse compute/DMA ahead of sparse families, and incomplete/malformed property dumps (29/29pass).Tested
python -I -m unittest tests/test_check_sparse_queue_family.py -v: 29/29 PASS.621.24, 3 sparse-capable queue families, Windows 11):ctest -R d3d12_sparse_queue_familyPASS (verifiesVK_SHARING_MODE_CONCURRENTacross 3 families).101.6129, 1 sparse-capable queue family, Windows 11):ctest -R d3d12_sparse_queue_familyPASS (was failing before fix).AI-assisted.