webcl-firefox icon indicating copy to clipboard operation
webcl-firefox copied to clipboard

Align implementation with WebCL Working Draft

Open toaarnio opened this issue 12 years ago • 4 comments
trafficstars

We're currently deviating from the WebCL Working Draft in at least the following:

• No callbacks; • No ‘name’ and ‘message’ fields in exceptions; • No semi-automatic (hierarchic) release() of CL resources; • No WebCLContextProperties; • No extension mechanism; • Enqueue functions return a new Event object every time; • No Transferable support in enqueueRead/Write; • OpenCL-style function names (getProgramInfo vs. getInfo); • Different enums for setKernelArg; • No HTML Canvas/Image/Video support; • No WebGL interop; • No security protections; • All getDeviceInfo queries are visible.

Many of these are easy to fix, even while retaining the legacy API for backwards compatibility, but some may require substantial effort (e.g., callbacks, extensions, Transferables, security), and some are not possible at all in a browser extension (particularly WebGL interop, maybe some aspects of HTML interop).

toaarnio avatar Aug 13 '13 13:08 toaarnio

For prioritization, we should first tackle those items that have the most severe impact on application portability from one WebCL implementation to another. Currently, applications must have separate code paths for Firefox and WebKit, which is a real obstacle for even writing a WebCL tutorial.

toaarnio avatar Aug 13 '13 13:08 toaarnio

Some of the listed items are now implemented, some others not needed anymore due to spec changes. The following deviations still remain:

  • WebCLCallback + its usage in build() and event handling;
  • WebCLException;
  • WebCLBuffer;
  • WebCLImage;
  • WebCLUserEvent;
  • WebCLContext.releaseAll();
  • WebCLContextProperties (as a named class);
  • WebCLImageDescriptor (fields named differently);
  • createBuffer(..., optional ArrayBufferView hostPtr);
  • Event object return mechanism in enqueue* functions;
  • enableExtension and getSupportedExtensions;
  • HTML interop;
  • WebGL interop;
  • Kernel argument type checking;
  • Kernel validation.

toaarnio avatar Oct 30 '13 13:10 toaarnio

Here's an updated list of what's still missing (off the top of my head):

  • The new forms of createContext;
  • WebCLEvent.setCallback;
  • WebCLException, correct exception names;
  • WebCLImage.getInfo;
  • createBuffer/createImage(..., optional ArrayBufferView hostPtr);
  • enqueueCopyBuffer and enqueueCopyBufferRect;
  • enableExtension and getSupportedExtensions;
  • HTML interop;
  • WebGL interop;
  • WebCLKernelArgInfo;
  • Kernel argument type checking;
  • Kernel validation.

toaarnio avatar Jan 28 '14 22:01 toaarnio

Current status of missing features:

  • WebCLEvent callbacks (other callbacks are OK);
  • enableExtension and getSupportedExtensions.

Missing features that require integrating the validator:

  • WebCLKernelArgInfo;
  • Kernel argument type checking;
  • Kernel validation.

Missing features that require Firefox integration:

  • HTML image and canvas interop;
  • HTML video interop;
  • WebGL interop.

toaarnio avatar Mar 06 '14 16:03 toaarnio