PDA

View Full Version : Vertex Caching



Groovounet
01-07-2008, 07:04 AM
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

Hampel
01-07-2008, 07:36 AM
have a look here: http://home.comcast.net/~tom_forsyth/papers/fast_vert_cache_opt.html

Groovounet
01-07-2008, 02:07 PM
Thank.

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

Dark Photon
01-07-2008, 07:20 PM
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 (http://www.clootie.ru/delphi/dxtools.html).

NVidia Developer Newsletter: Issue #5 (see Coding Tip section) (http://developer.nvidia.com/object/devnews005.html) NvTriStrip library (http://developer.nvidia.com/object/nvtristrip_library.html) I3D'06: Triangle Order Optimization for Efficient Graphics Hardware Computational Culling (http://www.ati.com/developer/i3d2006/I3D2006-Sander-TOO.pdf) Old NVidia Vertex Cache Optimization PPT ('99) (http://developer.nvidia.com/object/vertex_cache_opt.html)

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 (http://www.clootie.ru/delphi/dxtools.html) page confirms this (for some date in the past at least).

Warshade
01-08-2008, 08:37 AM
I've seen a discussion regarding this topic at:

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

Hope this helps :)

Jackis
01-08-2008, 09:42 AM
VCacheDetector is quite funny program )))
It reports, that my 8800 has no vertex cache presented :)

knackered
01-08-2008, 12:06 PM
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.

Icek
01-08-2008, 02:18 PM
NvTriStrip can create only triangle strips, right? is there a library which can optimize list of single triangles for vertex post cache?

Groovounet
01-08-2008, 02:51 PM
With my GeForce 8800 GTS VCacheDetector reports 32... I'm a bit surprise too.

Lot of valuable information... thanks everyone!

Dark Photon
01-08-2008, 02:55 PM
NvTriStrip can create only triangle strips, right?
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 (http://home.comcast.net/~tom_forsyth/papers/fast_vert_cache_opt.html) 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.

jwatte
01-08-2008, 02:59 PM
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.

martinsm
01-08-2008, 03:31 PM
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.

knackered
01-08-2008, 07:31 PM
instead. Faster, better, cheaper, not geared toward a specific vertex cache size, doesn't care about topology/connectivity, etc.
Remind me again how $12,500 is cheaper than free?

Icek
01-08-2008, 10:34 PM
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?

Dark Photon
01-09-2008, 08:23 AM
Faster, better, cheaper, ...etc.
Remind me again how $12,500 is cheaper than free?
Can't tell if you're kidding or not, knackered. Implementing a known fast and robust algorithm from pseudocode off a web page (http://home.comcast.net/~tom_forsyth/papers/fast_vert_cache_opt.html) = pretty near free. ...or maybe your hourly rate is a whole lot higher than mine ;)

No, we're not talking Granny (http://www.radgametools.com/granny.html) here, though that'll work too.

Dark Photon
01-09-2008, 08:52 AM
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?
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.

Nicolai de Haan BrÝgger
01-09-2008, 09:36 AM
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

knackered
01-09-2008, 05:05 PM
is this the most links posted as a reply ever?