}
}
- *instance_out = instance->handle;
+ VkInstance handle = instance->handle;
PFN_vkCreateInstance create_instance =
reinterpret_cast<PFN_vkCreateInstance>(
next_get_proc_addr(instance->handle, "vkCreateInstance"));
- result = create_instance(create_info, allocator, instance_out);
+ result = create_instance(create_info, allocator, &handle);
if (enable_callback)
FreeAllocatedCreateInfo(local_create_info, instance->alloc);
- if (result <= 0) {
+ if (result < 0) {
// For every layer, including the loader top and bottom layers:
// - If a call to the next CreateInstance fails, the layer must clean
// up anything it has successfully done so far, and propagate the
allocator, &instance->message);
}
+ *instance_out = instance->handle;
return result;
}