I am learning vulkan and have come accross an error "Unhandled exception at 0x00007FF98C0D16B5 (vulkan-1.dll) in ProjectV.exe: 0xC0000005: Access violation reading location 0x0000000000000000. occured"in an unusual step. Usually at this step I am not supposesd to encounter any problems.In the second line of the code snippet Ive counted the number of QueueFamilies using the countIndex variable.I used this function before in a different method while creating Logical Device but have not received any error then but now I do so.I am receiving the title error at line 3 of the snippet, at the cout line.
Although I am not supposed to get error at such simple step.I even tried static_cast while printing because I thought the data type created a problem, but that too did not work.
uint32_t countIndex=0, queue_fam_index=0; VkBool32 check = VK_FALSE;
vkGetPhysicalDeviceQueueFamilyProperties(dev, &countIndex,nullptr);
std::cout << static_cast<int>(countIndex) << "\n";
std::vector<VkQueueFamilyProperties> que_fam(countIndex);
vkGetPhysicalDeviceQueueFamilyProperties(
dev,&countIndex,que_fam.data());
User contributions licensed under CC BY-SA 3.0