2013-05-23  Sharath Kamath  <s.kamath@samsung.com>

        WebCLDevice::GetInfo does not return WebCLPlatform on DEVICE_PLATFORM param type.
        Issue #236

        Reviewed by Antonio/Igor.

        Fixes conformance/computeinfo/cl_device_getinfo.htmt
        at https://github.com/SRA-SiliconValley/webkit-webcl-conformanc

        * Modules/webcl/WebCLDevice.cpp:
        (WebCore::WebCLDevice::create):
        (WebCore::WebCLDevice::WebCLDevice):
        (WebCore::WebCLDevice::getInfo):
        (WebCore::toWebCLDeviceArray):
        * Modules/webcl/WebCLDevice.h:
        (WebCore):
        (WebCLDevice):
        (WebCore):
        * Modules/webcl/WebCLPlatform.cpp:
        (WebCore::WebCLPlatform::getDevices):
Week 31

Demos:
  * Restore localWorkSize to original values in: FluidDynamics, XY,
    PathIntegrals, Mandelbrot and Ising.
  * Add radion button in Ising to switch device (CPU/GPU)

Layout Tests:
  * Fix WebCL<->WebGL Interoperability Layout Test
  * Add a LayoutTest for creating a WebCLContext without some
    WebCLContextProperties (WebCLDevice and WebCLPlatform)
  * Use DEVICE_TYPE_ALL to get all devices available in one platform
2013-08-05  Antonio Gomes  <a1.gomes@sisa.samsung.com>

        use [Default=Undefined] in enqueue{Acquire,Release}GLObjects
        Issue #266

        Reviewed by Igor.

        No new tests (OOPS!).
        This was done overly in issue #211 (Use [Optional=DefaultIsUndefined]
        where appropriated in WebCL idl's) but some IDLs were left behind.

        It allows us to remove unneeded overload method declaration
        to handl default parameter values.

        * Modules/webcl/WebCLCommandQueue.idl:
        * Modules/webcl/WebCLGLCommandQueue.h:
        * Modules/webcl/WebCLGLCommandQueue.idl:
2013-08-05  Antonio Gomes  <a1.gomes@sisa.samsung.com>

        WebCLGLCommandQueue::enqueueAcquireGLObjects / enqueueReleaseGLObjects is not working properly
        Issue #264

        Reviewed by Igor.

        As per the lastest WebCL Working Draft, enqueueAcquireGLObjects and
        enqueueReleaseGLObjects APIs of WebCLGLCommandQueue take a vector of
        WebCLMemoryObjects as parameter.
        Patch fixes the WebKit implementation to follow the spec in that sense.
        Additionally, the related ComputeContext APIs were simplified.

        Demos were also updated accordingly.

        Source/WebCore:
        * Modules/webcl/WebCLGLCommandQueue.cpp:
        (WebCore::WebCLGLCommandQueue::enqueueAcquireGLObjects):
        (WebCore::WebCLGLCommandQueue::enqueueReleaseGLObjects):
        * Modules/webcl/WebCLGLCommandQueue.h:
        * Modules/webcl/WebCLGLCommandQueue.idl:
        * platform/ComputeContext.h:
        * platform/opencl/ComputeContextCL.cpp:
        (WebCore::ComputeContext::enqueueAcquireGLObjects):
        (WebCore::ComputeContext::enqueueReleaseGLObjects):

        Examples:
        * WebCL/Nbody/SimCL.js:
        (InitCL):
        (SimulateCL):
        * WebCL/PathIntegrals/index.html:
2013-08-05  Antonio Gomes  <a1.gomes@sisa.samsung.com>

        WebCLGLImage is not working with enqueueAcquireGLObjetcs / enqueueReleaseGLObjetcs
        Issue #265

        WebCL WebGL interop functions should not use WebCLMemoryObject as argument
        Issue #218

        Reviewed by Igor.

        Make isShared overload virtual, since CommandQueue::enqueue{Acquire/Release}GLObjects
        take WebCLMemoryObject (base class of WebCLGLImage and WebCLGLBuffer).

        * Modules/webcl/WebCLGLBuffer.h:
        (WebCore::WebCLGLBuffer::isShared):
        * Modules/webcl/WebCLGLImage.h:
        (WebCore::WebCLGLImage::isShared):
2013-08-05  Antonio Gomes  <a1.gomes@sisa.samsung.com>

        WebCLDevice.idl has wrong return types
        Issue #238

        WebCLPlatform.idl has lots of wrong return types
        Issue #237

        Reviewed by Igor.

        IDLs are needed to change only since we have
        custom binding implementations for them.

        * Modules/webcl/WebCLDevice.idl:
        * Modules/webcl/WebCLPlatform.idl:
