Closed dos1 closed 2 years ago
Looks like mesa 24 has gained support to read the modifier from gbm_gralloc natively, so I'm tentatively dropping this patch (which would otherwise require more work to be rebased) https://gitlab.freedesktop.org/mesa/mesa/-/blob/c7b2ac3377ae56df5e1990c2ed03360dac9519f6/src/util/u_gralloc/u_gralloc_libdrm.c#L55
Since gbm_gralloc still uses gralloc0, IMapper@4 isn't available there. Try to retrieve buffer info using the same perform op that CrOS uses - on gralloc_gbm versions that don't implement it it's still going to gracefully fallback into the previously used path.
This allows the modifier info to be preserved when importing buffers via EGL, fixing many troubles with multi-GPU and split display/render devices.
To be dropped once Waydroid migrates to Gralloc 4.
Requires https://github.com/waydroid/android_hardware_waydroid/pull/24 to actually make a difference.