Author Topic: DX8 Performance  (Read 2216 times)

0 Members and 1 Guest are viewing this topic.

This is a thread for ideas about how we can improve the performance of DX8 aside from HW TnL.

Currently the single most important optimization we could probably do would be to ensure that we batch up as many polygons (in vertex buffers) as possible before drawing them. We need to get away from DrawPrimitiveUP. EDIT: I've been reading further - big hit on performance is DrawPrimitiveUP combined with the situations where we only send 1 or 2 poly's to be rendered.

My basic idea to do this would be to add a sorting layer between drawing polygons and d3d_DrawPrimitive calls. Essentially we capture all calls to d3d_DrawPrimitive and start loading up a few vertex buffers with data as long as its of one type. When the type changes, we draw the buffer and start loading up a new one. As far as I can tell, this will improve performance as well as making the game friendlier for HW TnL which runs best under such conditions with minimal communication to the graphics card.

Anyone find anything wrong with this or should I go ahead and start implementing it? (this includes complications that I'm probably overlooking)

EDIT: I've just realized that this idea would essentially be very similar to creating a software implemented execute buffer. The real question is, should we do things this way (which is quick and easy to implement relatively) or do a massive overhaul using VB's and such from a very early stage in the pipeline (probably breaking any other API compatibility though without some creative coding)
« Last Edit: November 18, 2002, 05:36:01 am by 383 »

 

Offline RandomTiger

  • Senior Member
  • 211
I was thinking along the lines of once we have HT&L done the vertices can be kept on a on card vertex buffer which should speed things up since they should never need to be system memory.

Your idea might well be worth looking into, batching up vertices for objects that all use the same textures and state probably would help an awful lot.

However I think we should get rid of the bugs first. UP, given the number of different gfx cards you have access to you are in a great positions to make sure DX8 works bug free on other cards.

Checkout bugzilla for details, though I have addressed some of the problems with to much mipmapping and a few other things.
« Last Edit: November 18, 2002, 09:18:50 am by 848 »

 

Offline Scuddie

  • gb2/b/
  • 28
  • I will never leave.
Local dynamic lighting and local HT&L would be nice...  That way glowpoints would be less of a burden.  Will we see better buffering in DX8?
Bunny stole my signature :(.

Sorry boobies.

 
We should. RT - the DX8 vertex buffers are basically card-based buffers. They get put wherever they are needed be that on the card or in system memory, so they should help performance under all circumstances. I'm gonna try for an implementation of my idea, especially now I have an algorithm worked out.