[Mesa-dev] [PATCH 16/16] st/nine: Rework texture data allocation
Ilia Mirkin
imirkin at alum.mit.edu
Sun Apr 26 07:54:30 PDT 2015
On Sun, Apr 26, 2015 at 4:26 AM, Axel Davy <axel.davy at ens.fr> wrote:
> Le 25/04/2015 00:21, Ilia Mirkin a écrit :
>>
>> On Fri, Apr 24, 2015 at 6:13 PM, Axel Davy <axel.davy at ens.fr> wrote:
>>>
>>> Le 25/04/2015 00:02, Ilia Mirkin a écrit :
>>>>
>>>>
>>>> I'm having trouble understanding what you're changing here... perhaps
>>>> a better commit description could go a ways to clearing things up?
>>>> Were you allocating it a level at a time before? How did that work, I
>>>> don't see a per-level structure... I'm guessing there's a bit more
>>>> going on here.
>>>>
>>> Yes, we were allocating per level, whereas there we allocate once for all
>>> levels, and get the offset.
>>>
>>> The nine_format_get_p_offset are called once per texture creation for
>>> every
>>> level, after the pointers are cached in the surfaces associated to the
>>> levels.
>>
>> So that'll be n^2 calls to the size function. Which is suboptimal.
>>
> What do you suggest instead ? Using a dynamically allocated array containing
> the offsets ? Or is there a better way ?
Doesn't have to be dynamically allocated... there's a maximum number
of levels, right? What's the max texture size?
More information about the mesa-dev
mailing list