2013-01-31  Sharath Kamath  <kamath.sharath@gmail.com>

        WebCLCommandQueue check pointers to avoid bad memory access.
        Issue #98

        Reviewed by NOBODY (OOPS!).

        Error can be thrown by WebCL or a null passed to OpenCL.
        If OpenCL needs a non-null value it will throw a exception which will
        be handled by WebCL.

        No new tests (OOPS!).

        * Modules/webcl/WebCLCommandQueue.cpp:
        (WebCore::WebCLCommandQueue::enqueueWriteBuffer):
        (WebCore::WebCLCommandQueue::enqueueWriteBufferRect):
        (WebCore::WebCLCommandQueue::enqueueReadImage):
        (WebCore::WebCLCommandQueue::enqueueReadBuffer):
        (WebCore::WebCLCommandQueue::enqueueReadBufferRect):
        (WebCore::WebCLCommandQueue::enqueueNDRangeKernel):
        (WebCore::WebCLCommandQueue::enqueueWriteImage):
        (WebCore::WebCLCommandQueue::enqueueCopyImage):
        (WebCore::WebCLCommandQueue::enqueueCopyImageToBuffer):
        (WebCore::WebCLCommandQueue::enqueueCopyBufferToImage):
        (WebCore::WebCLCommandQueue::enqueueCopyBufferRect):
        * Modules/webcl/WebCLContext.cpp:
        (WebCore::WebCLContext::createImageWithDescriptor):
2013-02-01  Sharath Kamath  <kamath.sharath@gmail.com>

        WebCLEvent interface cleanup.
        Issue #103

        Reviewed by NOBODY (OOPS!).

        Fix webkit style issues and cleanup WebCLEvent interface files.

        No new tests (OOPS!).

        * Modules/webcl/WebCLContext.cpp:
        (WebCore::WebCLContext::createUserEvent):uncomment the code since it will work after WebCLEvent cleanup.
        * Modules/webcl/WebCLEvent.cpp:
        (WebCore::WebCLEvent::~WebCLEvent):
        (WebCore::WebCLEvent::create):
        (WebCore::WebCLEvent::WebCLEvent):
        (WebCore::WebCLEvent::getInfo):
        (WebCore::WebCLEvent::getProfilingInfo):
        (WebCore::WebCLEvent::setUserEventStatus):
        (WebCore):
        (WebCore::WebCLEvent::setCallback):
        (WebCore::WebCLEvent::getCLEvent):
        * Modules/webcl/WebCLEvent.h:
        (WebCLEvent):
        * Modules/webcl/WebCLEvent.idl:
        * bindings/js/JSWebCLEventCustom.cpp:
        (WebCore::createFinishCallback):
        (WebCore::JSWebCLEvent::getInfo):
        (WebCore::JSWebCLEvent::getProfilingInfo):
        (WebCore::JSWebCLEvent::setCallback):
        * platform/ComputeTypes.h:
2013-02-01  Sharath Kamath  <kamath.sharath@gmail.com>

        ComputeContextCL::computeMemoryTypeToCL doesnt handle HOST_PTR flags.
        Issue #104

        Reviewed by none.

        Need to add support to CL_MEM_USE_HOST_PTR, CL_MEM_ALLOC_HOST_PTR, CL_MEM_COPY_HOST_PTR flags.
        Gives a INVALID_HOST_POINTER with createImage API when a Image element is passes as i/p.

        No new tests.

        * platform/ComputeContext.h:
        * platform/opencl/ComputeContextCL.cpp:
        (WebCore::computeMemoryTypeToCL):
        (WebCore):
2013-02-01  Sharath Kamath  <kamath.sharath@gmail.com>

        createSubBuffer() API crashes the safari browser.
        Issue #105

        Reviewed by NOBODY (OOPS!).

        On running the conformance test case to getInfo on MEM_ASSOCIATED_MEMOBJECT flag , the browser crashes.
        The stack reports crash in ~WebCLMemoryObject.
        Need to investigate the way the desctructor is called for a sub buffer as a subbuffer
        is also WebCLMemoryObject. And it depends on the cl_mem of the WebCLMemoryObject on using which it was created.

        The subbuffer will have a reference count heigher than 1. Thus can check it before calling clRelease.

        No new tests.

        * Modules/webcl/WebCLMemoryObject.cpp:
        (WebCore::WebCLMemoryObject::~WebCLMemoryObject):
2013-02-04  Sharath Kamath  <kamath.sharath@gmail.com>

        WebCLImage::getInfo needs to get the right informantion from OpenCL and return a valid object.
        Issue #106

        Reviewed by NOBODY (OOPS!).

        Current implementation returns CL_IMAGE_FORMAT as channelOrder and CL_IMAGE_ELEMENT_SIZE as channelType.
        According to OpenCL specification CL_IMAGE_FORMAT will return a structure cl_image_format , consisting both channelOrder and channelType.
        Implimenting it to take this value and populate width, height and row_pitch into WebCLIImageDescriptor object.

        No new tests (OOPS!).

        * Modules/webcl/WebCLImage.cpp:
        (WebCore::WebCLImage::getInfo):
2013-02-04  Sharath Kamath  <kamath.sharath@gmail.com>

        Remove PROGRAM_BINARY_SIZES & PROGRAM_BINARIES  support from getInfo API.
        Issue #108

        Reviewed by NOBODY (OOPS!).

        Currently getInfo supports PROGRAM_NUM_DEVICES ,PROGRAM_SOURCE, PROGRAM_CONTEXT,
        PROGRAM_DEVICES, PROGRAM_BINARY_SIZES and PROGRAM_BINARIES flags.
        The flags PROGRAM_BINARIES and PROGRAM_BINARY_SIZES are not supported as per specification.

        https://cvs.khronos.org/svn/repos/registry/trunk/public/webcl/spec/latest/index.html#2.11

        No new tests (OOPS!).

        * Modules/webcl/WebCL.h:
        * Modules/webcl/WebCL.idl:
        * Modules/webcl/WebCLProgram.cpp:
        (WebCore::WebCLProgram::getInfo): Also add a proper error for default case.
        * platform/ComputeContext.h:
        * platform/opencl/ComputeContextCL.cpp: Remove PROGRAM_BINARY_SIZES & PROGRAM_BINARIES.
        (WebCore::computeProgramInfoTypeToCL):