Benefits of D3DUSAGE_SOFTWAREPROCESSING

Started by
2 comments, last by GekkoCube 20 years, 8 months ago
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.
Advertisement
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.
____________________________________________________________AAAAA: American Association Against Adobe AcrobatYou know you hate PDFs...
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
}
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?!?!
WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!

This topic is closed to new replies.

Advertisement