Sign in to follow this  

Pixel shader : fixed type.

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

The partial precision modifier is for choosing whether to use 16-bit floating point (aka the 'half' data type) or 24/32-bit [or better] floating point (aka the 'float' data type). Using the 'half' data type for intermediate values is only a performance win for older nVidia hardware, though using it in vertex data can be a win on all if you're bandwidth bound.

For <= pixel shader 1.4 compile targets, when you specify something as 'float' or 'half' in HLSL, it really gets converted to fixed point format internally (in the device driver when it converts from D3D shader bytecode into native GPU code/set-up and when it uploads/sets constants/state).

You don't lose anything by not being able to explicitly use the 'fixed' data type.

Share this post


Link to post
Share on other sites
Quote:
Original post by S1CA
Using the 'half' data type for intermediate values is only a performance win for older nVidia hardware, though using it in vertex data can be a win on all if you're bandwidth bound.

Interresting.
Beware ! I will test this soon on my ATI X700 ;)

Quote:
Original post by S1CA
For <= pixel shader 1.4 compile targets, when you specify something as 'float' or 'half' in HLSL, it really gets converted to fixed point format internally (in the device driver when it converts from D3D shader bytecode into native GPU code/set-up and when it uploads/sets constants/state).

You don't lose anything by not being able to explicitly use the 'fixed' data type.

Ok, I imagine it's possible however to choose the type in asm shaders ?

Anyway, Thank for Reply.

Share this post


Link to post
Share on other sites
Quote:
Original post by Woodchuck
Quote:
Original post by S1CA
Using the 'half' data type for intermediate values is only a performance win for older nVidia hardware, though using it in vertex data can be a win on all if you're bandwidth bound.

Interresting.
Beware ! I will test this soon on my ATI X700 ;)


Well that was the story last time I spoke to Richard Huddy from ATI developer relations about partial precision [wink].


Quote:

Quote:
Original post by S1CA
For <= pixel shader 1.4 compile targets, when you specify something as 'float' or 'half' in HLSL, it really gets converted to fixed point format internally (in the device driver when it converts from D3D shader bytecode into native GPU code/set-up and when it uploads/sets constants/state).

You don't lose anything by not being able to explicitly use the 'fixed' data type.

Ok, I imagine it's possible however to choose the type in asm shaders ?


Nope. The 'asm' (and bytecode it assembles into) in Direct3D is actually an intermediate language. The hardware manufacturers device driver translates this intermediate language into its own native microcode (and/or other hardware setup - not all parts of a shader have to turn into actual 'instructions' as such).

If the translation part of the driver thinks that fixed point is more appropriate then it will use fixed point, if not, it won't.

Share this post


Link to post
Share on other sites
Quote:
Original post by S1CA
Using the 'half' data type for intermediate values is only a performance win for older nVidia hardware, though using it in vertex data can be a win on all if you're bandwidth bound.


It still can give you an advantage on GeForce 7xxx.

Share this post


Link to post
Share on other sites
Quote:
Original post by Demirug
Quote:
Original post by S1CA
Using the 'half' data type for intermediate values is only a performance win for older nVidia hardware, though using it in vertex data can be a win on all if you're bandwidth bound.


It still can give you an advantage on GeForce 7xxx.


For the moment, it give me an advantage on my GeForce 6600. But I imagine this is hard to say what might be the real advantage in a next gen game. Specially if this game is cpu limited =) So, I think S1CA is right in this way - and according to his rank of course^^.

Share this post


Link to post
Share on other sites
Quote:
Original post by Woodchuck
Quote:
Original post by Demirug
Quote:
Original post by S1CA
Using the 'half' data type for intermediate values is only a performance win for older nVidia hardware, though using it in vertex data can be a win on all if you're bandwidth bound.


It still can give you an advantage on GeForce 7xxx.


For the moment, it give me an advantage on my GeForce 6600. But I imagine this is hard to say what might be the real advantage in a next gen game. Specially if this game is cpu limited =) So, I think S1CA is right in this way - and according to his rank of course^^.


There's actually no disagreement [smile], I should probably have re-phrased it as:

"Using the 'half' data type for intermediate values is only a performance win for nVidia hardware, this was certainly the case for older nVidia hardware"

Share this post


Link to post
Share on other sites

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