ogl_beamforming

Ultrasound Beamforming Implemented with OpenGL
git clone anongit@rnpnr.xyz:ogl_beamforming.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

Commit: 41bb2e1365cd15b605e9298f2d8ba7774a4097d1
Parent: 08c7d10e22f145d9e88933fb7ed79d72520e28c9
Author: Randy Palamar
Date:   Tue,  6 Jan 2026 16:12:02 -0700

vulkan: fix exclusive transfer queue search

Really what we want is a queue family that supports transfer and
doesn't support compute/graphics. It may have other bits set, such
as sparse binding, but we don't care about those. This should fix
detection on nvidia GPUs (based on info from vulkan.gpuinfo.org).

Diffstat:
Mvulkan.c | 16++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/vulkan.c b/vulkan.c @@ -349,12 +349,16 @@ vk_load_queues(Arena *memory, Stream *err) // NOTE(rnp): start by assigning queue families for each queue /* NOTE(rnp): try for exclusive transfer queue */ - for (u32 index = 0; index < queue_family_count; index++) { - if ((queues[index].queueFlags & VK_QUEUE_TRANSFER_BIT) != 0 && - (queues[index].queueFlags & ~VK_QUEUE_TRANSFER_BIT) == 0) - { - queue_indices[VulkanQueueKind_Transfer] = (i32)index; - break; + { + u32 mask = VK_QUEUE_GRAPHICS_BIT|VK_QUEUE_COMPUTE_BIT|VK_QUEUE_TRANSFER_BIT; + u32 max_timestamp_bits = 0; + for (u32 index = 0; index < queue_family_count; index++) { + if ((queues[index].queueFlags & mask) == VK_QUEUE_TRANSFER_BIT) { + if (queues[index].timestampValidBits > max_timestamp_bits) { + max_timestamp_bits = queues[index].timestampValidBits; + queue_indices[VulkanQueueKind_Transfer] = (i32)index; + } + } } }