2013-08-06  Sharath Kamath  <s.kamath@samsung.com>

        WebCLCommandQueue methods should not support image 3D values
        Issue #130

        Since WebCL doesnt support 3D images, appending default values
        of 0 for all origin arrays and 1 for all region array as 3rd element
        as per OpenCL specification.

        For enqueue*BufferRect API's we need to pass a CLuint[3] as 3rd element
        is relevent in Rectangular copy and not used for 3D buffers/images.
        [https://www.khronos.org/bugzilla/show_bug.cgi?id=812]

        Reviewed by Antonio.

        Fixes various test cases conformance/buffimgs/cl_commandQueue_enqueue***.html
        at https://github.com/SRA-SiliconValley/webkit-webcl-conformance

        * Modules/webcl/WebCLCommandQueue.cpp:
        (WebCore::toVector):
        (WebCore::WebCLCommandQueue::enqueueWriteBufferRect):
        (WebCore::WebCLCommandQueue::enqueueReadImage):
        (WebCore::WebCLCommandQueue::enqueueReadBufferRect):
        (WebCore::WebCLCommandQueue::enqueueNDRangeKernel):
        (WebCore::WebCLCommandQueue::enqueueWriteImage):
        (WebCore::WebCLCommandQueue::enqueueCopyImage):
        (WebCore::WebCLCommandQueue::enqueueCopyImageToBuffer):
        (WebCore::WebCLCommandQueue::enqueueCopyBufferToImage):
        (WebCore::WebCLCommandQueue::enqueueCopyBufferRect):
2013-08-06  Sharath Kamath  <s.kamath@samsung.com>

        WebCL Exception Error Code mismatch with OpenCL Codes.
        Issue #267

        Reviewed by Antonio.

        Currently the error codes are lagging from OpenCL codes by 1.
        The enum in  WebCLException must start from 1 rather than 0 to Map with OpenCL
        enum starting with -1.

        This was partially fixed by commit 88de014b2a8a7de6cf8b9ddeca74537308229390.
        But they was a mismatch in between OpenCL and WebCL codes due to above reason.

        No new tests (OOPS!).

        * Modules/webcl/WebCLException.cpp:
        (WebCore::WebCLException::initializeDescription):
        * Modules/webcl/WebCLException.h:
2013-08-07  Antonio Gomes  <a1.gomes@sisa.samsung.com>

        Change WebCLGL{Image,Buffer} ctor to take WebGL objects instead of OpenGL IDs
        Issue #270

        Reviewed by Igor.

        That way we can cache the WebGL{Image,Buffer} object passed in from JS
        and return it from getGLObjectInfo method, if needed.

        * Modules/webcl/WebCLGLBuffer.cpp:
        (WebCore::WebCLGLBuffer::create):
        * Modules/webcl/WebCLGLBuffer.h:
        (WebCore::WebCLGLBuffer::~WebCLGLBuffer):
        * Modules/webcl/WebCLGLContext.cpp:
        (WebCore::WebCLGLContext::createFromGLBuffer):
        (WebCore::WebCLGLContext::createFromGLRenderbuffer):
        (WebCore::WebCLGLContext::createFromGLTexture):
        * Modules/webcl/WebCLGLImage.cpp:
        (WebCore::WebCLGLImage::create):
        * Modules/webcl/WebCLGLImage.h:
2013-08-07  Antonio Gomes  <a1.gomes@sisa.samsung.com>

        Fix getGLObjectInfo implementations
        Issue #269

        Reviewed by Igor.

        At creation of WebCLGLImage and WebCLGLBuffer objects
        cache the associated WebCLGLObject info.

        Patch also reworks WebCLGLObjectInfo implementation
        completely (.cpp, .h and .idl). Now it works like how
        the spec describes it.

        Note that WebCLGLObjectInfo::glObject attribute getter
        gets declared with a Custom extended attribute. That way
        we can implement "any" in the spec, and return either
        a WebGLBuffer, WebGLRenderbuffer or WebGLTexture.

        * Modules/webcl/WebCLGLBuffer.cpp:
        (WebCore::WebCLGLBuffer::create):
        (WebCore::WebCLGLBuffer::cacheGLObjectInfo):
        (WebCore::WebCLGLBuffer::getGLObjectInfo):
        * Modules/webcl/WebCLGLBuffer.h:
        * Modules/webcl/WebCLGLBuffer.idl:
        * Modules/webcl/WebCLGLImage.cpp:
        (WebCore::WebCLGLImage::create):
        (WebCore::WebCLGLImage::getGLTextureInfo):
        (WebCore::WebCLGLImage::cacheGLObjectInfo):
        (WebCore::WebCLGLImage::getGLObjectInfo):
        * Modules/webcl/WebCLGLImage.h:
        * Modules/webcl/WebCLGLImage.idl:
        * Modules/webcl/WebCLGLObjectInfo.cpp:
        (WebCore::WebCLGLObjectInfo::create):
        (WebCore::WebCLGLObjectInfo::WebCLGLObjectInfo):
        (WebCore::WebCLGLObjectInfo::type):
        (WebCore::WebCLGLObjectInfo::glObject):
        * Modules/webcl/WebCLGLObjectInfo.h:
        (WebCore::WebCLGLObjectInfo::~WebCLGLObjectInfo):
        * Modules/webcl/WebCLGLObjectInfo.idl:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSWebCLGLObjectInfoCustom.cpp: Added.
        (WebCore::JSWebCLGLObjectInfo::glObject):
2013-08-07  Antonio Gomes  <a1.gomes@sisa.samsung.com>

        Clean up WebCLGLImage::getGLTextureInfo
        Issue #273

        Reviewed by Igor.

        Patch:
        1) made use of WebCLInputChecker to validate passed-in parameters;
        2) removed unneeded casts;
        3) replaced CL_SUCCESS by ComputeContext::SUCCESS.

        * Modules/webcl/WebCLGLImage.cpp:
        (WebCore::WebCLGLImage::getGLTextureInfo):
        * Modules/webcl/WebCLInputChecker.cpp:
        (WebCore::WebCLInputChecker::isValidTextureInfo):
        * Modules/webcl/WebCLInputChecker.h:
