My effect file compiles successfully, but FindNextValidTechnique
fails.
Technique part of the shader:
technique Diffuse
{
pass Pass0
{
VertexShader = compile vs_2_0 VertexShaderMain();
PixelShader = compile ps_2_0 PixelShaderMain();
}
}
I try to get the first valid technique after compilation:
pEffect->FindNextValidTechnique(NULL, pValidTechnique);
This returns some minus value which doesn't go along with D3D_OK
.
I've used other flags than D3DCREATE_HARDWARE_VERTEXPROCESSING
to test, but no result with them either.
UPDATE
I've read in documentation that, "Applying Compiler Flags or Assembler Flags to the incorrect API will fail shader validation.", but I'm not sure this applies to the compile time validation or afterwards. I have no problem in compile.
I compile with these flags:
D3DXSHADER_DEBUG |
D3DXSHADER_NO_PRESHADER |
D3DXSHADER_FORCE_VS_SOFTWARE_NOOPT |
D3DXSHADER_FORCE_PS_SOFTWARE_NOOPT
D3DXSHADER_FORCE_VS...
and the other one need REF or software vertex processing to work. I cut them off. – MahanGM Apr 2 '15 at 0:06