gbm: add gbm_{bo,surface}_create_with_modifiers2
gbm_{bo,surface}_create_with_modifiers is missing the usage flags. Add a new function which lets library users specify it. Daniel Stone said:
We decided to remove [usage flags] since we decided that modifiers were a good enough proxy for usage; no need to pass SCANOUT or TEXTURE anymore, because we already get the scanout modifiers from KMS and the texture modifiers from EGL.
In hindsight, I think this was a mistake since it only handles buffer layout, and not buffer placement or cache configuration.
Update DRIimageExtension with a new createImageWithModifiers2 function, which is like createImageWithModifiers but with the usage flags added.
Signed-off-by: Simon Ser contact@emersion.fr
- Original thread: https://lists.freedesktop.org/archives/mesa-dev/2019-June/220648.html
- Compositor using
gbm_bo_create_with_modifiers2
: https://github.com/emersion/glider/compare/modifiers2
cc @daniels