1
0
Fork 0
forked from wry/wry

wl-shm: add support for more formats

This commit is contained in:
Julian Orth 2025-10-01 20:31:00 +02:00
parent 09a56edd47
commit 0570669af2
20 changed files with 114 additions and 81 deletions

View file

@ -457,10 +457,7 @@ impl Allocator for VulkanBoAllocator {
impl VulkanBo {
fn map(self: &Rc<Self>, write: bool) -> Result<VulkanBoMapping, VulkanError> {
let format = self.buf.format;
let Some(shm_info) = &format.shm_info else {
return Err(VulkanError::ShmNotSupported);
};
let stride = self.buf.width as u32 * shm_info.bpp;
let stride = self.buf.width as u32 * format.bpp;
let size = self.buf.height as u32 * stride;
let data = &self.allocator;
let staging =