1
0
Fork 0
forked from wry/wry

vulkan: make mixed device use a non-fatal error

This commit is contained in:
Julian Orth 2025-08-29 13:33:42 +02:00
parent e0d1ab8122
commit 5e9bc64757
3 changed files with 35 additions and 27 deletions

View file

@ -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!(),