Merge pull request #554 from tomaka/nv-invalid-shader

Use a different panic message for VK_ERROR_INVALID_SHADER_NV
This commit is contained in:
tomaka 2017-06-26 10:33:37 +02:00 committed by GitHub
commit 202abee830
2 changed files with 2 additions and 0 deletions

View File

@ -101,6 +101,7 @@ pub const SUBOPTIMAL_KHR: u32 = 1000001003;
pub const ERROR_OUT_OF_DATE_KHR: u32 = -1000001004i32 as u32;
pub const ERROR_INCOMPATIBLE_DISPLAY_KHR: u32 = -1000003001i32 as u32;
pub const ERROR_VALIDATION_FAILED_EXT: u32 = -1000011001i32 as u32;
pub const ERROR_INVALID_SHADER_NV: u32 = -1000012000i32 as u32;
pub const ERROR_OUT_OF_POOL_MEMORY_KHR: u32 = -1000069000i32 as u32;
pub type StructureType = u32;

View File

@ -226,6 +226,7 @@ fn check_errors(result: vk::Result) -> Result<Success, Error> {
vk::ERROR_INCOMPATIBLE_DISPLAY_KHR => Err(Error::IncompatibleDisplay),
vk::ERROR_VALIDATION_FAILED_EXT => Err(Error::ValidationFailed),
vk::ERROR_OUT_OF_POOL_MEMORY_KHR => Err(Error::OutOfPoolMemory),
vk::ERROR_INVALID_SHADER_NV => panic!("Vulkan function returned VK_ERROR_INVALID_SHADER_NV"),
c => unreachable!("Unexpected error code returned by Vulkan: {}", c)
}
}