Sign in to follow this  

Differences between Software/Hardware/Mixed Vertex Processing

This topic is 3298 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

With my rendering engine well under way, it's probably a surprise to be asking such a simple question, but what are the EXACT differences between SoftwareVertexProcessing, HardwareVertexProcessing and MixedVertexProcessing as device creation parameters? I've read a lot of documentation (including the DxSDK) that essentially boilds down to SoftwareVP is done on the CPU, HardwareVP is done on the hardware and MixedVP is a mixture of both. That takes stating the obvious to a new level, but it doesn't really explain exactly WHAT Vertex Processing is done. I just read something in a tutorial that said: SoftwareVP - In general, this is a good option for extremely complicated drawing scenes, since the 3D card will be very busy drawing them, and the CPU will mostly be idle. HardwareVP - This will work well in any basic scenes, since much of a 3D card's potential will be untapped, and video ram is much faster. MixedVP - best of both worlds, use this. What exactly is involved in VertexProcessing in this sense? Does it have more to do with the older Fixed Function Pipeline rather than the programmable pipeline? My initial prototype engine was based on DXUT, but in a bid to get a firm understanding of the setup of DirectX and all its parameters, I've removed it and written my own framework. I've set my parameter to HardwareVertexProcessing. I'm currently using (abstracted) DX9 and VS/PS 3.0 and all my transforming and lighting is done in the vertex and pixel shaders. Does that mean I'm implicitly using HardwareVertexProcessing? If I switch to SoftwareVertexProcessing, isn't that going to cause DirectX to run my shaders via software emulation on the CPU? I would have thought that would have been slower in all cases. Thanks [Edited by - RobMaddison on December 4, 2008 8:25:06 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by RobMaddison
With my rendering engine well under way, it's probably a surprise to be asking such a simple question, but what are the EXACT differences between SoftwareVertexProcessing, HardwareVertexProcessing and MixedVertexProcessing as device creation parameters? I've read a lot of documentation (including the DxSDK) that essentially boilds down to SoftwareVP is done on the CPU, HardwareVP is done on the hardware and MixedVP is a mixture of both.

That takes stating the obvious to a new level, but it doesn't really explain exactly WHAT Vertex Processing is done.

I just read something in a tutorial that said:

SoftwareVP - In general, this is a good option for extremely complicated drawing scenes, since the 3D card will be very busy drawing them, and the CPU will mostly be idle.

HardwareVP - This will work well in any basic scenes, since much of a 3D card's potential will be untapped, and video ram is much faster.

MixedVP - best of both worlds, use this.

What exactly is involved in VertexProcessing in this sense? Does it have more to do with the older Fixed Function Pipeline rather than the programmable pipeline?

My initial prototype engine was based on DXUT, but in a bid to get a firm understanding of the setup of DirectX and all its parameters, I've removed it and written my own framework.
Firstly, that tutorial is lies. You should always use hardware vertex processing. Just about the only exception to that is when the graphics card can't do hardware vertex processing - for instance integrated GPUs (Intel cards) tend not to be able to do any hardware vertex processing, or you might need VS 3.0, but your card can only do VS 1.0.

Quote:
Original post by RobMaddison
I've set my parameter to HardwareVertexProcessing. I'm currently using (abstracted) DX9 and VS/PS 3.0 and all my transforming and lighting is done in the vertex and pixel shaders. Does that mean I'm implicitly using HardwareVertexProcessing? If I switch to SoftwareVertexProcessing, isn't that going to cause DirectX to run my shaders via software emulation on the CPU? I would have thought that would have been slower in all cases.
Yup, exactly. HardwareVertexProcessing means the vertex shader is running on the GPU. Most cards have dedicated hardware for this, so it'll always be faster than software mode.

The point in MixedVP is that you could have a card that can do VS 1.0, and then you could run the VS 1.0 shaders in hardware and the VS 3.0 shaders in software. You call IDirect3DDevice9::SetSoftwareVertexProcessing() (Or whatever the function is called in the language you're using) to toggle between hardware and software vertex processing mode, so you could call SetSoftwareVertexProcessing(FALSE), draw your VS 1.0 stuff, then call SetSoftwareVertexProcessing(TRUE), then draw your VS 3.0 stuff.

In short - always use HardwareVertexProcessing unless the card can't run the shader version you request in hardware, then use SoftwareVertexProcessing.

Share this post


Link to post
Share on other sites

This topic is 3298 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this