News for hackers. Stuff that matters.
Re:Superconductor – real-time data visualization using WebCL... by pyalot2 on Sunday June 30, 2013 @04:36PM (#5967087)
Found no live-examples to run. WebCL's not supported by my browser. WebCL's not integrating with the WebGL rendering pipeline (no buffer sharing, no atomic synchroniczation primitives etc.)

I'd suggest solving a few fundamental problems with the technology first, sorry to rain on the parade.

Re:Superconductor – real-time data visualization using WebCL... by lmeyerov on Sunday June 30, 2013 @05:00PM (#5967174)
Yeah, WebCL->WebGL buffer sharing is a big deal: having to copy the data from GPU->CPU->GPU for the layout->rendering hand-off is a ~5-10ms hit on the animation loop.

Luckily, the Safari version of WebCL we use has integrated buffer sharing (https://github.com/SRA-SiliconValley/webkit-webcl). I'd expect that to be in the Chrome port being developed. The Nokia port for Firefox a couple years back didn't have it, though I don't know what's going on with the new one @ https://www.khronos.org/bugzilla/show_bug.cgi?id=792 .

My benchmarks show that asm.js + workers + webgl will have that 5-10ms hit, but otherwise performs at similar scales. If we figure out streaming data transfers to overlap communication with computation, it would be even less.

Re:Superconductor – real-time data visualization using WebCL... by pyalot2 on Sunday June 30, 2013 @05:50PM (#5967380)
Compute shaders solve essentially all these issues, and more.

The graphics pipeline consists of programmable and semi-fixed components and it is quite often useful to interact with it. For that purpose compute shaders introduce compute kernels, atomic counters, atomic locks, sharable buffers and some hookups to the pipeline stages.

This is functionality gleaned from Cuda, but repackaged in a more or less portable way. Of course compute shader kernels aren't as flexible as either Cuda or OpenCL programs. However OpenCL is by now quite far behind "the state of the art".

Re:Superconductor – real-time data visualization using WebCL... by lmeyerov on Sunday June 30, 2013 @06:12PM (#5967457)
Ah, interesting. OpenCL/WebCL solve this problem, so I think the question is portability. Will compute shaders be landing in most WebGL implementations? WebGL seems generally limited to OpenGL ES, so I had only explored BrookGPU-style alternatives.

Targeting CUDA/OpenCL/WebCL was so that we can rely upon intermediate GPGPU compilers. Our DSL compiler outputs a bunch of for-loops, which traditional compilers love to optimize (the JIT for JS, LLVM for OpenCL, etc.). If we targeted a low-level language such as nvidia's PTX, I suspect we'd still want something like LLVM inbetween. Is there a good preprocessor for compute shaders?

Re:Superconductor – real-time data visualization using WebCL... by pyalot2 on Monday July 01, 2013 @05:42PM (#5973765)
At least in the OpenGL world, compute shaders use more or less the same syntax as other kinds of shaders (GLSL).

It's true that WebGL does not have compute shaders (and neither does OpenGL ES), yet.

However OpenGL ES roughly tracks OpenGL's development with OpenGL ES 2.0 == OGL 2.0, OpenGL ES 3.0 == OGL 3.0, in each case with a bunch of features stripped but with the essential advances in place. OpenGL ES 4.0 which should come about in the next 2-3 years is very likely to include compute shaders.

Re:Superconductor – real-time data visualization using WebCL... by iso8859-1 on Sunday June 30, 2013 @04:57PM (#5967162)
Other compilation targets are available, see lmeyerov's posts.