still having problems, it seems that the table loses its info on length and
value when i return it?
for instance
proc sort_queue_properties(index:int): TableRef[uint32,string] =
var queue_table =
newTable[uint32,string](queue_properties[index].queueCount.int)
for i in 0 .. <queue_properties[index].queueCount:
echo queue_table.len
if (queue_properties[index].queueFlags and vkQueueGraphicsBit) == 1:
queue_table.add(i,"vkQueueGraphicsBit")
if (queue_properties[index].queueFlags and vkQueueComputeBit) == 1:
queue_table.add(i,"vkQueueComputeBit")
if (queue_properties[index].queueFlags and vkQueueTransferBit) == 1:
queue_table.add(i,"vkQueueTransferBit")
if (queue_properties[index].queueFlags and vkQueueSparseBindingBit) ==
1:
queue_table.add(i,"vkQueueSparseBindingBit")
return queue_table
proc get_queue_properties*() =
vkGetPhysicalDeviceQueueFamilyProperties(physical_device,addr
queue_count,nil)
queue_properties.setLen(queue_count);
vkGetPhysicalDeviceQueueFamilyProperties(physical_device,addr
queue_count,addr queue_properties[0])
for t in 0 .. <queue_properties.len:
let table = sort_queue_properties(t)
echo table.len
on this code the return of sort_queue_properties(t) returns a 0 value when i
echo it, but the echo on queue_table length print out 0 to 15 like it should.