Skip to content

Instantly share code, notes, and snippets.

uint32_t graphicsQueueFamIndex = UINT_MAX;
uint32_t transferQueueFamIndex = UINT_MAX;
uint32_t computeQueueFamIndex = UINT_MAX;
// TODO: are there other ways to pick queue family?
for (uint32_t i = 0; i < queueFamCount; i++)
{
if (graphicsQueueFamIndex == UINT_MAX && supportsPresent[i] == VK_TRUE && queueFamProps[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) {
graphicsQueueFamIndex = i;
}
#[test]
fn test_net()
{
let server_port = 12321;
let mut serverSock = UdpSocket::bind(("127.0.0.1", server_port)).unwrap();
let mut clientSock = UdpSocket::bind(("0.0.0.0:0")).unwrap();
clientSock.send_to("Hello World\r\n".as_bytes(), (Ipv4Addr::new(127, 0, 0, 1), server_port));
println!("lol");