output: fix renderer buffer cap sanity check in wlr_output_init_render

The backend and renderer don't directly interact together, so there's
no point in checking that their buffer caps intersect. What we want to
check is that:

- The backend and allocator buffer caps are compatible, because the
  backend consumes buffers to display them.
- The renderer and allocator buffer caps are compatible, because the
  renderer imports buffers to sample them or render to them.

For instance, when running with the DRM backend and the Pixman renderer,
the (backend & renderer) check will fail because backend = DMABUF and
renderer = DATA_PTR.
This commit is contained in:
Simon Ser 2021-11-19 15:24:07 +01:00
parent e736ebc63c
commit 33eba9080c

View file

@ -23,8 +23,8 @@ bool wlr_output_init_render(struct wlr_output *output,
wlr_log(WLR_ERROR, "output backend and allocator buffer capabilities "
"don't match");
return false;
} else if (!(backend_caps & renderer_caps)) {
wlr_log(WLR_ERROR, "output backend and renderer buffer capabilities "
} else if (!(renderer_caps & allocator->buffer_caps)) {
wlr_log(WLR_ERROR, "renderer and allocator buffer capabilities "
"don't match");
return false;
}