basic rendering for both opengl and vulkan
This commit is contained in:
parent
4b18afa040
commit
dadd2edaf1
29 changed files with 1140 additions and 38 deletions
|
|
@ -74,8 +74,8 @@ void vk_physical_device_select_family_indices(struct renderer_context *context)
|
|||
/*
|
||||
* This loop iterates over all the family properties
|
||||
* provided by the physical device and searches for
|
||||
* two unique queue family indices, one for presentation
|
||||
* and one for graphics.
|
||||
* queue family indices for presentation and graphics.
|
||||
* They may be the same queue family on many GPUs.
|
||||
*/
|
||||
for (u32 i = 0; i < property_count; i++) {
|
||||
if (context->queue_indices.graphics != 0xaa && context->queue_indices.present != 0xaa) break;
|
||||
|
|
@ -83,7 +83,6 @@ void vk_physical_device_select_family_indices(struct renderer_context *context)
|
|||
|
||||
if ((prop.queueFlags & VK_QUEUE_GRAPHICS_BIT) && context->queue_indices.graphics == 0xaa) {
|
||||
context->queue_indices.graphics = i;
|
||||
continue;
|
||||
}
|
||||
|
||||
VkBool32 present_support = VK_FALSE;
|
||||
|
|
@ -92,7 +91,9 @@ void vk_physical_device_select_family_indices(struct renderer_context *context)
|
|||
fatal("Can't check for surface support.\n");
|
||||
}
|
||||
|
||||
if (present_support == VK_TRUE) context->queue_indices.present = i;
|
||||
if (present_support == VK_TRUE && context->queue_indices.present == 0xaa) {
|
||||
context->queue_indices.present = i;
|
||||
}
|
||||
}
|
||||
|
||||
free(properties);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue