1
0
Fork 0
forked from wry/wry

vulkan: log information about mixed device use

This commit is contained in:
Julian Orth 2026-02-10 18:30:39 +01:00
parent 89c9b8d2e0
commit 3ef408b5b4
3 changed files with 16 additions and 1 deletions

View file

@ -2117,6 +2117,18 @@ impl Debug for VulkanRenderer {
impl VulkanImage {
fn assert_device(&self, device: &Device) -> Result<(), VulkanError> {
if self.renderer.device.device.handle() != device.handle() {
match &self.ty {
VulkanImageMemory::DmaBuf(v) => {
log::warn!("Mixed device use with dmabuf {}", v.template.dmabuf.id);
}
VulkanImageMemory::Internal(_v) => {
log::warn!("Mixed device use with internal image");
}
VulkanImageMemory::Blend(_v) => {
log::warn!("Mixed device use with blend buffer");
}
}
log::info!("Image address {:?}", ptr::from_ref(self));
return Err(VulkanError::MixedVulkanDeviceUse);
}
Ok(())