Jump to content
  • Advertisement
Sign in to follow this  
sbroumley

CPU hit when using D3DCREATE_MIXED_VERTEXPROCESSING

This topic is 4822 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've created my d3d device using D3DCREATE_MIXED_VERTEXPROCESSING so that indexed vertex blending skinning works (it isn't supported by the hardware on my gpu card). The problem is, it slows down my rendering big time compare to using D3DCREATE_HARDWARE_VERTEXPROCESSING, even when I'm not drawing any skinned objects. I'm also calling "g_pd3dDevice->SetSoftwareVertexProcessing( FALSE )" on all geometry that doesn't use skinning, but this makes no difference. Has anyone else seen this problem? Am I missing a flag/call somewhere when creating vertex buffers or drawing primitives? What do I need to do, to force hardware T&L for non-skinned objects? thanks Steve

Share this post


Link to post
Share on other sites
Advertisement
I've not used mixed-mode before so I don't know why your performance was affected, but all vertex buffers that were created without the D3DUSAGE_SOFTWAREPROCESSING usage will be hardware processed.

Do you get any interesting debug output?

Share this post


Link to post
Share on other sites
How often are you calling SetSoftwareVertexProcessing() per frame ?

It's an expensive call, you should only be calling it 1-2 times per frame...


As Coder says, the other thing to check is that all buffers used with a particular type of vertex processing are created for that type of vertex processing (even if it requires duplicating buffers which are used by both types).

Share this post


Link to post
Share on other sites
I tracked down the problem. When I was creating the device it was failing because I was also using the "D3DCREATE_PUREDEVICE" flag. My creation logic was then falling back to sofware vertex processing("D3DCREATE_SOFTWARE_VERTEXPROCESSING"). Can you explain why I have to do this?

The solution was to just remove the pure device flag. It all works as expected now (fast). I still have to turn on "SetSoftwareVertexProcessing( TRUE )" before rendering my skinned object, and I set it to FALSE when rendering other objects.

thanks for your help
-Steve.

Share this post


Link to post
Share on other sites
The pure device does not support software vertex processing. Therefore, mixed mode is not an option when using the pure device.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!