Khronos Public Bugzilla
Bug 502 - Unify clCreateImage2D and clCreateImage3D into clCreateImage
Summary: Unify clCreateImage2D and clCreateImage3D into clCreateImage
Status: NEW
Alias: None
Product: OpenCL
Classification: Unclassified
Component: Specification (show other bugs)
Version: 1.1
Hardware: All All
: P3 minor
Target Milestone: ---
Assignee: Aaftab Munshi
QA Contact: OpenCL Working Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-26 23:36 PDT by Sean Settle
Modified: 2013-05-30 20:16 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Settle 2011-07-26 23:36:22 PDT
Unify clCreateImage2D and clCreateImage3D: 
cl_mem clCreateImage2D (
    cl_context context,
    cl_mem_flags flags,
    const cl_image_format *image_format,
    size_t image_width,
    size_t image_height,
    size_t image_row_pitch,
    void *host_ptr,
    cl_int *errcode_ret );

cl_mem clCreateImage3D (
    cl_context context,
    cl_mem_flags flags,
    const cl_image_format *image_format,
    size_t image_width,
    size_t image_height,
    size_t image_depth,
    size_t image_row_pitch,
    size_t image_slice_pitch,
    void *host_ptr,
    cl_int *errcode_ret )

with clCreateImage (including my prior suggestion about adding an element_pitch):

cl_mem clCreateImage (
    cl_context context,
    cl_mem_flags flags,
    const cl_image_format *image_format,
    const size_t image_region[3],
    const size_t image_pitch[3],
    void *host_ptr,
    cl_int *errcode_ret )
Comment 1 Sean Settle 2011-07-27 00:19:17 PDT
Also consider making a similar change to clCreateBuffer:

cl_mem clCreateBuffer (
    cl_context context,
    cl_mem_flags flags,
    const size_t region[3],
    const size_t pitch[3],
    void *host_ptr,
    cl_int *errcode_ret )
Comment 2 Giuseppe Bilotta 2013-05-30 20:16:02 PDT
clCreateImage (with a different syntax than the one proposed) has been introduced in OpenCL 1.2. Should this issue be closed as resolved?