cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

smistad
Adept I

Bug in C++ bindings

There is a bug in the OpenCL C++ bindings that is shipped with AMD APP at line 3068.

class Image3D : public Image

{

public:

    Image3D(

        const Context& context,

        cl_mem_flags flags,

        ImageFormat format,

        ::size_t width,

        ::size_t height,

        ::size_t depth,

        ::size_t row_pitch = 0,

        ::size_t slice_pitch = 0,

        void* host_ptr = NULL,

        cl_int* err = NULL)

    {

        cl_int error;

#if defined(CL_VERSION_1_2)

        cl_image_desc desc;

        desc.image_type = CL_MEM_OBJECT_IMAGE2D;

        desc.image_width = width;

        desc.image_height = height;

clearly line 19(3068 in original code) above should be CL_MEM_OBJECT_IMAGE3D and not CL_MEM_OBJECT_IMAGE2D.

Using a Image3D object with the code above results in an "invalid value" error when trying to use the image object.

Hope this will be fixed in future release.

0 Likes
2 Replies
himanshu_gautam
Grandmaster

This is a bug in cl.hpp which is actually maintained by Khronos. I will forward it to relevant people, but suggest you to report it on khronos forum too.

0 Likes
LeeHowes
Staff

The current cl.hpp in SVN has this fixed. It'll appear when we next get a release out.

0 Likes