Archived

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

aker_jus

Stateblock supported cards?

Recommended Posts

Hello, I know that if a device does not support state blocks in hardware, the runtime will propably emulate them, which might cause performance penalties. So, my question is, which cards support them efficiently? I guess that Geforce2 class or higher cards, should support them, am I correct?

Share this post


Link to post
Share on other sites
Stateblocks aren''t ever "supported by hardware".

Stateblocks are supported by a DRIVER . So whether or not they''re supported by the driver depends on that particular driver, not the hardware. One driver version for your card might support them, a different driver version might not...

The driver translates from D3D state to hardware specific state - depending on the particular driver, some can cache the hardware result of a bunch of D3D states in the state block - when the stateblock is applied, some translation work can be prevented.


On many chips & drivers, the difference in most cases won''t be amazing - and I''d still suggest (as I did in my reply to a similar topic last night) defaulting to state blocks, but have an advanced user option to use an alternative scheme.

--
Simon O''Connor
ex -Creative Asylum
Programmer &
Microsoft MVP

Share this post


Link to post
Share on other sites
I use stateblocks as a simple way of storing commands (I have a wrapper, though...CEStateBlock). I have a parseable effect file (similar in concept to the D3DX effect files), and store the loaded effects in the state blocks. This allows me to do the expensive parsing of my stuff ahead of time.

I should probably add a way for my state block wrapper to store states in a list and run the list, when actual state block support isn''t available. I didn''t even CONSIDER that some drivers may not support them.

Hmmm...interesting

Josh

Share this post


Link to post
Share on other sites
Old drivers (DX6 days) had extremely flaky support, some actually produced visibly wrong results when you used state blocks.

Newer drivers either support them natively or let D3D record the state - if D3D records the state it''s not much better than a bunch of state set calls (minus the API overhead).

Whether the driver caches the post translation state depends entirely on the drivers - in an ideal world, they should...

Share this post


Link to post
Share on other sites