diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-11-05 14:41:18 -0700 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-11-05 14:44:01 -0700 |
commit | c9ce3e8fd2a8db93c833bfd9a06d31843145657b (patch) | |
tree | 2d89ae796325de9dabfd1edcb381e0ec360172f0 /src/mesa/swrast_setup/ss_tritmp.h | |
parent | a49e0726e3c3cfbf0d784ba4e9a485af02a7b4dd (diff) |
Check for NULL VB->EdgeFlag array.
There might be a bug elsewhere, but this is a simple work-around for now.
See bug 12614
Diffstat (limited to 'src/mesa/swrast_setup/ss_tritmp.h')
-rw-r--r-- | src/mesa/swrast_setup/ss_tritmp.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/mesa/swrast_setup/ss_tritmp.h b/src/mesa/swrast_setup/ss_tritmp.h index f6b738d60d..7d1bc23465 100644 --- a/src/mesa/swrast_setup/ss_tritmp.h +++ b/src/mesa/swrast_setup/ss_tritmp.h @@ -238,14 +238,16 @@ static void TAG(quadfunc)( GLcontext *ctx, GLuint v0, { if (IND & SS_UNFILLED_BIT) { struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; - GLubyte ef1 = VB->EdgeFlag[v1]; - GLubyte ef3 = VB->EdgeFlag[v3]; - VB->EdgeFlag[v1] = 0; - TAG(triangle)( ctx, v0, v1, v3 ); - VB->EdgeFlag[v1] = ef1; - VB->EdgeFlag[v3] = 0; - TAG(triangle)( ctx, v1, v2, v3 ); - VB->EdgeFlag[v3] = ef3; + if (VB->EdgeFlag) { /* XXX this test shouldn't be needed (bug 12614) */ + GLubyte ef1 = VB->EdgeFlag[v1]; + GLubyte ef3 = VB->EdgeFlag[v3]; + VB->EdgeFlag[v1] = 0; + TAG(triangle)( ctx, v0, v1, v3 ); + VB->EdgeFlag[v1] = ef1; + VB->EdgeFlag[v3] = 0; + TAG(triangle)( ctx, v1, v2, v3 ); + VB->EdgeFlag[v3] = ef3; + } } else { TAG(triangle)( ctx, v0, v1, v3 ); TAG(triangle)( ctx, v1, v2, v3 ); |