From 397a5a4ec225930eb3b2ab6ffdaee0bd5998a0e0 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sat, 27 Aug 2016 17:41:46 +0200 Subject: android: fix gralloc_drm_pipe building error with mesa 12.1 Fixes a building error introduced by commit 9daaa6f "gallium: add a pipe_context parameter to resource_get_handle" The new parameter was introduced for radeonsi future uses and can be optionally set to NULL for now --- gralloc_drm_pipe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gralloc_drm_pipe.c b/gralloc_drm_pipe.c index 05395ff..252f2be 100644 --- a/gralloc_drm_pipe.c +++ b/gralloc_drm_pipe.c @@ -162,7 +162,7 @@ static struct pipe_buffer *get_pipe_buffer_locked(struct pipe_manager *pm, buf->winsys.type = DRM_API_HANDLE_TYPE_SHARED; if (!pm->screen->resource_get_handle(pm->screen, - buf->resource, &buf->winsys, PIPE_HANDLE_USAGE_READ_WRITE)) + buf->resource, NULL, &buf->winsys, PIPE_HANDLE_USAGE_READ_WRITE)) goto fail; } @@ -173,7 +173,7 @@ static struct pipe_buffer *get_pipe_buffer_locked(struct pipe_manager *pm, memset(&tmp, 0, sizeof(tmp)); tmp.type = DRM_API_HANDLE_TYPE_KMS; if (!pm->screen->resource_get_handle(pm->screen, - buf->resource, &tmp, PIPE_HANDLE_USAGE_READ_WRITE)) + buf->resource, NULL, &tmp, PIPE_HANDLE_USAGE_READ_WRITE)) goto fail; buf->base.fb_handle = tmp.handle; -- cgit v1.1 From 2f394b35e903912ceb302842e2ed530a2991ccb9 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sat, 10 Sep 2016 00:35:58 +0200 Subject: remove PIPE_BIND_TRANSFER_READ/WRITE for compatibility with mesa 12.1 This changes are the necessary complement to corresponding mesa commit 5981ab5 "gallium: remove PIPE_BIND_TRANSFER_READ/WRITE" Fixes the following building errors: external/drm_gralloc/gralloc_drm_pipe.c:102:11: error: use of undeclared identifier 'PIPE_BIND_TRANSFER_READ' ... external/drm_gralloc/gralloc_drm_pipe.c:104:11: error: use of undeclared identifier 'PIPE_BIND_TRANSFER_WRITE' --- gralloc_drm_pipe.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/gralloc_drm_pipe.c b/gralloc_drm_pipe.c index 252f2be..f18ecef 100644 --- a/gralloc_drm_pipe.c +++ b/gralloc_drm_pipe.c @@ -98,11 +98,6 @@ static unsigned get_pipe_bind(int usage) { unsigned bind = PIPE_BIND_SHARED; - if (usage & GRALLOC_USAGE_SW_READ_MASK) - bind |= PIPE_BIND_TRANSFER_READ; - if (usage & GRALLOC_USAGE_SW_WRITE_MASK) - bind |= PIPE_BIND_TRANSFER_WRITE; - if (usage & GRALLOC_USAGE_HW_TEXTURE) bind |= PIPE_BIND_SAMPLER_VIEW; if (usage & GRALLOC_USAGE_HW_RENDER) -- cgit v1.1