Vertex Caching

Hi,

I am looking for some information about vertex caching. I know what it does, but how many vertices could be cached to which cards? Is it depended of the number of components per vertex?

Thanks

have a look here: http://home.comcast.net/~tom_forsyth/papers/fast_vert_cache_opt.html

Thank.

I already found this. Currently, I’m more interested by links from ATI and nVidia… but I’m not sure there is any…

Not sure why. Tom’s is more useful IMO, but anyway… See the first reference for an answer to your question for older NVidia cards. And GeForce 5-6 = 24, GeForce 7 = 45, … If you need more data, use VCacheDetector.

Is it depended of the number of components per vertex?

AFAIK, no – meaning sufficient space is present in the cache per entry to store the maximum number of vertex attributes. However, I don’t work for a vendor so could be wrong. Though I note that the old VCacheDetector page confirms this (for some date in the past at least).

I’ve seen a discussion regarding this topic at:

http://www.OpenTK.com/node/121

Hope this helps :slight_smile:

VCacheDetector is quite funny program )))
It reports, that my 8800 has no vertex cache presented :slight_smile:

http://tomsdxfaq.blogspot.com/2005_12_01_archive.html

D3DXOptimizeFaces seems to give me a good boost - win32 specific though.
This is one of the reasons why GL3 needs geometry display lists, to query the cache and re-organise the indices/vertices.

NvTriStrip can create only triangle strips, right? is there a library which can optimize list of single triangles for vertex post cache?

With my GeForce 8800 GTS VCacheDetector reports 32… I’m a bit surprise too.

Lot of valuable information… thanks everyone!

It’ll generate strips or lists. However don’t use it. It’s slow, buggy, and optimizes for a specific vertex cache size (kills you if your cache is smaller). I only linked to NvTriStrip because Groovounet wanted NVidia/ATI links for some reason.

Use Tom’s optimizer instead. Faster, better, cheaper, not geared toward a specific vertex cache size, doesn’t care about topology/connectivity, etc.

is there a library which can optimize list of single triangles for vertex post cache?

Tom’s will.

Just using a scale-less weight function in “how recently was the vertex used” and sorting your triangle list greedily by picking the highest-weight triangle next will give you pretty good results. And, because of the scale-less weight function, it sorts as well for small and large vertex caches.

I also have have archieved nice speed improvement using Tom Forsyth algorithm for reordering vertices. It is very easy to implement and it doesn’t care about vertex cache size. And as a bonus algorithm is very fast.

Remind me again how $12,500 is cheaper than free?

So, I should create array of vcache_vertex_data, compute their VertexData->NumActiveTris and VertexData->CacheTag, then run that function to compute score and then sort along that score? If so, how do I get VertexData->CacheTag?

Remind me again how $12,500 is cheaper than free? [/QUOTE]
Can’t tell if you’re kidding or not, knackered. Implementing a known fast and robust algorithm from pseudocode off a web page = pretty near free. …or maybe your hourly rate is a whole lot higher than mine :wink:

No, we’re not talking Granny here, though that’ll work too.

Recommend reading and understanding the entire page. You’re gonna need a little more than just the vertex scoring function to get a working optimizer (see the Runtime Efficiency section in particular).

To your specific question, it’s the continually changing position of the vertex in the simulated cache, initialized to -1 at the start and updated when the vertex gets “dirty” during optimization.

Okay. I just wanted to suggest this thread from gamedev.net that discusses implementing Tom Forsyth’s algorithm:

http://www.gamedev.net/community/forums/topic.asp?topic_id=467240

is this the most links posted as a reply ever?