1
0
Fork 0
forked from wry/wry

drm: add unique identifiers to dmabufs

This commit is contained in:
Julian Orth 2024-02-18 15:28:07 +01:00
parent 3635ae0104
commit fed2ceb8b5
17 changed files with 72 additions and 25 deletions

View file

@ -393,9 +393,14 @@ impl XBackend {
panic!("Neither linear nor invalid modifier is supported");
};
for image in &mut images {
let bo = self
.gbm
.create_bo(width, height, XRGB8888, modifier, usage)?;
let bo = self.gbm.create_bo(
&self.state.dma_buf_ids,
width,
height,
XRGB8888,
modifier,
usage,
)?;
let dma = bo.dmabuf();
assert!(dma.planes.len() == 1);
let plane = dma.planes.first().unwrap();