OSDN Git Service

mesa: fix the compressed TexSubImage size checking code
authorBrian Paul <brianp@vmware.com>
Fri, 26 Apr 2013 19:49:35 +0000 (13:49 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 26 Apr 2013 22:22:30 +0000 (16:22 -0600)
commit49dda2d92f7563057601091e084d0fe154d00d25
tree0d9c12306f034a6a3084dd0f2bfc469d89423412
parentff74cf62b1244bd3bc53e83b685582f73fe6ffdd
mesa: fix the compressed TexSubImage size checking code

Before, we'd incorrectly generate an error if we we tried to
replace a non-4x4 block near the edge of a NPOT compressed texture.
For example, if the dest image was 15 texels wide and xoffset=12
and width=3 we'd incorrectly generate GL_INVALID_OPERATION.

Verified with new tests added to piglit s3tc-errors test.

Note: This is a candidate for the stable branches.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/mesa/main/teximage.c