Reformat
This commit is contained in:
@@ -313,9 +313,7 @@ VkPhysicalDeviceType _toVkPhysicalDeviceType(PrRhiPhysicalDeviceType type) {
|
||||
// ============================================================================
|
||||
|
||||
PrRhiInstance *prRhiCreateInstanceVk(PrRhiInstanceDesc desc, WpAllocator *allocator) {
|
||||
(void)desc;
|
||||
|
||||
volkInitialize();
|
||||
_checkVk(volkInitialize(), "volkInitialize");
|
||||
|
||||
VkBool32 supported = VK_FALSE;
|
||||
_checkVk(vpGetInstanceProfileSupport(NULL, &_profile, &supported), "vpGetInstanceProfileSupport");
|
||||
@@ -323,8 +321,9 @@ PrRhiInstance *prRhiCreateInstanceVk(PrRhiInstanceDesc desc, WpAllocator *alloca
|
||||
|
||||
u32 sdl_ext_count = 0;
|
||||
const char *const *sdl_exts = SDL_Vulkan_GetInstanceExtensions(&sdl_ext_count);
|
||||
if (!sdl_exts || sdl_ext_count == 0)
|
||||
if (!sdl_exts || sdl_ext_count == 0) {
|
||||
_abort("SDL_Vulkan_GetInstanceExtensions failed");
|
||||
}
|
||||
|
||||
VkApplicationInfo app_info = {};
|
||||
app_info.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
|
||||
@@ -349,7 +348,7 @@ PrRhiInstance *prRhiCreateInstanceVk(PrRhiInstanceDesc desc, WpAllocator *alloca
|
||||
volkLoadInstance(vk_instance);
|
||||
|
||||
PrRhiInstance *inst = wpMemAllocatorAlloc(allocator, sizeof(PrRhiInstance));
|
||||
if (!inst) _abort("alloc failed for PrRhiInstance");
|
||||
if (!inst) { _abort("alloc failed for PrRhiInstance"); }
|
||||
inst->handle = vk_instance;
|
||||
inst->debug_messenger = NULL;
|
||||
|
||||
@@ -357,7 +356,7 @@ PrRhiInstance *prRhiCreateInstanceVk(PrRhiInstanceDesc desc, WpAllocator *alloca
|
||||
}
|
||||
|
||||
void prRhiDestroyInstanceVk(PrRhiInstance *inst, WpAllocator *allocator) {
|
||||
if (!inst) return;
|
||||
if (!inst) { return; }
|
||||
vkDestroyInstance((VkInstance)inst->handle, NULL);
|
||||
wpMemAllocatorFree(allocator, (void**)&inst, sizeof(PrRhiInstance));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user