[Mesa-dev] [PATCH] intel: Fix size of temporary etc1 buffer (v2)

Eric Anholt eric at anholt.net
Tue Sep 25 19:22:22 PDT 2012


Chad Versace <chad.versace at linux.intel.com> writes:

> Fixes valgrind errors in piglit test
> oes_compressed_etc1_rgb8_texture-miptree: an invalid write in
> _mesa_store_compressed_store_texsubimage() at line 4406 and invalid reads
> in texcompress_etc_tmp.h:etc1_parse_block().
>
> The calculation of the size of the temporary etc1 buffer allocated by
> intel_miptree_map_etc1() was incorrect. Sometimes the allocated buffer was
> too small, sometimes too large.  This patch corrects the size to that
> expected by _mesa_store_compressed_store_texsubimage().
>
> v2: Don't handroll image size calculations; use _mesa_format_row_stride
>     and _mesa_format_image_size.

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120925/18304e45/attachment.pgp>


More information about the mesa-dev mailing list