PDA

View Full Version : crash with gl_MultiTexCoord[1], gl_MultiTexCoord[2]



V-man
04-23-2004, 08:02 AM
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?

Pierre B.
04-23-2004, 09:53 AM
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.

V-man
04-23-2004, 11:43 AM
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.