Home » Community » Forums » DirectX and XNA » PixelShaderVersion For PS_2_B cards?
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic


 Last Thread Next Thread 
 PixelShaderVersion For PS_2_B cards?
Post New Topic  Post Reply 
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.

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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?

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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.

 User Rating: 1077   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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

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.


Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )

 User Rating: 1712   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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

 User Rating: 1138   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

D3DXGetPixelShaderProfile looks to be exactly what I need, thanks everyone. Now I just need to find its Managed DirectX equivalent.

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: