mesa/copyimage: allow width/height to not be multiples of block
For compressed textures, the image size is not necessarily a multiple of the block size (e.g. the last mip levels). Section 18.3.2 (Copying Between Images) of the OpenGL 4.5 Core Profile spec says: An INVALID_VALUE error is generated if the dimensions of either subregion exceeds the boundaries of the corresponding image object, or if the image format is compressed and the dimensions of the subregion fail to meet the alignment constraints of the format. and Section 8.7 (Compressed Texture Images) says: An INVALID_OPERATION error is generated if any of the following conditions occurs: * width is not a multiple of four, and width + xoffset is not equal to the value of TEXTURE_WIDTH. * height is not a multiple of four, and height + yoffset is not equal to the value of TEXTURE_HEIGHT. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92860 Signed-off-by:Ilia Mirkin <imirkin@alum.mit.edu> Acked-by:
Alex Deucher <alexander.deucher@amd.com> Reviewed-by:
Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by:
Ian Romanick <ian.d.romanick@intel.com> Cc: mesa-stable@lists.freedesktop.org