- create a new error class for vulkan errors as they are only recoverable during initialization (unlike CRecoverableError which is recoverable during normal processing)

- improve vulkan errors by including the status code returned by vulkan if they fail
This commit is contained in:
Magnus Norddahl 2019-05-23 14:09:05 +02:00
commit 756c593e96
9 changed files with 126 additions and 90 deletions

View file

@ -177,7 +177,11 @@ std::unique_ptr<VulkanShader> ShaderBuilder::create(const char *shadername, Vulk
VkShaderModule shaderModule;
VkResult result = vkCreateShaderModule(device->device, &createInfo, nullptr, &shaderModule);
if (result != VK_SUCCESS)
I_FatalError("Could not create vulkan shader module for '%s'", shadername);
{
FString msg;
msg.Format("Could not create vulkan shader module for '%s': %s", shadername, VkResultToString(result).GetChars());
VulkanError(msg.GetChars());
}
return std::make_unique<VulkanShader>(device, shaderModule);
}