wl-shm: add support for more formats
This commit is contained in:
parent
09a56edd47
commit
0570669af2
20 changed files with 114 additions and 81 deletions
|
|
@ -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 =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue