Sign in to follow this  

How to check shader model 4.0 support

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

Hi,
I'd like to know whether a graphic card supports shader model 4.0 or not under DirectX 9.0.
My application runs under DX 9.0 and I want to check graphic card performance.
At first, I thought I could check the performance using shader model, but...

Even though my graphic card support DX10 and SM 4.0
if( dwSM < D3DPS_VERSION( 4, 0 ) ) return TRUE;
which means 3.0.
Because the application is created under DX9 I think.

And now I don't know how to distinquish for example
between GeForce 7,000(support SM 3.0) series and over 8,000(support 4.0).
or Is there any method to classify a graphic card under performance?

please teach me.^^
thanks.




Share this post


Link to post
Share on other sites
Here, it's real easy:
[code]
bool DoesGPUSupportSM40WithDX9()
{
return false;
}
[/code]

Joking aside, the point here is that no GPU supports SM4.0 under DX9 because DX9 only supports up to SM3.0. Is there any particular capability you need to query for, or are you just trying to create "DX10+ GPU" code path and you're looking for a way to choose that path? For the former you should probably just check the device caps, but for the latter it shouldn't be too hard to figure it out. The easiest way to do it on Vista or Win7 is to just create a DX11 device, and check the resulting feature level. If you get FEATURE_LEVEL_10_0 or higher, it's a DX10 GPU. On XP you can't do that, so it's more difficult. One obvious route is to query the actual GPU manufacturer and chipset ID via IDirect3D9::GetAdapterIdentifier, but that can be pretty error-prone. A simpler way might be to look for caps that are only supported by DX10-level GPU's. For example only DX10+ GPU's support blending, MSAA, and filtering for floating point texture formats (ATI DX9 GPU's only supported blending and MSAA, while Nvidia DX9 GPU's only supported filtering and blending)

Share this post


Link to post
Share on other sites
I tested filtering, blending, MSAA capability under FP buffer.
And it works.
GeForce 7,600GT doesn't support MSAA under FP buffer.
and 8,600GT supports all.
I don't know any other GPU.
Anyway Thank you very much^^

[quote name='MJP' timestamp='1311024960' post='4837048']
Here, it's real easy:
[code]
bool DoesGPUSupportSM40WithDX9()
{
return false;
}
[/code]

Joking aside, the point here is that no GPU supports SM4.0 under DX9 because DX9 only supports up to SM3.0. Is there any particular capability you need to query for, or are you just trying to create "DX10+ GPU" code path and you're looking for a way to choose that path? For the former you should probably just check the device caps, but for the latter it shouldn't be too hard to figure it out. The easiest way to do it on Vista or Win7 is to just create a DX11 device, and check the resulting feature level. If you get FEATURE_LEVEL_10_0 or higher, it's a DX10 GPU. On XP you can't do that, so it's more difficult. One obvious route is to query the actual GPU manufacturer and chipset ID via IDirect3D9::GetAdapterIdentifier, but that can be pretty error-prone. A simpler way might be to look for caps that are only supported by DX10-level GPU's. For example only DX10+ GPU's support blending, MSAA, and filtering for floating point texture formats (ATI DX9 GPU's only supported blending and MSAA, while Nvidia DX9 GPU's only supported filtering and blending)
[/quote]

Share this post


Link to post
Share on other sites

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