# HG changeset patch # User reimar # Date 1228545894 0 # Node ID fa17a5971df6f1b554ce3f69fa54d2fc63f6f346 # Parent aea4c94e42a52bcf2eba63175a7ae591c6dd15d9 More possible fixes for mesa-buffer mode. diff -r aea4c94e42a5 -r fa17a5971df6 libvo/vo_gl.c --- a/libvo/vo_gl.c Sat Dec 06 06:41:36 2008 +0000 +++ b/libvo/vo_gl.c Sat Dec 06 06:44:54 2008 +0000 @@ -178,6 +178,7 @@ *texh *= 2; } if (ati_hack) *texw = (*texw + 511) & ~511; + if (mesa_buffer) *texw = (*texw + 63) & ~63; } //! maximum size of custom fragment program @@ -702,7 +703,7 @@ mpi->width = texture_width; mpi->height = texture_height; } - if (mesa_buffer) mpi->width = (mpi->width + 63) & ~63; + if (mesa_buffer) mpi->width = texture_width; mpi->stride[0] = mpi->width * mpi->bpp / 8; needed_size = mpi->stride[0] * mpi->height; if (mesa_buffer) { @@ -794,8 +795,10 @@ planes[0] = mpi->planes[0]; planes[1] = mpi->planes[1]; planes[2] = mpi->planes[2]; mpi_flipped = stride[0] < 0; if (mpi->flags & MP_IMGFLAG_DIRECT) { - if (mesa_buffer) glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, 1); - else { + if (mesa_buffer) { + glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, 1); + w = texture_width; + } else { intptr_t base = (intptr_t)planes[0]; if (ati_hack) { w = texture_width; h = texture_height; } if (mpi_flipped)