- 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:
parent
afa644fe47
commit
756c593e96
9 changed files with 126 additions and 90 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue