JohnH said:
I have repeatedly explained what profiles provide, I really can't be bothered to type it all in again.
No, you have agreed that MS's compiler shouldn't be doing any optimizations since these just complicate the IHV's driver which much redo them anyway.
Therefore, profiles should not influence optimizations from MS's compiler. The compiler should try to preserve as much of the original AST as possible in the IM, that means, using branches for branches, not expanding macros, not doing CSE, or reordering blocks. Too bad the IM can't represent many functions the HW would like to accelerate.
So what's left? Profiles as simply validation tool to ensure your HLSL code "won't break" HW by using too many resources.
Do you really believe you can get away with just using the HLSL compiler to check your shader code statically, without running these shaders on REAL HARDWARE?
So why not simply argue for the use of validation tools that work with the OGL GLSLANG compiler instead?
Here's the developer process for DX:
1) write shader in HLSL
2) try to compile for PS3, PS2, PS1
3) if compiler says you exhausted resources for a particular profile, you add in a new specialized case for that PS version, go back to step 1
4) Now test your shader on hardware 1,2,3 to make sure it works without bugs, and make sure it performs adequately
5) if it's fubar on a particular HW, go back to step one and workaround
Here's the developer process for GLSLANG:
1) write shader in GLSLANG
2) use a validation tool to test shader against IHV compiler driver 1,2,3 for resource exhaustage, bugs, and performance
3) for any HW that fails, go back to step 1
You're trying to argue that MS's compiler will help you avoid actual testing on real HW, at best, it's a "first level check", the profiles themselves won't guarantee anything, as you well know, saying a driver is "DXn compliant" won't remove the need to test,test,test and workaround,workaround,workaround. It sure didn't help Valve. Complain about NV's busted HW all you want, it's got market share, and Valve had to do extra work around it since PS2.0 performed unacceptably on it.
Within 1 to 2 years, I expect most HW to essentially have unlimited shader length and enough registers that it is unlikely resources will ever be exhausted. Even today, it is unlikely you'll exhaust 16 temporaries in most shaders. The focus is going to be on making stuff run fast, not "who's got higher limits", and in that case, DX9's profiles will be in trouble compared to HLSL.
The shader profile concept for syntax and resource checking has a limited lifespan. Profiles have no concept of performance. Your argument would have merit if MS profiles stated required fillrate or instruction dispatch throughput requirements.