check usage flags against device's supported formats in gbm_bo_create

Previously, gbm_bo_create called gbm_device_is_format_supported with 0
hardcoded as the usage flags. This meant gbm_bo_create could attempt to
create buffer objects for unsupported combos of usage flags and pixel
formats. Using 0 as the usage flag basically meant ANY usage flag that
was supported by the device would work.

Of course that's not the reality, and the usage flag should be
considered along with the pixel format during buffer object creation,
which is what this CL does.

TEST=ui works
BUG=None

Change-Id: Icd3bd0f47dc33790e4476515f2024f9765bea0a2
Reviewed-on: https://chromium-review.googlesource.com/329306
Commit-Ready: Zach Reizner <zachr@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
1 file changed