Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: OpenGL Compute Shaders vs OpenCL

  1. #11
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    Did anybody "seriously" compare compute shaders vs OpenCL?
    How can someone "seriously" compare them when:

    1: NVIDIA's Compute Shader implementation is barely 6 months old and hasn't been out of beta for more than a few months.

    2: AMD doesn't even have a Compute Shader implementation yet.

    In short, compute shaders are too immature at the present time to be "seriously" comparing them to anything. It's simply too soon to answer most of your questions.

    The other question is this: what exactly are you using them for?

    Compute Shaders exist to do exactly one thing: make it more convenient to do GPU computations that directly support rendering operations. Before CS's, if you wanted to do instanced rendering with frustum culling, you had to use Geometry Shaders via some hacky methods. This involved a pointless vertex shader, as well as working around the semantics of GS output streams and other such things.

    Now, you can just use a CS (hardware and drivers willing).

    Compute Shaders are not a replacement for all uses of OpenCL. If all you're doing with your compute tasks is to read the data back on the CPU, stick with OpenCL. Compute Shaders are primarily intended to help rendering operations. They exist so that you don't have to do expensive context switches and such that OpenCL/GL interop requires. If your compute tasks aren't about rendering operations, then you shouldn't be using CS's.

    Simply saying that you lost 20% performance "in my case" really isn't enough information to know if that's reasonable or not.

  2. #12
    Junior Member Newbie
    Join Date
    Sep 2011
    Posts
    6
    Thank you guys for quick and detailed answers!

  3. #13
    Newbie Newbie
    Join Date
    May 2013
    Posts
    1
    Quote Originally Posted by Alfonse Reinheart View Post
    2: AMD doesn't even have a Compute Shader implementation yet.
    AMD does have compute shaders for a few weeks now, in their latest 13.4 and 13.5 beta drivers. I tried them and they work for this ao_bench compute shader test.
    Just google for Catalyst 13.4 or 13.5
    Feature Highlights of AMD Catalyst™ 13.4

    Support added for AMD Radeon HD7790 and AMD Radeon HD 7990
    ...
    Delivers support for the following OpenGL 4.3 features:
    GL_ARB_compute_shader
    GL_ARB_multi_draw_indirect
    GL_ARB_shader_storage_buffer_object
    GL_ARB_arrays_of_arrays
    GL_ARB_clear_buffer_object
    GL_ARB_ES3_compatibility
    GL_ARB_explicit_uniform_location
    GL_ARB_fragment_layer_viewport
    GL_ARB_invalidate_subdata
    GL_ARB_program_interface_query
    GL_ARB_shader_image_size
    GL_ARB_stencil_texturing
    GL_ARB_texture_buffer_range
    GL_ARB_texture_query_levels
    GL_ARB_texture_storage_multisample

    The newer 13.5 beta driver also support OpenGL Compute.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •