From: Brian P. <br...@va...> - 2000-12-16 00:08:11
|
Brian Paul wrote: > > "Jacob (=Jouk) Jansen" wrote: > > > > Hi all, > > > > Since some time (around the same time all the software rastering was put > > in separate directories) I observe the following 2 problems which may or may > > not be related: > > To test I use the program xlockmore (see ftp://ftp.tux.org./pub/tux/bagleyd/xlockmore/ > > > > problems : > > -in mode moebius a part of the edge is not drawn resulting in a zig-zag > > line. Mesa3.4 draws it correct > > This looks like a glPolygonMode() bug. The interior edges in the quad > strip shouldn't be rendered. Keith could probably find this pretty > quickly. > > > -Occasional xlock crashes in the GL modes due to invalid floats and > > access violation. I have no idea where to look for the error since > > normal error messages are not given. So probably a memory leak overwrites > > the program. > > Which modes or programs in particular cause this? I found the problem. gloss has an FP exception if I run with "setenv MESA_DEBUG FP". The problem is in the texgen code. In the template function for texgen_sphere_map() the VB->tmp_f array is NULL and being allocated on the spot. However, its contents are undefined. Below is a simple patch which just changes the MALLOC to a CALLOC so the array is initialized to zero. I know Keith's been changing the vertex buffer code so I'll wait for him to comment before committing this. -Brian *** t_texgen_tmp.h 2000/11/16 21:05:42 1.1 --- t_texgen_tmp.h 2000/12/15 22:57:19 *************** *** 291,297 **** GLfloat (*f)[3], *m; if (!VB->tmp_f) ! VB->tmp_f = (GLfloat (*)[3]) MALLOC(VB->Size * sizeof(GLfloat) * 3); if (!VB->tmp_m) VB->tmp_m = (GLfloat *) MALLOC(VB->Size * sizeof(GLfloat)); --- 291,297 ---- GLfloat (*f)[3], *m; if (!VB->tmp_f) ! VB->tmp_f = (GLfloat (*)[3]) CALLOC(VB->Size * sizeof(GLfloat) * 3); if (!VB->tmp_m) VB->tmp_m = (GLfloat *) MALLOC(VB->Size * sizeof(GLfloat)); |