Inspired by Rob Herring suggestion and gbm_gralloc implementation
Add missing support for GRALLOC_USAGE_SW_READ_OFTEN,
GRALLOC_USAGE_SW_WRITE_OFTEN usage flags
mapping them to PIPE_BIND_LINEAR
Fixes the mouse cursor and message panes artifacts
happening with gralloc_drm_pipe, tested with amdgpudrmfb
No observed regression on swrast llvmpipe
{
unsigned bind = PIPE_BIND_SHARED;
+ if (usage & (GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN))
+ bind |= PIPE_BIND_LINEAR;
if (usage & GRALLOC_USAGE_HW_TEXTURE)
bind |= PIPE_BIND_SAMPLER_VIEW;
if (usage & GRALLOC_USAGE_HW_RENDER)