Donnie Berkholz wrote:
The Doom3 demo [1] crashes in single-player mode (multi-player isn't
available in the demo) when it's about to start the first level.

The backtrace:
#0  0xb5d0ed26 in attrib_8_2 (v=0x9f6d39c8) at
    t_vtx_generic.c:107
#2  0xb5d100fd in _tnl_VertexAttrib2fvNV (index=8, v=0x9f6d39c8)
    at t_vtx_generic.c:389
#3  0xb5c70fad in VertexAttrib2fvNV (index=8, v=0x9f6d39c8)
    at api_arrayelt.c:481
#4  0xb5c72d13 in _ae_loopback_array_elt (elt=717) at api_arrayelt.c:780
#5  0xb5d9d006 in fallback_drawelements (ctx=<value optimized out>,
    mode=<value optimized out>, count=27, indices=0xa18ea010)
    at t_array_api.c:75

Anything else I can do to help?

Try applying the attached patch for t_vtx_generic.c It's just some assertions to try to narrow down the problem.

-Brian

Index: tnl/t_vtx_generic.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/tnl/t_vtx_generic.c,v
retrieving revision 1.6
diff -c -r1.6 t_vtx_generic.c
*** tnl/t_vtx_generic.c 27 Nov 2004 20:07:09 -0000      1.6
--- tnl/t_vtx_generic.c 2 Feb 2006 20:51:25 -0000
***************
*** 57,73 ****
  {                                                     \
     GET_CURRENT_CONTEXT( ctx );                                \
     TNLcontext *tnl = TNL_CONTEXT(ctx);                        \
                                                        \
     if ((ATTR) == 0) {                                 \
        GLuint i;                                               \
                                                        \
        if (N>0) tnl->vtx.vbptr[0] = v[0];              \
        if (N>1) tnl->vtx.vbptr[1] = v[1];              \
        if (N>2) tnl->vtx.vbptr[2] = v[2];              \
        if (N>3) tnl->vtx.vbptr[3] = v[3];              \
                                                        \
!       for (i = N; i < tnl->vtx.vertex_size; i++)      \
         tnl->vtx.vbptr[i] = tnl->vtx.vertex[i];        \
                                                        \
        tnl->vtx.vbptr += tnl->vtx.vertex_size;         \
                                                        \
--- 57,78 ----
  {                                                     \
     GET_CURRENT_CONTEXT( ctx );                                \
     TNLcontext *tnl = TNL_CONTEXT(ctx);                        \
+    assert(tnl);                                               \
                                                        \
     if ((ATTR) == 0) {                                 \
        GLuint i;                                               \
                                                        \
+       assert(tnl->vtx.vbptr);                         \
        if (N>0) tnl->vtx.vbptr[0] = v[0];              \
        if (N>1) tnl->vtx.vbptr[1] = v[1];              \
        if (N>2) tnl->vtx.vbptr[2] = v[2];              \
        if (N>3) tnl->vtx.vbptr[3] = v[3];              \
                                                        \
!       for (i = N; i < tnl->vtx.vertex_size; i++) {    \
!          assert(tnl->vtx.vbptr);                      \
!          assert(tnl->vtx.vertex);                     \
         tnl->vtx.vbptr[i] = tnl->vtx.vertex[i];        \
+       }                                                       \
                                                        \
        tnl->vtx.vbptr += tnl->vtx.vertex_size;         \
                                                        \
***************
*** 76,81 ****
--- 81,87 ----
     }                                                  \
     else {                                             \
        GLfloat *dest = tnl->vtx.attrptr[ATTR];         \
+       assert(dest);                                   \
        if (N>0) dest[0] = v[0];                                \
        if (N>1) dest[1] = v[1];                                \
        if (N>2) dest[2] = v[2];                                \

Reply via email to