Package: libgl1-mesa-glx Version: 6.5.0.cvs.20060524-2 Severity: normal
The report is for the version of mesa in experimental. There's some debugging output in the GL library that makes line drawing unbearably slow. I've been mystified by these sets of three hex numbers since recent packaging changes have required the use of xorg/mesa from experimental in order to enable direct rendering (I have an i855GM). I finally got around to building a package with debugging symbols and found the culprit. There's a printf in src/mesa/tnl/t_vb_render.c line 89 which needs to be removed (or made conditional for debugging purposes). I'll include a backtrace at the point where the macro is expanded, and attach a test program which is probably not necessary anymore since I've tracked down the culprit. Thanks! #0 0xb78f0fdd in clip_render_lines_verts (ctx=0x8054980, start=0, count=84, flags=49) at tnl/t_vb_rendertmp.h:85 #1 0xb78fc2e4 in run_render (ctx=0x8054980, stage=0x8298924) at tnl/t_vb_render.c:321 #2 0xb78e1f3a in _tnl_run_pipeline (ctx=0x8054980) at tnl/t_pipeline.c:162 #3 0xb783c438 in intelRunPipeline (ctx=0x8054980) at intel_tris.c:758 #4 0xb791f452 in _tnl_flush_vtx (ctx=0x8054980) at tnl/t_vtx_exec.c:281 #5 0xb79172cb in _tnl_FlushVertices (ctx=0x8054980, flags=1) at tnl/t_vtx_api.c:877 #6 0xb7840b45 in _mesa_Flush () at main/context.c:1817 #7 0xb7c5a226 in glFlush () at ../../../src/mesa/glapi/glapitemp.h:1160 #8 0xb7edf3e0 in glutSwapBuffers () at freeglut_display.c:51 #9 0x08048d33 in display_func () at ./test_i810_dri.c:53 #10 0xb7ee8d34 in fghcbDisplayWindow (window=0x804ecf8, enumerator=0xb7820f74) at freeglut_main.c:212 #11 0xb7eec99a in fgEnumWindows (enumCallback=0xb7ee8cd0 <fghcbDisplayWindow>, enumerator=0xbfe5bd08) at freeglut_structure.c:388 #12 0xb7ee9263 in glutMainLoopEvent () at freeglut_main.c:251 #13 0xb7ee9cbe in glutMainLoop () at freeglut_main.c:1046 #14 0x08048a59 in main (argc=-1211216176, argv=0xb7dbe3a0) at ./test_i810_dri.c:75 -- System Information: Debian Release: testing/unstable APT prefers experimental APT policy: (500, 'experimental'), (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.17.7-swsusp2 Locale: LANG=en_US.ISO-8859-1, LC_CTYPE=en_US.ISO-8859-1 (charmap=ISO-8859-1) Versions of packages libgl1-mesa-glx depends on: ii libc6 2.3.6-19 GNU C Library: Shared libraries ii libdrm2 2.0.1-1 Userspace interface to kernel DRM ii libx11-6 2:1.0.0-8 X11 client-side library ii libxext6 1:1.0.1-1 X11 miscellaneous extension librar ii libxxf86vm1 1:1.0.1-1 X11 XFree86 video mode extension l libgl1-mesa-glx recommends no packages. -- no debconf information
#include <GL/glut.h> float clip_near = 0.5; float clip_far = 500.0; float view_elevation = 45; float view_azimuth = 0; float view_distance = 50; float view_x = 0.0; float view_y = 0.0; float view_z = 0.0; void draw_grid (void) { int i; int num_cells = 20; float line_spacing = 1.0; float R = 0.0, G = 0.0, B = 0.5; glBegin(GL_LINES); { for (i = -num_cells/2; i < num_cells/2+1; i++) { glColor3f(R, G, B); if ((i+num_cells)%4 == 0) { glColor3f(1.0-R, 1.0-G, 1.0-B); } glVertex3f( i*line_spacing, -line_spacing*num_cells/2, 0); glVertex3f( i*line_spacing, line_spacing*num_cells/2, 0); glVertex3f(-line_spacing*num_cells/2, i*line_spacing, 0); glVertex3f( line_spacing*num_cells/2, i*line_spacing, 0); } } glEnd(); } void timer_func (int dummy) { view_azimuth += 5; glutTimerFunc(100, &timer_func, 0); glutPostRedisplay(); } void display_func (void) { glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslated(0.0,0.0,-view_distance); glRotated(-view_elevation, 1.0, 0.0, 0.0); glRotated( view_azimuth, 0.0, 0.0, 1.0); glTranslated(-view_x, -view_y, -view_z); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); draw_grid(); glutSwapBuffers(); } void reshape_func (int w, int h) { glViewport(0, 0, (GLsizei)w, (GLsizei)h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(30, (GLfloat)w/(GLfloat)h, clip_near, clip_far); } int main (int argc, char *argv[]) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA); glutInitWindowSize(300, 300); glutCreateWindow("test_program"); glutDisplayFunc(display_func); glutReshapeFunc(reshape_func); glutTimerFunc(100, &timer_func, 0); glutMainLoop(); }