[Beignet] [PATCH] runtime: fix one bug in BDW image.

He Junyan junyan.he at inbox.com
Tue Nov 11 23:16:16 PST 2014


It's good for me

On δΈ‰, 2014-11-12 at 14:12 +0800, Zhigang Gong wrote:
> As we still have the image 1d array workaround, we need to
> fix it for BDW as well.
> 
> Signed-off-by: Zhigang Gong <zhigang.gong at intel.com>
> ---
>  src/intel/intel_gpgpu.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/intel/intel_gpgpu.c b/src/intel/intel_gpgpu.c
> index c6ea17f..b6e19db 100644
> --- a/src/intel/intel_gpgpu.c
> +++ b/src/intel/intel_gpgpu.c
> @@ -1028,8 +1028,10 @@ intel_get_surface_type(cl_mem_object_type type)
>  static uint32_t get_surface_type(intel_gpgpu_t *gpgpu, int index, cl_mem_object_type type)
>  {
>    uint32_t surface_type;
> -  if (((IS_IVYBRIDGE(gpgpu->drv->device_id) || IS_HASWELL(gpgpu->drv->device_id))) &&
> -      index >= 128 + BTI_RESERVED_NUM &&
> +  if (((IS_IVYBRIDGE(gpgpu->drv->device_id) ||
> +        IS_HASWELL(gpgpu->drv->device_id) ||
> +        IS_BROADWELL(gpgpu->drv->device_id))) &&
> +      index >= BTI_MAX_IMAGE_NUM + BTI_RESERVED_NUM &&
>        type == CL_MEM_OBJECT_IMAGE1D_ARRAY)
>      surface_type = I965_SURFACE_2D;
>    else





More information about the Beignet mailing list