DX11 - DX9.3 feature level with SM3?

Started by
6 comments, last by DieterVW 12 years, 10 months ago
I am trying to get some shaders to work in DX11 with the DX9.3 feature level, which I assumed was DX9 with ShaderModel 3.
However, I get the following errors compiling the shader:

error X5608: Compiled shader code uses too many arithmetic instruction slots (712). Max. allowed by the target (ps_2_x) is 512.
(1,1): error X5609: Compiled shader code uses too many instruction slots (816). Max. allowed by the target (ps_2_x) is 512.

So I guess it's compiling to an SM2 pixelshader instead of SM3?

I use .fx files with technique11 techniques, ps_4_0_level_9_3 as profile, fx_5_0 for the effect compile profile, and I double checked the device's feature level.

Has anynone got an idea of what's going wrong here?

Edit: It was also complaining about a texture having mipmaps while not being a power of 2 in size, which is supported for the 9.3 feature level, according to msdn.. Is there any way that DX might be telling me the feature level is 9.3 while it is actually 9.2 or 9.1?
Advertisement
Have you tried to compile it with FXC.exe in the two different shader models, and then compare the assembly listings produced by both of them? That might indicate to you if your shader is ok with SM4 or not...

I am trying to get some shaders to work in DX11 with the DX9.3 feature level, which I assumed was DX9 with ShaderModel 3.
However, I get the following errors compiling the shader:

error X5608: Compiled shader code uses too many arithmetic instruction slots (712). Max. allowed by the target (ps_2_x) is 512.
(1,1): error X5609: Compiled shader code uses too many instruction slots (816). Max. allowed by the target (ps_2_x) is 512.

So I guess it's compiling to an SM2 pixelshader instead of SM3?

I use .fx files with technique11 techniques, ps_4_0_level_9_3 as profile, fx_5_0 for the effect compile profile, and I double checked the device's feature level.

Has anynone got an idea of what's going wrong here?

Edit: It was also complaining about a texture having mipmaps while not being a power of 2 in size, which is supported for the 9.3 feature level, according to msdn.. Is there any way that DX might be telling me the feature level is 9.3 while it is actually 9.2 or 9.1?




D3D11 sadly does not support SM3.0 shaders, feature level 9_3 is SM2. check out the documentation on supported features for feature levels "Overview for each feature level".


David
Oops I see, thanks. That kind of makes the feature levels useless for me though :(.

Oops I see, thanks. That kind of makes the feature levels useless for me though :(.


You could target D3D10, I imagine a lot of people who would have bought the mostly high end cards which supported SM3 well would have upgraded to DX10+ or will do soon...

David

You could target D3D10, I imagine a lot of people who would have bought the mostly high end cards which supported SM3 well would have upgraded to DX10+ or will do soon...

David


Yeah I'm thinking about that, but I've had requests for DX9 hw support, I guess those people will just have to be happy with less fancyness...
This is up there on the 'WTF is Microsoft thinking' chart along with D2D1 not interoping correctly with D3D11.
http://www.gearboxsoftware.com/
The goal is to make feature groupings that cover a reasonable amount of hardware. That's a hard task given that there is such a wide variety of dx9 hardware and given that most of the dx9 features are optional. So yes, there could be a classification of cards that are sm3, but that group of cards would be so small as to be useless to anyone. So instead the feature scope was scaled back so that the classification would cover enough hardware to be meaningful. Of course that means some things like instruction counts didn't get the sm3 value.


So the whole thing will require a lot of referencing of the 10Level9 documentation to use without surprises.

This topic is closed to new replies.

Advertisement