There's been some questions raised over the following in our short Half Life 2 Q&A:
Now, the question arose was why do this only for the FX path, and not the general DX path. It transpires that, as far as I can tell, the HLSL compiler hasn't had global updates for GeForce FX's register use, but now contains hints as to which version it should compile to. I was speaking to someone to seek further clarification on this and this was their responce:
Doesn't this seem a bit annoying? It seems as though this is fragmenting the purpose of HLSL somewhat.
Were the Shaders in the benchmark compiled with the latest version of HLSL (i.e. the version that orders the assembly for a more efficient use of the FX's register limitations)?
[Brian Jacobson] The ones used by the mixed mode path were.
Now, the question arose was why do this only for the FX path, and not the general DX path. It transpires that, as far as I can tell, the HLSL compiler hasn't had global updates for GeForce FX's register use, but now contains hints as to which version it should compile to. I was speaking to someone to seek further clarification on this and this was their responce:
The ps_2_x profile for HLSL compiler can take advantage of the additional features available in ps_2_x. ps_2_x serves as a convenient hint for the HLSL compiler to generate code that's optimal for NV3X hardware - since NV3X is the only current HW that has this feature.
If in future, another hardware becomes available that's not based on NV3X architecture and has it's own special optimization quirks - the likely model is that you'll see a new profile. Basically, profiles are also serving as target platform hints
Doesn't this seem a bit annoying? It seems as though this is fragmenting the purpose of HLSL somewhat.