RussSchultz said:The cache is post T&L. Its for skipping vertices that are shared between triangles, not for remembering vertices from the last frame.
Its relatively small as shown in the previous post, which is why fans and strips are such good practice in speeding up the geometry. They re-use a lot of vertices, and if your strip zig-zags are short enough you can get some triangles for much cheaper .
Either that or they need to be part of the same primitive (strip, fan)Zephyr said:Another important question:
Whether NV2x need indexed primitives to use its vertex cache or not?
thx
I don't see that what you are asking for is practical.That is to say the implementation of vertex cache in NV2x is not a true transparent VC, right? If so, I think it is not a smart choice.
RussSchultz said:About it being a smart choice, ponder whether or not you can effectively (and cost effectively) determine if a vertex is identical to one in the cache.
I don't know for sure, but one can imagine that comparing an index number is much cheaper than comparing all the parameters of the pretransformed index for indentity.
To get a good tri/vert ratio from strips/fans you need to have long strips which could imply that, for a decent sized model, a particular vertex won't reappear until quite a number of vertices have passed through the system.Zephyr said:Sure, an implementation using indexed primitives is cheeper, but old games or applications, even if they used a good meshing data, also cannot get any benefits from the vertex cache in NV2x.
Simon F said:I don't see that what you are asking for is practical.That is to say the implementation of vertex cache in NV2x is not a true transparent VC, right? If so, I think it is not a smart choice.
IIRC with strips or fans you simply pack the vertices contiguously and, with the exception of the first two vertices, each vertex implicitly defines a triangle. By default you get N/(N+2) triangles per vertex for a strip/fan with N vertices.
Obviously the strip/fan scheme on its own can't achieve better than 1 Tris/Vert, whereas indexed triangles typically can do much better, say around 2 Tris/Vert.
The question is, "How would you make a cache scheme work with raw strip/fan data?". You'd have to compare every incoming vertex (which is a lot of data) with the original vertex data of all the verts you have in the cache in order to identify a match. Frankly, that would be silly waste of silicon when all the developer has to do is used indexed triangle lists - the HW then only has to compare indices.
Simon F said:To get a good tri/vert ratio from strips/fans you need to have long strips which could imply that, for a decent sized model, a particular vertex won't reappear until quite a number of vertices have passed through the system.Zephyr said:Sure, an implementation using indexed primitives is cheeper, but old games or applications, even if they used a good meshing data, also cannot get any benefits from the vertex cache in NV2x.
The "cache" on the chips is typically quite small and so in these situations it's unlikely to help much. Note that mesh models usually have to undergo some processing to get the order 'optimal'. For example, a recently published paper used the equivalent of a space-filling curve to re-order the polys which gave good results irrespective of the cache size. (OTOH I think one the IHV's tools for mesh optimisation is tuned to a specific cache size/behaviour).
MDolenc said:No IHV does that (prove me wrong if anyone does that). It's just way to far from being practical.
What you are forgetting is that an indexed system with cache can greatly reduce the transfer of data into the chip and, as we all should know, bandwidth is a valued commodity. Your proposed scheme would not have this benefit.Zephyr said:Strip and fan, especially strip, are the key to save both memory size and transfer size. About index, it only save memory size and even enlarge transfer size. If using well mashed strips, both indexed vertices and non-indexed vertices can get same vertex cache hit rates if vertex cache doesn't need indexed primitives..