vulkan: make mixed device use a non-fatal error
This commit is contained in:
parent
e0d1ab8122
commit
5e9bc64757
3 changed files with 35 additions and 27 deletions
|
|
@ -210,6 +210,10 @@ pub enum VulkanError {
|
|||
BusyInTransfer,
|
||||
#[error("Driver does not support descriptor buffers")]
|
||||
NoDescriptorBuffer,
|
||||
#[error("A non-vulkan buffer was passed into the vulkan renderer")]
|
||||
NonVulkanBuffer,
|
||||
#[error("Mixed vulkan device use")]
|
||||
MixedVulkanDeviceUse,
|
||||
}
|
||||
|
||||
impl From<VulkanError> for GfxError {
|
||||
|
|
@ -284,7 +288,7 @@ impl GfxContext for Context {
|
|||
damage: Option<&[Rect]>,
|
||||
) -> Result<Rc<dyn ShmGfxTexture>, GfxError> {
|
||||
if let Some(old) = old {
|
||||
let old = (old as Rc<dyn GfxTexture>).into_vk(&self.0.device.device);
|
||||
let old = (old as Rc<dyn GfxTexture>).into_vk(&self.0.device.device)?;
|
||||
let shm = match &old.ty {
|
||||
VulkanImageMemory::DmaBuf(_) => unreachable!(),
|
||||
VulkanImageMemory::Blend(_) => unreachable!(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue