On 08/04/2017 10:33 AM, Marek Olšák wrote:
On Fri, Aug 4, 2017 at 10:06 AM, Samuel Pitoiset
<samuel.pitoi...@gmail.com> wrote:


On 08/01/2017 09:54 PM, Marek Olšák wrote:

Hi Samuel,

Can you move this slot allocator into a util module? It seems generic
enough that it could be reused for "handle" and "ID" allocations.

Some additional notes:
- a bit array of uin32_t would be better. bool is too large (1 byte).
- "free" is the inverse of "used", so the "used" array is redundant.


Yeah, but we have to keep track of two different arrays. When a texture
handle is destroyed, the ID can be re-used but not right now, because the
GPU can still use the descriptor.

Not true. You can reuse all freed slots immediately if you re-upload
the whole array instead of using WRITE_DATA.

Well, this is true, but re-uploading the whole array is costly...


Marek

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

Reply via email to