commit | 20f14755d4b4a5eddd05fb17fc61de53272cd45e | [log] [tgz] |
---|---|---|
author | Robert Mader <robert.mader@collabora.com> | Fri Mar 31 11:04:44 2023 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Mar 31 11:04:44 2023 |
tree | 0805a46178d68a4cb4c54365d2e63795995a2f0f | |
parent | 03ca07a460b8a4c590d422f49b4932a5f4bc810b [diff] |
ui: gbm_wrapper: Ensure to create BOs with import-compatible modifier This reverts I88be5cdc3b003e76f5331e910c17e2b85b34cfdb, which added a fallback path to the import side, and instead tries to ensure we create a valid buffer in the first place. There are two issues in this code path: 1. `gbm_bo_create_with_modifiers()` does not take the `flags` argument into account. This can be solved by using `gbm_bo_create_with_modifiers2()`, which again would require various updates to the build system - the GBM version in Debian Bullseye did not have that symbol. Fortunately this is not an issue when we use the `GBM_BO_USE_SCANOUT` flag, which gets implicitely added by `gbm_bo_create_with_modifiers()` - the only use-case atm., see `GetSupportedGbmFlags()`. So this will only become a real issue once we want to pass other flags. 2. The more pressing issue is that Mesas GBM implementation of `gbm_bo_create_with_modifiers()` - which as mention above internally calls `gbm_bo_create_with_modifiers2()` with `GBM_BO_USE_SCANOUT` - ends up ignoring the flag and may create BOs with a modifier which does not support `GBM_BO_USE_SCANOUT`. This would fail later in `gbm_bo_import()`. See Mesa issue link below for more context. While both issues will get fixed eventually, we'll need a workaround to deal with the situation on current/older Mesa as well as the current GBM dependency. Do so by checking that `gbm_bo_import()` succeeds directly at creation time. This ensures we either succeed or fail as early as possible,making debugging much easier in the later case. Non-working format/flags/modifier combinations are remembered once they fail and the modifier in question will get filtered out in advance in following requests. Mesa issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8729 Bug: chromium:1394150 Change-Id: I6e6c6f36e32e7de46cc39c6c2b9cc81f3b95d432 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4380766 Reviewed-by: Maksim Sisov <msisov@igalia.com> Commit-Queue: Maksim Sisov <msisov@igalia.com> Cr-Commit-Position: refs/heads/main@{#1124657}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.