[Mesa-dev] [PATCH] i965: Fix glCompressedTexSubImage2D offsets for ETC textures.

Ian Romanick idr at freedesktop.org
Thu Jan 3 11:44:01 PST 2013


On 01/02/2013 11:25 AM, Paul Berry wrote:
> On 2 January 2013 10:55, Ian Romanick <idr at freedesktop.org
> <mailto:idr at freedesktop.org>> wrote:
>
>     On 12/29/2012 11:50 AM, Paul Berry wrote:
>
>         This patch fixes intel_miptree_unmap_etc() (which decompresses ETC
>         textures to linear) to pay attention to map->x and map->y when
>         writing
>         to the destination image.  Previously these values were ignored,
>         causing the xoffset and yoffset parameters passed to
>         glCompressedTexSubImage2D() to be ignored.
>
>
>     I recall that ETC has additional restrictions on subimage updates.
>       Do we correctly respect those?
>
>
> Yes, I believe what Mesa implements is correct:
>
> For ETC1, subimage updates are prohibited, and we respect that by
> returning true from compressedteximage_only_format().
>
> For ETC2, subimage updates are allowed provided that xoffset, yoffset,
> height, and width are aligned to 4x4 block boundaries, and we check that
> properly in error_check_subtexture_dimensions().

Great.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>



More information about the mesa-dev mailing list