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

Thread: crash with gl_MultiTexCoord[1], gl_MultiTexCoord[2]

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

    crash with gl_MultiTexCoord[1], gl_MultiTexCoord[2]

    I'm on cat 4.4 and I think I'm getting a crash when in my GLSL vertex shader I use gl_MultiTexCoord[1] and gl_MultiTexCoord[2].

    The crash is in atioglxx.dll and it looks like it is trying to read using a null pointer (eax = 0)

    It seems to only happen when I don't upload anything for [1] and [2].

    When I enable client array and send stuff (glTexCoordPointer) for [1] and [2], it works.

    I tried it a few times and it was always the same result.

    Should I report it as a bug or one of you discovered it already?
    ------------------------------
    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);

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

    Re: crash with gl_MultiTexCoord[1], gl_MultiTexCoord[2]

    Originally posted by V-man:
    I'm on cat 4.4 and I think I'm getting a crash when in my GLSL vertex shader I use gl_MultiTexCoord[1] and gl_MultiTexCoord[2].

    The crash is in atioglxx.dll and it looks like it is trying to read using a null pointer (eax = 0)

    It seems to only happen when I don't upload anything for [1] and [2].

    When I enable client array and send stuff (glTexCoordPointer) for [1] and [2], it works.

    I tried it a few times and it was always the same result.

    Should I report it as a bug or one of you discovered it already?
    I think this is mostly an expected behavior from client side draw arrays.
    you specify pointer to user space memory for the texture coordinates. The driver has no generic way to ensure that these pointers are valid; there might be a special case for non specified or NULL pointer.

    Pierre B.

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

    Re: crash with gl_MultiTexCoord[1], gl_MultiTexCoord[2]

    No, I don't think that's the correct behavior.

    I did have the client arrays for [1] and [2] disabled (glDisableClientState) and probably the pointers passed to glTexCoordPointer were the defaults which I assume is NULL.

    If I'm right, the driver is forgetting to check the "enable flag" for those arrays.

    If I don't reference gl_MultiTexCoord[1] or gl_MultiTexCoord[2] in the shader, it doesn't crash.
    ------------------------------
    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);

Posting Permissions

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