Towards swapchain
This commit is contained in:
parent
5379426ead
commit
da681747e7
1 changed files with 12 additions and 1 deletions
13
src/main.c
13
src/main.c
|
|
@ -267,10 +267,21 @@ QueueFamilyIndices findQueueFamilies(VkPhysicalDevice device,
|
||||||
return indices;
|
return indices;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ckeckDeviceExtensionSupport(VkPhysicalDevice device) {
|
||||||
|
uint32_t extensionCount;
|
||||||
|
vkEnumerateDeviceExtensionProperties(device, NULL, &extensionCount, NULL);
|
||||||
|
|
||||||
|
VkExtensionProperties availableExtentions[extensionCount];
|
||||||
|
vkEnumerateDeviceExtensionProperties(device, NULL, &extensionCount,
|
||||||
|
availableExtentions);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool isDeviceSuitable(VkPhysicalDevice device, VkSurfaceKHR *surface) {
|
bool isDeviceSuitable(VkPhysicalDevice device, VkSurfaceKHR *surface) {
|
||||||
QueueFamilyIndices indices = findQueueFamilies(device, surface);
|
QueueFamilyIndices indices = findQueueFamilies(device, surface);
|
||||||
|
|
||||||
return indices.graphicsFamilyExists && indices.graphicsFamilyExists;
|
return indices.graphicsFamilyExists && indices.presentFamilyExists;
|
||||||
}
|
}
|
||||||
|
|
||||||
void pickPhysicalDevice(Application *app) {
|
void pickPhysicalDevice(Application *app) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue