diff --git a/src/freeze.rs b/src/freeze.rs index 68a2051..02e6c73 100644 --- a/src/freeze.rs +++ b/src/freeze.rs @@ -538,23 +538,16 @@ fn alloc_dmabuf_capture( } }; - // RENDERING | SCANOUT: we need a buffer the compositor can both write into - // (screencopy) and display (layer surface attachment). LINEAR is intentionally - // omitted - drivers may not support it for a given format, causing EINVAL. - // Instead we read the actual modifier back from the allocated BO and forward - // it to zwp_linux_buffer_params_v1 so the compositor interprets the tiling - // correctly. + // RENDERING | LINEAR: LINEAR forces DRM_FORMAT_MOD_LINEAR (0) so that any + // compositor accepting zwp_linux_buffer_params_v1 will import the buffer. let bo = match gbm.create_buffer_object::<()>( offer.width, offer.height, fmt, - BufferObjectFlags::RENDERING | BufferObjectFlags::SCANOUT, + BufferObjectFlags::RENDERING | BufferObjectFlags::LINEAR, ) { Ok(b) => b, - Err(e) => { - eprintln!("blast: freeze: dmabuf: GBM alloc: {e}"); - return false; - } + Err(_) => return false, }; let stride = bo.stride(); @@ -569,7 +562,6 @@ fn alloc_dmabuf_capture( return false; } }; - let params = linux_dmabuf.create_params(qh, ()); params.add(dma_fd.as_fd(), 0, 0, stride, modifier_hi, modifier_lo); // dma_fd drops here; the compositor has already dup'd it inside add().