diff options
Diffstat (limited to 'libvo/vo_gl.c')
-rw-r--r-- | libvo/vo_gl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index f528bf0233..d2eae5c363 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -691,8 +691,11 @@ static uint32_t get_image(mp_image_t *mpi) { if (!gl_buffer) GenBuffers(1, &gl_buffer); BindBuffer(GL_PIXEL_UNPACK_BUFFER, gl_buffer); - if (ati_hack) - mpi->width = (mpi->width + 63) & ~63; + 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, |