[Beignet] [PATCH 1/3] refactor the api of intel_driver_share_buffer

Lu, Guanqun guanqun.lu at intel.com
Mon Sep 23 00:09:28 PDT 2013


I need to add an introduction mail to this series of patches.

This series is used to add the support of binding between libva and opencl. The application can create the corresponding buffer or image from a dri bo handle carried from libva side. And therefore, the application can utilize the power of opencl kernels.

thanks!

> -----Original Message-----
> From: beignet-bounces+guanqun.lu=intel.com at lists.freedesktop.org
> [mailto:beignet-bounces+guanqun.lu=intel.com at lists.freedesktop.org] On
> Behalf Of Lu Guanqun
> Sent: Monday, September 23, 2013 2:58 PM
> To: beignet at lists.freedesktop.org
> Subject: [Beignet] [PATCH 1/3] refactor the api of intel_driver_share_buffer
> 
> so that we can use this API in later patches for the integration of opencl and
> libva.
> 
> Signed-off-by: Lu Guanqun <guanqun.lu at intel.com>
> ---
>  src/intel/intel_driver.c |    6 +++---
>  src/intel/intel_driver.h |    2 +-
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/intel/intel_driver.c b/src/intel/intel_driver.c
> index 1072a3d..cc33914 100644
> --- a/src/intel/intel_driver.c
> +++ b/src/intel/intel_driver.c
> @@ -326,11 +326,11 @@ intel_driver_unlock_hardware(intel_driver_t
> *driver)
>  }
> 
>  LOCAL dri_bo*
> -intel_driver_share_buffer(intel_driver_t *driver, uint32_t name)
> +intel_driver_share_buffer(intel_driver_t *driver, const char *sname, uint32_t
> name)
>  {
>    assert(!driver->master);
>    dri_bo *bo = intel_bo_gem_create_from_name(driver->bufmgr,
> -                                             "rendering buffer",
> +                                             sname,
>                                               name);
>    return bo;
>  }
> @@ -523,7 +523,7 @@ intel_alloc_buffer_from_texture_egl(cl_context ctx,
> unsigned int target,
>    if (!ret)
>        goto out;
> 
> -  bo = (cl_buffer)intel_driver_share_buffer((intel_driver_t *)ctx->drv,
> region.name);
> +  bo = (cl_buffer)intel_driver_share_buffer((intel_driver_t *)ctx->drv,
> "rendering buffer", region.name);
> 
>    if (bo == NULL) {
>      eglReleaseResourceMESA(EGL_DISP(ctx), EGL_CTX(ctx),
> EGL_GL_TEXTURE_MESA, &attrib_list[0]);
> diff --git a/src/intel/intel_driver.h b/src/intel/intel_driver.h
> index 8042059..a01d881 100644
> --- a/src/intel/intel_driver.h
> +++ b/src/intel/intel_driver.h
> @@ -94,7 +94,7 @@ extern void intel_driver_lock_hardware(intel_driver_t*);
>  extern void intel_driver_unlock_hardware(intel_driver_t*);
> 
>  /* methods working in shared mode */
> -extern dri_bo* intel_driver_share_buffer(intel_driver_t*, uint32_t name);
> +extern dri_bo* intel_driver_share_buffer(intel_driver_t*, const char *sname,
> uint32_t name);
>  extern uint32_t intel_driver_shared_name(intel_driver_t*, dri_bo*);
> 
>  /* init driver shared with X using dri state, acquired from X Display */
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list