Archived

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

GekkoCube

Benefits of D3DUSAGE_SOFTWAREPROCESSING

Recommended Posts

GekkoCube    116
what are the pro''s and the con''s of using this flag parameter for creating vertex buffers or index buffers? if anyone can translate the dx doc''s for me to plain english, id be mighty appreciative and impressed.

Share this post


Link to post
Share on other sites
Raloth    379
pros: runs on slow hardware
cons: makes your game slower than that slow hardware

I wouldn''t use it unless it is absolutely necessary for the game to run.

Share this post


Link to post
Share on other sites
glassJAw    128
Use hardware processing if the device can support it

You can check this in the device caps:

if (deviceCaps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT)
{
//use hardware
} else
{
//use software
}

Share this post


Link to post
Share on other sites
thedo    124
One usage would be Vertex Shaders on a DX7 level piece of HW (ie has HW T+L). Because vertex shaders cannot run in hardware on these cards they need to be compiled and before being run the D3DUSAGE_SOFTWAREPROCESSING should be set to tell DX/GFX Card that the geometry processing will be done off the card. This has the benefit that if your app uses vertex shaders and it targetted at HW T+L (as well as higher) you dont have to run the whole app in SW - you can select only to do it in SW when needed and still use HW T+L for the rest. Be warned however that if this apprach is taken the switch to D3DUSAGE_SOFTWAREPROCESSING is apparently quite expensive - I think S1CA mentioned it being like destroying and creating a new device (and therefore should be batched accordingly - all HW T+L then SW T+L batched into 2 portions of rendering).

Neil

WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!

Share this post


Link to post
Share on other sites