Archived

This topic is now archived and is closed to further replies.

[YANN] Sliding Slot...

This topic is 4950 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

After several attempts at implementing a vertex buffer management system I have yet to find the most optimal solution. Then the sliding slot structure came to mind. I remembered reading about it some time ago and I''m struggling with the proper structures to make it fast enough. I''ve tried it using a binary tree and that isn''t very speedy. When concatenating several nodes into a larger one I need to invalidate some parts of the branch. My current implementation never deletes nodes. It just invalidates them. Maybe this is the error in my implementation. I''ll try that later. If anyone has got a better structure to manage the buffers in then please spill . Thx in advance - Freaky

Share this post


Link to post
Share on other sites
As to how do you want them managed? I''ve implemented my own vertex buffer manager for handling static and dynamic vertex buffers. However I am unsure as to what it is that you want your vertex buffer manager to manage. Could you please elaborate more on what you need it to do?

Share this post


Link to post
Share on other sites
The problem that I have with the sliding slot approche that I have tried to implement is when I need to join slots of the same granularity into a bigger slot.

In order to join two slots, they must follow each other in the vertex buffer. So before join the slots that I have selected, I need to find a way to move the slots so that the are following each other and then collapse the slots in a bigger one but I haven''t found a clean way to do that...

Is there someone that had a similar problem?

Share this post


Link to post
Share on other sites
Yop, I had that problem as well, but my mgr wasn''t very important right when I was working on it so I still haven''t worked on any solutions

If u split the chunks into a binary tree, then you know that you must join children with the same parent (to keep to the binary buddy system, or sliding slot if it works in the same way). Therefore, look in all parents and see if one got two empty children; joining them is simply a matter of removing the children. Otherwise, look for two parents with one empty child each and interchange the data in the children so that one parent gets two empty children. Will require a copy, you could do that over frames if the chunks are huge though.

Only my thoughts for now though...

Share this post


Link to post
Share on other sites
Shaigan: why can''t you just invalidate two slots next to each other? And the combine them. Next frame, when the original data is needed, the manager will see it''s not valid anymore, request a new slot of that side, and recopy the data. I think that''s how it''s normally done.

Share this post


Link to post
Share on other sites
I was thinking of invalidate the next slots but what happen if for example I need to join 2 64K slots into a 128K slot but the next slot is not a 64K slot?

When my video memory manager makes several joins/splits, the vertex buffer fragment itself. Meaby I could defragment the vertex buffer so I group slots with the same granularity together but that require copying the content of the slots.

[edited by - shaigan on May 28, 2004 6:25:51 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by Shaigan
I was thinking of invalidate the next slots but what happen if for example I need to join 2 64K slots into a 128K slot but the next slot is not a 64K slot?



No it might not be a 64K slot at the moment, but it will be a 64K slot that has been split into smaller slots say 32K and two 16K. You simply have to recurse down the tree combining slots to then get the required contingent memory block.

James

Share this post


Link to post
Share on other sites