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: How to get around limitations of glslang on Radeon 9700

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2004
    Posts
    3

    How to get around limitations of glslang on Radeon 9700

    I am trying to write a shader for the Radeon 9700 using glslang, but I am continually running into a problem where the shader runs in software because I have exceeded the number of available ALU instructions. What are some ways of breaking the thing up into smaller pieces? If you create a couple of modules and compile them separately, then link them and call the functions from main, does that allow you to have a slightly bigger program? I would go ahead and write this in a couple of passes, but I have no place to store the intermediate calculation values, and I would hate to have to go to all the trouble of initializing another float pbuffer to hold the intermediates. I just spent a bunch of time getting a double buffered pbuffer working so I could avoid the speed hit of a context switch, and I would really like to avoid using another buffer. I suppose if I could get my pbuffer to have three or more buffers, that might work, but I have never seen any code that actually works with that.

    In any case, any pointers would be highly appreciated.

    David

  2. #2
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,264

    Re: How to get around limitations of glslang on Radeon 9700

    Update your driver often and maybe you'll get lucky

    I wrote a simple program and I exceeded the number of temporaries. I tried to rearrange a long equation I had but still no dice.

    The native # of temps is suppose to be 32 for FP, and I think it should not had exceeded this.

    Exceeding the max ALU number is easy on Radeon (for FP). It's 64 only.
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2004
    Location
    Santa Clara
    Posts
    5

    Re: How to get around limitations of glslang on Radeon 9700

    you can try to use Ashli; it is compiler from ATI which allows to virtualize ressources like register usage or number of instructions.

    http://www.atitech.ca/developer/ashli.html

    Pierre B.

  4. #4
    Junior Member Newbie
    Join Date
    Feb 2004
    Posts
    3

    Re: How to get around limitations of glslang on Radeon 9700

    Yeah, I looked at Ashli. The problem is that I am writing to and from float pbuffers (doing numerical, rather than graphical calculations), and I didn't see any good way to impart that information to the program. When I tried to plug my fragment program in anyway, it crashed, hard. So, I am back to looking at about 7-8 passes, with using a lot of auxiliary buffers to hold intermediate results. Yuck.

    David

Posting Permissions

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