Jump to content

  • Log In with Google      Sign In   
  • Create Account


Vertex cache


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 ClementLuminy   Members   -  Reputation: 121

Like
0Likes
Like

Posted 22 May 2006 - 10:03 PM

Hello. I have recently read a few papers about Vertex Caching. It seam to be a quiet easy way to get some performances gain. Here is what i have understand : Suppose you've got an index buffer describing four faces: 0,1,2, 3,4,5, 2,1,4, 1,3,4 (And also suppose that my vertex cache is a 3 Vertex Cache) The only thing needed to use Vertex Cache is to sort the IB this way: 0,1,2, 2,1,4, 1,3,4, 3,4,5 I'm i right ?? Do i need to do any other things ?? Do you know a little library which sort any IB in order to be used with Vertex Chache ?? Thanks a lot .. Clément Vidal

Sponsor:

#2 sirob   Members   -  Reputation: 1180

Like
1Likes
Like

Posted 22 May 2006 - 10:12 PM

The Vertex Cache is on whenever you draw Indexed Primitives. You don't need to enable it or do anything else.

The process you describe would only increase it's effectiveness, not turn it on.

As for a way to get better Cache results, ID3DXMesh has an optimize method that can take a flag to perform Vertex Cache optimizations, which is esentially what you're looking for. You should probably be able to run any mesh you have through that once to get better Cache hits.

Hope this helps.

#3 jollyjeffers   Crossbones+   -  Reputation: 1538

Like
1Likes
Like

Posted 22 May 2006 - 10:57 PM

Yeah, it is pretty much as simple as you said [smile]

I recently put together a vertex cache demo. Read the main article and the follow up for details. The second part has updated code with full examples.

Bare in mind that the cache size changes between different GPU's. Nvidia's earlier chips were 16 elements, the more recent being 24 elements. ATI's appear to be 14 elements - but I dont have any solid evidence for that (damn ATI for not supporting VCache queries [flaming]).

Quote:
Original post by ClementLuminy
Do you know a little library which sort any IB in order to be used with Vertex Chache ??
As sirob suggested, you've got the Optimize methods for ID3DXMesh... but you've also got D3DXOptimizeFaces() and D3DXOptimizeVertices() for non-mesh geometry.

hth
Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

#4 sirob   Members   -  Reputation: 1180

Like
0Likes
Like

Posted 22 May 2006 - 11:25 PM

Quote:
Original post by jollyjeffers
As sirob suggested, you've got the Optimize methods for ID3DXMesh... but you've also got D3DXOptimizeFaces() and D3DXOptimizeVertices() for non-mesh geometry.

Oh, that's new to me :).


#5 jollyjeffers   Crossbones+   -  Reputation: 1538

Like
0Likes
Like

Posted 22 May 2006 - 11:58 PM

Quote:
Original post by sirob
Quote:
Original post by jollyjeffers
As sirob suggested, you've got the Optimize methods for ID3DXMesh... but you've also got D3DXOptimizeFaces() and D3DXOptimizeVertices() for non-mesh geometry.

Oh, that's new to me :).
The aforementioned article and code has a version that uses these two functions (contributed by Eyal 'ET3D' Teler).

The re-ordering required is fairly unintuitive though, so they're not the simplest functions to work with....

Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS