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

Chad Versace chad.versace at linux.intel.com
Tue Sep 25 12:02:34 PDT 2012


On 09/21/2012 03:18 AM, Tapani Pälli wrote:
> Hello;
> 
> On 09/20/2012 11:01 PM, Chad Versace wrote:
>> Adding Tapani to the CC list. Removing Oliver.
>>
>> On 09/20/2012 09:55 PM, Chad Versace wrote:
>>> 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().
> 
> With GLBenchmark2.5 on Android including the patch I'm still having some
> issues within etc1 unpack and I think these are related to the size of
> the buffer which is eventually given for '_mesa_etc1_unpack_rgba8888',
> I'll try to come up with a smaller test case for this if possible and
> step with gdb for some more details. This patch looks proper and correct
> for me, maybe these issues left originate from some place else.

What are the properties of the texture image for which etc1 unpack fails? Level,
base width, base height, level width, level height? With that information, I
could also create a small testcase and start investigating.

By the way, I just posted a v2 of the patch.



More information about the mesa-dev mailing list