Archived

This topic is now archived and is closed to further replies.

kobingo

Hardware slower than software?

Recommended Posts

I got a P4 2400 Mhz, 512 RAM, Radeon 9700 Pro. When I create my device with D3DCREATE_HARDWARE_VERTEXPROCESSING it is just a little bit slower than D3DCREATE_SOFTWARE_VERTEXPROCESSING. How come? I thought that hardware vertexprocessing was faster if the graphic card supports it. [edited by - kobingo on September 2, 2003 3:41:48 AM]

Share this post


Link to post
Share on other sites
hmmm, wouldnt really know how to help you, but have look at some of ur direct x settings in the direct X control panel. Type dxdiag in Run or go to Control panel and then click DirectX Icon and then have a look and play around with some settings....sometimes if things are not correctly configured it may cause problems, such as what ur hardware can do...but Im not sure about that so I hope some one can come up with better help for you.

Dark Star
UK

(loves cross-posting because it works)

Share this post


Link to post
Share on other sites
I''m not doing anything fancy at all.

I''m just drawing about 30 quads with a texture, I have only one light (pointlight) in the scene.

However, on my work computer: P4 1500 Mhz GeForce 2 MX my fps increases with D3DCREATE_HARDWARE_VERTEXPROCESSING (from 300 to 500 fps).

What''s up with this?

Share this post


Link to post
Share on other sites
The sdk states that software vertex processing may be faster on some systems than hardware.
However, look it this way: if running a moderately-sized game, your processor has usually lot more to do besides calculating the geometry.

Share this post


Link to post
Share on other sites
30 quads is a ridiculous number of primitives.
You are definitely not TnL or shader limited at this level. SW might be faster, since the video card probably has a bit less setup.

Try rendering a million polys. In HW you can expect more than 60 fps. is SW, it''s another story.

Share this post


Link to post
Share on other sites
quote:
Original post by kobingo
I''m not doing anything fancy at all.

I''m just drawing about 30 quads with a texture, I have only one light (pointlight) in the scene.

However, on my work computer: P4 1500 Mhz GeForce 2 MX my fps increases with D3DCREATE_HARDWARE_VERTEXPROCESSING (from 300 to 500 fps).

What''s up with this?

If you''re doing 30 calls to DrawPrimitive, then you''re only sending 2 triangles per call. This is incredibly inefficient no matter what kind of processing you use, but hardware will be hit harder by it.

Hardware processing likes to be fed 100s if not 1000s of vertices per call.


Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites
Remember that when you start rendering large numbers of polygons (hundreds of thousands per frame or more) then you''ll not only have to worry about transform speed but also AGP transfer time. By having static vertices transformed by the hardware, they can stay in video memory instead of making the card wait for vertex data to be transfered over the bus. And of course having more CPU time for the game is a good thing...

Share this post


Link to post
Share on other sites
quote:

If you''re doing 30 calls to DrawPrimitive, then you''re only sending 2 triangles per call. This is incredibly inefficient no matter what kind of processing you use, but hardware will be hit harder by it.

Hardware processing likes to be fed 100s if not 1000s of vertices per call.



But if I want to render 1000 vertices at once, isn''t it so that I have to lock the vertexbuffer and stuff in the new coordinates every frame then? Isn''t it better to use SetTransform() than locking all the time?

Share this post


Link to post
Share on other sites
quote:
Original post by kobingo
But if I want to render 1000 vertices at once, isn''t it so that I have to lock the vertexbuffer and stuff in the new coordinates every frame then? Isn''t it better to use SetTransform() than locking all the time?


DrawPrimitive also has a a lot of overhead. The question is this: Is the overhead of 1 DrawPrimitive plus 1 SetTransform higher or lower than 4 matrix multiplies plus copying 4 vertices to video RAM?

Share this post


Link to post
Share on other sites