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

Tapani Pälli tapani.palli at intel.com
Fri Sep 28 01:10:11 PDT 2012


On 09/25/2012 10:02 PM, Chad Versace wrote:
> 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.

Sorry for the delay, was busy with other things. Actually seems like the
error happens because of intel_region_map fails for a certain texture,
there are multiple succeeded maps and unmaps before this one though, I
will debug some more to find out why we end up in this situation.


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


-- 

// Tapani


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 551 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120928/398f235d/attachment.pgp>


More information about the mesa-dev mailing list