2013-08-07  Antonio Gomes  <a1.gomes@sisa.samsung.com>

        Unreviewed Deform demo fix, left over from cc0b8cafb.

        WebCLGLCommandQueue::enqueueAcquireGLObjects / enqueueReleaseGLObjects is not working properly
        Issue #264

        * WebCL/Deform/SimCL.js:
        (SimulateCL):
2013-08-08  Antonio Gomes  <a1.gomes@sisa.samsung.com>

        Fix WebCL{Context,MemoryObject,Program,Sampler}::getInfo signatures
        Issue #272

        Reviewed by TrustMe.

        * Modules/webcl/WebCLContext.idl:
        * Modules/webcl/WebCLMemoryObject.idl:
        * Modules/webcl/WebCLProgram.idl:
        * Modules/webcl/WebCLSampler.idl:
2013-08-08  Antonio Gomes  <a1.gomes@sisa.samsung.com>

        Remove remaining cl_xxx directly calls from Modules/WebCL
        Issue #191

        Reviewed by TrustMe.

        cl_image_format -> CCImageFormat
        cl_platform_id -> CCPlatformID
        cl_program -> CCProgram
        CL_SUCCESS -> ComputeContext::SUCCESS

        * Modules/webcl/WebCLCommandQueue.cpp:
        (WebCore::WebCLCommandQueue::getInfo):
        (WebCore::WebCLCommandQueue::enqueueCopyImage):
        * Modules/webcl/WebCLGLCommandQueue.idl:
        * Modules/webcl/WebCLImageDescriptor.cpp:
        (WebCore::WebCLImageDescriptor::create):
        (WebCore::WebCLImageDescriptor::WebCLImageDescriptor):
        * Modules/webcl/WebCLMemoryObject.cpp:
        (WebCore::WebCLMemoryObject::getInfo):
        * Modules/webcl/WebCLPlatform.h:
        * Modules/webcl/WebCLProgram.cpp:
        (WebCore::WebCLProgram::WebCLProgram):
        (WebCore::WebCLProgram::getBuildInfo):
        (WebCore::WebCLProgram::finishCallback):
        * Modules/webcl/WebCLProgram.h:
2013-08-07  Antonio Gomes  <a1.gomes@sisa.samsung.com>

        use [Default=Undefined] in WebCLGLContext::createCommandQueue
        Issue #271

        Reviewed by TrustMe.

        * Modules/webcl/WebCLGLContext.h:
        * Modules/webcl/WebCLGLContext.idl:
2013-08-09  Antonio Gomes  <a1.gomes@sisa.samsung.com>

        WebCLGLContext::createFromGLRenderbuffer is not working
        Issue #277

        Reviewed by Igor.

        Wrong native OpenGL object was being passed
        to OpenCL.

        * Modules/webcl/WebCLGLImage.cpp:
        (WebCore::WebCLGLImage::create):
2013-08-09  Diego Pinheiro  <diego.qp@samsung.com>

        Fix Layout Test webcl-test-gl-instanceof.html
        Issue #277

        Reviewed by Antonio Gomes.

        Test fix to be according to the current webcl
        API (August 8, 2013).

        * webcl/tests/webcl-test-gl-extension-instanceof-expected.txt:
        * webcl/tests/webcl-test-gl-extension-instanceof.html:
Week 32

Demos:
  * Fix frame interval in Ising Model
  * Fix localWorkSize in Path Integrals
  * Moving localWorkSize initialisation
  * Removing shareGroup
  * N-body: fix bug in CL simulation
  * Removing libs directory

Layout Tests:
  * Update the Layout Test which tests all devices using a single context
  * WCLCommandQueue::enqueueAcquireGLObjects and enqueueReleaseGLObjects
    update in webcl-proxy
  * Remove hint from WebCLContextProperties in all Layout Tests
  * Fixed WebCL WebCLKernelArgumentTypes constants test
  * Fix Layout Test for supported extensions
  * Fixed WebCL constants test
  * Fix Layout Test webcl-test-instanceof.html
  * Mark some Layout Tests as expected-to-fail