Jump to content
  • Advertisement
Sign in to follow this  
Ethangar

PixelShaderVersion For PS_2_B cards?

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

Quick question: I need to know the PixelShaderVersion numbers for Raedon X# series graphics cards (which support pixel shader 2b as I understand). Is is Version(2, 2) or perhaps (2, 0, 2)? I don't have an ATI card to test this with.

Share this post


Link to post
Share on other sites
Advertisement
Hmm, I was able to get ahold of a friend who had a Radeon X850 (which should be a Pixel Shader 2b card). But, his PixelShaderVersion was 2.0

What is the trick to having your program figure out if you have Pixel Shader 2, 2a, or 2b?

Share this post


Link to post
Share on other sites
You can use D3DXGetPixelShaderProfile, which takes in a D3D device ptr, to get the highest HLSL profile supported by the current device. Will report ps2.x variants as well - not sure about 2.0b, i'm still using summer 2004, the docs say it reports up to 2.0a, so newer sdks should report 2.0b.

at a lower level, the D3DCaps structure has a PixelShaderVersion field, which can be deciphered with the D3DPS_VERSION macro. again, check the latest sdk to see which variants are reported. i would guess that 2.0b would be major version=2, minor version=2.

Share this post


Link to post
Share on other sites
Quote:
Original post by Ethangar
Hmm, I was able to get ahold of a friend who had a Radeon X850 (which should be a Pixel Shader 2b card). But, his PixelShaderVersion was 2.0


Yea, that stumped me, too. I looked up the X600 and X800 in a caps database yesterday, and both reported a PS version of 2.0. I thought that the dbase was wrong, but apparently not [smile]

Quote:

not sure about 2.0b, i'm still using summer 2004, the docs say it reports up to 2.0a, so newer sdks should report 2.0b.

Yep, the new docs indicate support for ps_2_b. I'm not quite sure how it figures that out though, since the PS version is only 2.0. Like you suggested, I would have thought it was 2.2.

Share this post


Link to post
Share on other sites
ps_2_a and ps_2_b are HLSL concepts. The D3D runtime represents them as pixel shader 2.0 with caps set for various features. From the documentation for D3DXGetPixelShaderProfile:

ps_2_b
Same as the ps_2_0 profile, with the following additional capabilities available for the compiler to target:
Number of Temporary Registers (r#) is greater than or equal to 32.
No limit for the number of texture instructions.

xyzzy

Share this post


Link to post
Share on other sites
D3DXGetPixelShaderProfile looks to be exactly what I need, thanks everyone. Now I just need to find its Managed DirectX equivalent.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!