On 09/21/2012 02:46 AM, Eric Anholt wrote:
> Chad Versace <chad.vers...@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().
> 
> You could just use _mesa_format_row_stride() and
> _mesa_format_image_size(), I think.

Nice, I wasn't aware of those functions. I just submitted a v2 that uses them.

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to