diff options
Diffstat (limited to 'src/gallium/state_trackers/va')
-rw-r--r-- | src/gallium/state_trackers/va/buffer.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/va/surface.c | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/va/buffer.c b/src/gallium/state_trackers/va/buffer.c index 42ec9730fc1..0691b7023b2 100644 --- a/src/gallium/state_trackers/va/buffer.c +++ b/src/gallium/state_trackers/va/buffer.c @@ -309,7 +309,7 @@ vlVaAcquireBufferHandle(VADriverContextP ctx, VABufferID buf_id, if (!screen->resource_get_handle(screen, drv->pipe, buf->derived_surface.resource, - &whandle, PIPE_HANDLE_USAGE_READ_WRITE)) { + &whandle, PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE)) { mtx_unlock(&drv->mutex); return VA_STATUS_ERROR_INVALID_BUFFER; } diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium/state_trackers/va/surface.c index cc26efe1c1a..5376be28531 100644 --- a/src/gallium/state_trackers/va/surface.c +++ b/src/gallium/state_trackers/va/surface.c @@ -583,7 +583,7 @@ surface_from_external_memory(VADriverContextP ctx, vlVaSurface *surface, whandle.stride = memory_attribute->pitches[i]; whandle.offset = memory_attribute->offsets[i]; resources[i] = pscreen->resource_from_handle(pscreen, &res_templ, &whandle, - PIPE_HANDLE_USAGE_READ_WRITE); + PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE); if (!resources[i]) { result = VA_STATUS_ERROR_ALLOCATION_FAILED; goto fail; @@ -1000,10 +1000,8 @@ vlVaExportSurfaceHandle(VADriverContextP ctx, surfaces = surf->buffer->get_surfaces(surf->buffer); usage = 0; - if (flags & VA_EXPORT_SURFACE_READ_ONLY) - usage |= PIPE_HANDLE_USAGE_READ; if (flags & VA_EXPORT_SURFACE_WRITE_ONLY) - usage |= PIPE_HANDLE_USAGE_WRITE; + usage |= PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE; desc->fourcc = PipeFormatToVaFourcc(surf->buffer->buffer_format); desc->width = surf->buffer->width; |