jcg
Posts: 25
Joined: Mon Jul 16, 2012 10:19 pm

GPGPU

Sat Jul 28, 2012 9:22 pm

There has been some discussion of GPGPU elsewhere on the forum, but not so much in this section where it belongs, so I've started this thread to try to get something going here. Basically, it makes sense to learn how to use OpenGL ES 2.0 to do GPGPU stuff. The reasons are not only that the R-Pi has an OpenGL ES 2.0 GPU, but also that WebGL is effectively OpenGL ES 2.0. So, if you want to do GPGPU on the Web, you need to know how to do it with GLES2. It would be really cool to have OpenCL on every smartphone (and R-Pi), but that is still ~3-5 years away and as such WebCL is still larval. So let's use what we've got!

As far as I can tell (being a total n00b at (graphics) programming), the whole enterprise depends on having floating point textures. GLES2 doesn't have floating point textures, but there is an extension (OES_texture_float):

http://www.khronos.org/registry/gles/ex ... _float.txt

Does the R-Pi "have it?"

Finally, here are some good "getting started" resources I have been able to dig up:
What every computer scientist should know about floats:
http://docs.oracle.com/cd/E19957-01/806 ... dberg.html
The OpenGL "red book":
http://www.glprogramming.com/red/
Survey of GPGPU Owens, Luebke, et. al. Eurographics 2005:
http://onlinelibrary.wiley.com/doi/10.1 ... 012.x/full
http://vis.cs.ucdavis.edu/Ultravis/pape ... seComp.pdf
GLSL "orange book":
http://wiki.labomedia.org/images/1/10/O ... dition.pdf
GPGPU Tutorial:
http://www.mathematik.tu-dortmund.de/~g ... orial.html
Legacy GPGPU resources:
http://gpgpu.org/developer/legacy-gpgpu-graphics-apis
OpenGL resources:
http://www.opentk.com/doc/links/opengl- ... -tutorials

So I'm hoping this thread might become a place to discuss and learn about GPGPU on OES2/WebGL hardware.

lb
Posts: 263
Joined: Sat Jan 28, 2012 8:07 pm

Re: GPGPU

Sat Jul 28, 2012 10:24 pm

The OpenGL ES 2.0 implementation on the Pi doesn't support floating point textures. It doesn't really matter though, even with FP textures available, GLES 2.0 is still a lousy API for GPGPU applications.

jcg
Posts: 25
Joined: Mon Jul 16, 2012 10:19 pm

Re: GPGPU

Sat Jul 28, 2012 11:53 pm

lb wrote:The OpenGL ES 2.0 implementation on the Pi doesn't support floating point textures. It doesn't really matter though, even with FP textures available, GLES 2.0 is still a lousy API for GPGPU applications.
Thanks for the thread link. This post has me wondering a few things:
liz wrote:1.1 and 2.0 are supported. I don't have it all to hand, but I do know we're towards the upper end of typical OpenGL ES 2.0 implementations - I *believe* there's an unlimited number of texture units, but don't quote me on that until I can confirm it! There's an unlimited number of uniforms, 32 varyings, textures up to 2k x 2k, and all vertex and fragment shader arithmetic is performed at 32-bit float precision - that's all I can give you right now.
So, this may just be my ignorance showing through, but without OES_texture_float or OES_texture_float_linear, textures are arrays of unsigned bytes or shorts. However, vertex and fragment shader arithmetic is done in floating point... So the streams are not floats but the kernels work on them assuming they are floats? That seems really bad.

That is what I think I'm reading on this page:

http://mchouza.wordpress.com/2011/02/21 ... -equation/

...but it makes so very little sense to me...

EDIT: here's a page with some good WebGL stuff:
http://www.khronos.org/webgl/wiki/User_Contributions

jcg
Posts: 25
Joined: Mon Jul 16, 2012 10:19 pm

Re: GPGPU

Sun Jul 29, 2012 2:22 am


Return to “OpenGLES”