1
0
Fork 0
forked from wry/wry

vulkan: don't try to export non-exportable images

This commit is contained in:
Julian Orth 2024-09-05 10:15:31 +02:00
parent 588fce4832
commit 591867ffbd
6 changed files with 68 additions and 61 deletions

View file

@ -280,7 +280,7 @@ impl VulkanRenderer {
.get(&format.drm)
.ok_or(VulkanError::FormatNotSupported)?;
let shm = vk_format.shm.as_ref().ok_or(VulkanError::ShmNotSupported)?;
if width > shm.max_extents.width || height > shm.max_extents.height {
if width > shm.limits.max_width || height > shm.limits.max_height {
return Err(VulkanError::ImageTooLarge);
}
let size = stride.checked_mul(height).ok_or(VulkanError::ShmOverflow)?;