Is OpenGL ES 2.0 suitable for GPGPU?

This topic contains 4 replies, has 2 voices, and was last updated by  marco 4 years, 11 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #31022

    I want to utilize SGX540 to do GPGPU like linear algebra. The data I need to compute is short type that I cannot map it to texture. Can anyone give me some hints?

    #36299

    Any reply?

    #36300

    marco
    Member

    Hi,

    do you need to output 16 bit short values from a fragment shader?
    You could pack the individual bytes into the channels of a texture.

    Regards,
    Marco

    #36301

    Yes, I need to do computation on 16-bit short  values in fragment shader. But 

    I don’t know how to map the 16-bit short values to Texture and then output a 
    16-bit short values.
    Can you explain it in more detail? I am a newbie in GL ES and GPGPU. It would
    be better if given some code snippet. 
    #36302

    marco
    Member

    There is a similar method to pack a floating point value into the individual channels of a 32bit unsigned byte RGBA texture:
    http://stackoverflow.com/questions/9882716/packing-float-into-vec4-how-does-this-code-work

    You could adapt that code snippet to pack your values into two channels instead of four if that is enough precision for you.

Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.