Original Post
Feb 7, 2009 at 3:57 PM
Hello, Could somebody explain me what vertex cache is? I can't google it
Feb 7, 2009 at 5:06 PM
Video cards generally have two different vertex caches. One is similar to most other caches, and is the pre-transform cache. This is just a bunch of memory on the chip that's used to store vertex data as it's being fetched. If you fetch a vertex over and over, the GPU can pull the data from the cache (and send it to the vertex shader) instead of reading from main memory. The biggest benefit of the pre-transform cache is that when a vertex is requested, the entire cache line is filled, so the GPU is basically pre-fetching data for subsequent vertices. If you order your vertex buffers correctly, this can speed things up.
You might also expect the cache to help when you try to fetch/transform the same vertex, but the second cache actually handles that better. The post-transform cache actually stores the outputs of the vertex shader for a small (usually less than 20) number of vertices. It usually only works if you're using indexed geometry (the cache is actually based on the index values). If you order your triangles well, you can build new triangles using vertices that are already in the post-transform cache, and the GPU won't have to run the vertex shader on those the second time at all.
There are several good papers explaining how to optimize geometry for the cache. A good place to start is Tom Forsyth's algorithm and article:
http://home.comcast.net/~tom_forsyth/papers/fast_vert_cache_opt.html
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.