Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Calculate GLSL shader cost

  1. #1
    Newbie Newbie
    Join Date
    Nov 2013
    Posts
    2

    Calculate GLSL shader cost

    Hello everyone,
    I'm new on this forum and in OpenGL(but have experiences in OpenCL, CUDA, C++AMP).
    I have next problem:
    I have a list of different shaders, that calculate on vertex and pixel shaders. And i need calculate how many instructions(cycles) contain this shader, for vertex and pixels. I understand that shader execution time depend not only from shader complexity. In ARM documentation(i can't share it because I'm new user ) i found how it can be calculated on Mali GPU's:
    Code :
    malisc -v my_shader.frag
    But i use not Mali GPU's.

    Do you have any ideas how i can do it?

    Current target platform is Windows 7 x64 and Linux in future

  2. #2
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,067
    Quote Originally Posted by retsetA View Post
    And i need calculate how many instructions(cycles) contain this shader, for vertex and pixels.
    I don't understand what you actually need.

    According to Mali's documentation, its offline shader compiler provides various information about vertex and fragment shaders, such as number of cycles that shader takes to execute, assuming no cache misses. I'm not aware of any similar tool for desktop GPUs. After all, desktop environment is highly diverse that such information can be useful. Profilers are tools more suitable for that purpose, but for the concrete configuration.
    Last edited by Aleksandar; 11-27-2013 at 02:02 PM.

  3. #3
    Newbie Newbie
    Join Date
    Nov 2013
    Posts
    2
    Quote Originally Posted by Aleksandar View Post
    I don't understand what you actually need.

    According to Mali's documentation, its offline shader compiler provides various information about vertex and fragment shaders, such as number of cycles that shader takes to execute, assuming no cache misses. I'm not aware of any similar tool for desktop GPUs. After all, desktop environment is highly diverse that such information can be useful. Profilers are tools more suitable for that purpose, but for the concrete configuration.
    I understand what you mean.
    In originally i search some offline compiler/profiler that can give information about vertex and fragment shaders on environment where it runs(compiler/profiler will run before main software for get information about shaders). Now we use only NBidia GPU's but in future it can be Mali's also

  4. #4
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,124
    Since you're using NVidia, you can use cgc for this:

    * http://www.opengl.org/discussion_boa...=1#post1209049

Posting Permissions

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