# HG changeset patch # User reimar # Date 1215206367 0 # Node ID 78d837adc71eaceec51effc468439b06992e32c6 # Parent 166bd251be605c121666065ccf6c314946072840 100l: finally understood ATI PBO problem: width must be a power of two. diff -r 166bd251be60 -r 78d837adc71e libvo/vo_gl.c --- a/libvo/vo_gl.c Fri Jul 04 21:16:14 2008 +0000 +++ b/libvo/vo_gl.c Fri Jul 04 21:19:27 2008 +0000 @@ -691,8 +691,11 @@ if (!gl_buffer) GenBuffers(1, &gl_buffer); BindBuffer(GL_PIXEL_UNPACK_BUFFER, gl_buffer); - if (ati_hack) - mpi->width = (mpi->width + 255) & ~255; + if (ati_hack) { + int s = 1; + while (s < mpi->width) s *= 2; + mpi->width = s; + } mpi->stride[0] = mpi->width * mpi->bpp / 8; if (mpi->stride[0] * mpi->height > gl_buffersize) { BufferData(GL_PIXEL_UNPACK_BUFFER, mpi->stride[0] * mpi->height,