cl_gpgpu_bind_image(queue->gpgpu, k->images[i].idx, k->args[id].mem->bo,
k->args[id].mem->intel_fmt, k->args[id].mem->type,
k->args[id].mem->w, k->args[id].mem->h,
- k->args[id].mem->pitch, k->args[id].mem->tiling);
+ k->args[id].mem->row_pitch, k->args[id].mem->tiling);
}
return CL_SUCCESS;
}
mem->w = w;
mem->h = h;
+ mem->depth = depth;
mem->fmt = *fmt;
mem->intel_fmt = intel_fmt;
mem->bpp = bpp;
mem->is_image = 1;
- mem->pitch = aligned_pitch;
+ mem->row_pitch = aligned_pitch;
+ mem->slice_pitch = image_type == CL_MEM_OBJECT_IMAGE1D || image_type == CL_MEM_OBJECT_IMAGE2D ? 0 : aligned_pitch*aligned_h;
mem->tiling = tiling;
mem->type = image_type;
uint32_t is_image; /* Indicate if this is an image or not */
cl_image_format fmt; /* only for images */
cl_mem_object_type type; /* only for images 1D/2D...*/
- size_t w,h,depth,pitch; /* only for images (depth is only for 3d images) */
+ size_t w,h,depth; /* only for images (depth is only for 3D images) */
+ size_t row_pitch,slice_pitch;
uint32_t intel_fmt; /* format to provide in the surface state */
uint32_t bpp; /* number of bytes per pixel */
cl_image_tiling_t tiling; /* only IVB+ supports TILE_[X,Y] (image only) */
mem->type = get_mem_type_from_target(texture_target);
mem->w = w;
mem->h = h;
+ mem->depth = 1;
mem->fmt = cl_format;
mem->intel_fmt = intel_fmt;
mem->bpp = bpp;
mem->is_image = 1;
- mem->pitch = pitch;
+ mem->row_pitch = pitch;
+ mem->slice_pitch = 0;
mem->tiling = tiling;
mem->ref_n = 1;
mem->magic = CL_MAGIC_MEM_HEADER;