Khronos finishes WebCL 1.0 to let Web apps tap into GPU

The interface is designed to let take advantage of the GPU and multicore CPUs for parallel programming tasks. The standards group will have to convince browser makers to adopt it, though.

WebCL logo

WebGL has been a strong success, bringing hardware-accelerated 3D graphics to the browser. Now the standards group behind it hopes to let Web apps get even more use out of the graphics chip by releasing version 1.0 of an interface called WebCL.

At this week's Game Developers Conference in San Francisco, the Khronos Group standards body announced the ratification and release of WebCL 1.0. WebCL lets programmers run general-purpose tasks on a device's graphics processing unit (GPU) or on a multicore central processing unit (CPU), the main brain in computers and mobile devices.

Just as WebGL dovetails with the OpenGL graphics interface, WebCL dovetails with the OpenCL interface for running code on GPUs. One big fan is Samsung, which maintains an open-source WebCL project.

However, while most of the browser world has embraced WebGL, WebCL faces more resistance.

Vlad Vukicevic, Mozilla's engineering director and the inventor of WebGL, said Firefox engineers would prefer extending of WebGL to adopting OpenCL:

WebGL was successful because OpenGL itself was successful. The establishment of OpenGL ES as the standard for doing mobile graphics helped WebGL significantly. OpenCL does not have anywhere near that level of support. It's not part of the iOS, Android, or even Windows Phone software stacks. Apple uses it under the hood, but it's not exposed to developers. There's also very little actual demand for OpenCL from developers.

WebGL also could use an update, though. On Monday, Khronos released OpenGL ES 3.1, bringing some of the OpenGL 4.4 desktop standard to the ES version that ships in smartphones and other more limited devices.

Kronos listed the following new features of OpenGL ES 3.1:

• Compute shaders - Applications can use the GPU to perform general computing tasks, tightly coupled with graphics rendering. Compute shaders are written in the GLSL ES shading language, and can share data with the graphics pipeline.

• Separate shader objects - Applications can program the vertex and fragment shader stages of the GPU independently, and can mix and match vertex and fragment programs without an explicit linking step.

• Indirect draw commands - The GPU can be instructed to take draw commands from its memory rather than waiting for commands from the CPU. For example, this allows a compute shader running on the GPU to perform a physics simulation and then generate the draw commands needed to display the results, without CPU intervention.

• Enhanced texturing functionality - Including multisample textures, stencil textures, and texture gather.

• Shading language improvements - New arithmetic and bitfield operations, and features to enable modern styles of shader programming.

• Optional extensions - Per-sample shading, advanced blending modes, and more.

GPUs account for a lot of new power arriving on computing systems, either mobile devices or PCs. One tricky aspect of that power is using it, though: not all software is easily broken down into independent pieces that run in parallel, and sharing data from software running on a CPU with software running on a GPU is complicated.


Discuss Khronos finishes WebCL 1.0 to let Web apps...

Conversation powered by Livefyre

This week on CNET News
Hot Products
Trending on CNET

Tech Tip

Know how to save a wet phone?

It's not with a dryer and it's not with rice. CNET shows you the secret to saving your phone.