Andrew McDonald
2009-06-17 13:20:54 UTC
According to the HLSL docs for function syntax, the target may be specified
in the storage class element of the definition. However it gives an
incomplete description of how to do this, with no example code. I've never
actually seen this done in any code either.
The following fails to compile under the March 2009 DXSDK:
ps_3_0 float4 main() : COLOR { return 0; }
with "fxc.exe Blah.fx", yielding:
Blah.fx(1,15): error X3089: 'ps_3_0': functions cannot have a target
Are the docs simply wrong on this point? Is there any other way to specify a
compilation target within the file itself? We have files that are supposed
to be compiled to all manner of targets now, and I'd like to reduce the
bloat of multiple massive near-identical custom build rules.
--
Andy
in the storage class element of the definition. However it gives an
incomplete description of how to do this, with no example code. I've never
actually seen this done in any code either.
The following fails to compile under the March 2009 DXSDK:
ps_3_0 float4 main() : COLOR { return 0; }
with "fxc.exe Blah.fx", yielding:
Blah.fx(1,15): error X3089: 'ps_3_0': functions cannot have a target
Are the docs simply wrong on this point? Is there any other way to specify a
compilation target within the file itself? We have files that are supposed
to be compiled to all manner of targets now, and I'd like to reduce the
bloat of multiple massive near-identical custom build rules.
--
Andy