Skip to content

Commit

Permalink
actually fail vkCreateDevice properly
Browse files Browse the repository at this point in the history
  • Loading branch information
DadSchoorse committed Jul 19, 2021
1 parent b2ad0b6 commit d416bcb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/basalt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ namespace vkBasalt

VkResult ret = createFunc(physicalDevice, &modifiedCreateInfo, pAllocator, pDevice);

if (ret != VK_SUCCESS)
return ret;

std::shared_ptr<LogicalDevice> pLogicalDevice(new LogicalDevice());
pLogicalDevice->vki = instanceDispatchMap[GetKey(physicalDevice)];
pLogicalDevice->device = *pDevice;
Expand Down Expand Up @@ -268,7 +271,7 @@ namespace vkBasalt

deviceMap[GetKey(*pDevice)] = pLogicalDevice;

return ret;
return VK_SUCCESS;
}

VK_LAYER_EXPORT void VKAPI_CALL vkBasalt_DestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator)
Expand Down

0 comments on commit d416bcb

Please sign in to comment.