[Intel-gfx] I965 Xorg lockup with VBOs?
Peter Clifton
pcjc2 at cam.ac.uk
Mon Feb 2 05:16:46 CET 2009
Hi,
Just thought I'd ping this log here.. I'm still learning GL, and I
"thought" had successfully mapped a vertex buffer in order to render
some triangles. It works, however, I managed to cause a lockup in the
Xorg server with it twice now..
The backtrace is:
#0 0xb807f430 in __kernel_vsyscall ()
#1 0xb7d04ce9 in ioctl () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7b0aadd in drmIoctl () from /usr/lib/libdrm.so.2
#3 0xb7b0aee2 in drmCommandNone () from /usr/lib/libdrm.so.2
#4 0xb7aa115f in I830BlockHandler (i=0, blockData=0x0, pTimeout=0xbfb9ace8,
pReadmask=0x81f73e0) at ../../src/i830_driver.c:2623
#5 0x0817bf1b in AnimCurScreenBlockHandler (screenNum=0, blockData=0x0,
pTimeout=0xbfb9ace8, pReadmask=0x81f73e0) at ../../render/animcur.c:222
#6 0x08144eb8 in compBlockHandler (i=0, blockData=0x0, pTimeout=0xbfb9ace8,
pReadmask=0x81f73e0) at ../../composite/compinit.c:158
#7 0x08091088 in BlockHandler (pTimeout=0xbfb9ace8, pReadmask=0x81f73e0)
at ../../dix/dixutils.c:384
#8 0x081318a4 in WaitForSomething (pClientsReady=0xa3618f8)
at ../../os/WaitFor.c:215
#9 0x0808d18e in Dispatch () at ../../dix/dispatch.c:367
#10 0x080721bd in main (argc=10, argv=0xbfb9ae34, envp=Cannot access memory at address 0x6460
Nothing untoward in the Xorg log or dmesg output as far as I could see,
but I've attached the Xorg.log
The rendering code I'm using sets the buffer up like this:
void
hidgl_init_triangle_array (triangle_buffer *buffer)
{
buffer->triangle_count = 0;
buffer->coord_comp_count = 0;
glEnableClientState (GL_VERTEX_ARRAY);
glGenBuffers (1, &buffer->vbo_name);
glBindBuffer (GL_ARRAY_BUFFER, buffer->vbo_name);
glBufferData (GL_ARRAY_BUFFER, TRIANGLE_ARRAY_BYTES, NULL, GL_STATIC_DRAW);
buffer->triangle_array = glMapBuffer (GL_ARRAY_BUFFER, GL_WRITE_ONLY);
{
I then stuff triangles into the buffer, during the various drawing
callbacks. Once I've filled the buffer, or have to change some state
(e.g. colour), my drawing code does this:
void
hidgl_flush_triangles (triangle_buffer *buffer)
{
if (buffer->triangle_count == 0)
return;
glUnmapBuffer (GL_ARRAY_BUFFER);
glVertexPointer (2, GL_FLOAT, 0, NULL);
glDrawArrays (GL_TRIANGLES, 0, buffer->triangle_count * 3);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glDeleteBuffers (1, &buffer->vbo_name);
hidgl_init_triangle_array (buffer);
}
I realise it might not be ideal (performance wise?) to glGenBuffers and
glDeleteBuffers with each flush, and that I've probably been a noob
somewhere along the lines with the coding.. but AIUI, I'm not supposed
to be able to deadlock the X server in doing so, right?
I am running compiz at the moment.. if that is relevant.
Best regards,
Peter Clifton
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Xorg.0.log
Type: text/x-log
Size: 26410 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090202/e7cbb5a1/attachment.bin>
More information about the Intel-gfx
mailing list