diff options
author | Simon Ser <contact@emersion.fr> | 2021-11-19 15:24:07 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-11-19 15:24:07 +0100 |
commit | 33eba9080c5fb54484bd6f39a9f38d48b31a2dd4 (patch) | |
tree | 0b079c8f0b4182bb81536213b5192251ea486f9f | |
parent | e736ebc63cfdf5fb1e8a0b082cf15086875d9a7d (diff) |
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.
-rw-r--r-- | types/output/render.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/types/output/render.c b/types/output/render.c index 2f6fe260..5bf5530e 100644 --- a/types/output/render.c +++ b/types/output/render.c @@ -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; } |