Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#26379 - [xf86-video-ati] Big memory usage of r300g ati driver on OpenGL operation

Attached to Project: Arch Linux
Opened by Sergey (Genuine) - Monday, 10 October 2011, 16:08 GMT
Last edited by Andreas Radke (AndyRTR) - Tuesday, 28 February 2012, 17:54 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
OpenGL applications use a lot of memory when GL_POLYGON_OFFSET_FILL is enabled. Here is example of simple code that uses around 600Mb on my system (Qt-Creator project is attached):
void GLWidget::paintGL()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glTranslated(0.0, 0.0, -1.0);
glRotatef( rotX, 1, 0, 0 );
glRotatef( rotY, 0, 1, 0 );
glRotatef( rotZ, 0, 0, 1 );
static const int coords[6][4][3] = {
{ { +1, -1, -1 }, { -1, -1, -1 }, { -1, +1, -1 }, { +1, +1, -1 } },
{ { +1, +1, -1 }, { -1, +1, -1 }, { -1, +1, +1 }, { +1, +1, +1 } },
{ { +1, -1, +1 }, { +1, -1, -1 }, { +1, +1, -1 }, { +1, +1, +1 } },
{ { -1, -1, -1 }, { -1, -1, +1 }, { -1, +1, +1 }, { -1, +1, -1 } },
{ { +1, -1, +1 }, { -1, -1, +1 }, { -1, -1, -1 }, { +1, -1, -1 } },
{ { -1, -1, +1 }, { +1, -1, +1 }, { +1, +1, +1 }, { -1, +1, +1 } }
};
for (int j = 0; j < 100; j++)
{
glEnable(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(1.0, 1.0);
for (int i = 0; i < 6; ++i) {
glColor3ub( i*20+col, 100+i*10+col, i*42+col );
glBegin(GL_QUADS);
for (int j = 0; j < 4; ++j) {
glVertex3d(0.2 * coords[i][j][0], 0.2 * coords[i][j][1], 0.2 * coords[i][j][2]);
}
glEnd();
}
glDisable(GL_POLYGON_OFFSET_FILL);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
for (int i = 0; i < 6; ++i) {
glColor3ub( 0, 0, 0 );
glBegin(GL_QUADS);
for (int j = 0; j < 4; ++j) {
glVertex3d(0.2 * coords[i][j][0], 0.2 * coords[i][j][1], 0.2 * coords[i][j][2]);
}
glEnd();
}
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
if(col > 200) col = 0;
col++;
rotX += 1.1;
rotY += 1.4;
rotZ += 1.6;
}

This bug disappears when I export LIBGL_ALWAYS_SOFTWARE=1.

Additional info:
Arch x86.
$ glxinfo
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
GLX version: 1.4
OpenGL vendor string: X.Org R300 Project
OpenGL renderer string: Gallium 0.4 on ATI RS600
OpenGL version string: 2.1 Mesa 7.11
OpenGL shading language version string: 1.20

Steps to reproduce:
Just compile and launch attached application.
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Tuesday, 28 February 2012, 17:54 GMT
Reason for closing:  Upstream
Additional comments about closing:  no response, a new mesa releases are out meanwhile.
Comment by Jelle van der Waa (jelly) - Saturday, 14 January 2012, 12:47 GMT
This bug sounds upstream, ask the opensource ati driver devs about it
Comment by Laurent Carlier (lordheavy) - Saturday, 14 January 2012, 13:00 GMT
Also, it's related to ati-dri package (r300_dri.so)

Loading...