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 9 of 9

Thread: GLSlang and resource virtualization

  1. #1
    Intern Contributor
    Join Date
    Sep 2003
    Location
    Montreal, Canada
    Posts
    78

    GLSlang and resource virtualization

    Can anyone tell me if GLSlang is using virtualization to enable, among other things, programs of arbitrary length? I remember hearing this, but I can find any information to confirm it.

  2. #2
    Intern Newbie
    Join Date
    Mar 2003
    Location
    France
    Posts
    36

    Re: GLSlang and resource virtualization

    GLSlang doesn't have any limits on the number of instructions in a vertex or a fragment shader so in a way we can speak of virtualization of ressources. But if by this term you're implying automatic multipass when your program exceeds hardware limits then it's not the case.

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

    Re: GLSlang and resource virtualization

    Other technologies like F-buffer are suppose to virtualize the resources and do auto-multipass.

    I think GLSL doesn't have the requirement to virtualize anything.

    This will be the next new addition to the 3D scene but who knows when it will happen.
    ------------------------------
    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);

  4. #4
    Intern Contributor
    Join Date
    Jul 2001
    Location
    Santa Clara, CA
    Posts
    84

    Re: GLSlang and resource virtualization

    The language is spec'd to allow resource virtualization, but as far I'm aware nobody has actually shipped an implementation that supports this. It's harder than it sounds.

    -S.

  5. #5
    Intern Contributor
    Join Date
    Sep 2003
    Location
    Montreal, Canada
    Posts
    78

    Re: GLSlang and resource virtualization

    When you say that no current driver supports this, will a program with too many instruction simply not run at all or will run but extremely slowly?

  6. #6
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    3,576

    Re: GLSlang and resource virtualization

    A glslang compiler/linker is allowed to fail due to too many instructions. So, you will get a compiler/linker error.

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

    Re: GLSlang and resource virtualization

    Oh sorry, I meant to say it will be the next BIG addition, because I wanted to emphasize that it will be a significant advancement.

    And this is one of the reasons I made my post about Ashli (much further down) because it converts GLSL to ARBvp+fp (and vp?, ps2.0)
    and does multipass.
    ------------------------------
    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);

  8. #8
    Intern Contributor
    Join Date
    Sep 2001
    Location
    Marlboro MA
    Posts
    90

    Re: GLSlang and resource virtualization

    Originally posted by simongreen:
    The language is spec'd to allow resource virtualization, but as far I'm aware nobody has actually shipped an implementation that supports this. It's harder than it sounds.

    -S.
    Simon -

    ATI's implementation supports resource virtualization.

    BTW, there is only limitted resource virtualization with the OpenGL Shading Language and related extensions.

    The resources virtualized are number of temporaries and number of instructions.


    The resources *not* virtualized are number of vertex texture units, number of fragment texture units, number of total texture units, number of active vertex attributes, number of active interpolators,
    size of active uniform storage. All of these resources have hard physical limits.

    -mr. bill

  9. #9
    Intern Contributor
    Join Date
    Sep 2001
    Location
    Marlboro MA
    Posts
    90

    Re: GLSlang and resource virtualization

    Originally posted by Korval:
    A glslang compiler/linker is allowed to fail due to too many instructions. So, you will get a compiler/linker error.
    Early implementations failed to compile, but early implementations were not conformant. Our implementation issues a warning in the link infolog of shaders that exceed HW physical resources.

    And just to set expectations correctly, *currently* our implementation shades significantly slower if a shader exceeds HW physical resources.

    -mr. bill

Posting Permissions

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