panfrost: Take into account flags when looking up in the BO cache
authorTomeu Vizoso <tomeu.vizoso@collabora.com>
Thu, 8 Aug 2019 05:10:32 +0000 (07:10 +0200)
committerTomeu Vizoso <tomeu.vizoso@collabora.com>
Thu, 8 Aug 2019 05:42:52 +0000 (07:42 +0200)
commit9398932c2d4cd1dfd337337a82ca8dc9bae35487
tree41cf06254936bb24dbe55079af33b6e1aea208eb
parent950b5fc5961f81e466090b5166336510ff416740
panfrost: Take into account flags when looking up in the BO cache

This will be useful right now so we avoid retrieving a non-executable
buffer when a executable one is needed.

As we support more flags, this logic will need to be extended to
consider the different trade-offs to be made when matching BO
specifications to BOs in the cache.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_allocate.h
src/gallium/drivers/panfrost/pan_bo_cache.c
src/gallium/drivers/panfrost/pan_drm.c