Hello i'm having trouble knowing what to do in this case. It seems the int
literal in the vulkan binding code does not work with an if statement since it
is an int literal.
so the offending code.
proc create_device(self:Render) =
for index in 0 .. 0:
for i in 0 .. queue_prop[index].queueCount:
if queue_prop[index].queueFlags and vkQueueGraphicsBit == 1: #
vkQueueGraphicsBit
echo "index found on: ", queue_index
break
queue_index.inc
err_check(vkCreateDevice(gpu_list[0],addr device_create_info, nil, addr
device))
the line here... wont evaluate to a bool
if queue_prop[index].queueFlags and vkQueueGraphicsBit == 1: #
vkQueueGraphicsBit
queueFlags is of queue_prop, and is the type "VkQueueFlags". as is the int
literal "vkQueueGraphicsBit", which is 0x00000001 int literal in the binding.
So i'm thinking that i need to do operator overloading but, i must admit i
don't know how in this case. Any ideas appreciated. and i will keep searching
the documentation.
edit:
trying this but it always resolves true and i don't believe it should.
if (queue_prop[index].queueFlags and vkQueueGraphicsBit).bool == 1.bool: