When all of the 500 effects of my test case select a different PS, the application freezes 4.5 seconds and then continues. The overhead appears when DrawIndexedPrimitive or SetPixelShaderConstantF are called.
- I'm not using the multithread flag
- I'm not getting any errors or warning msg
- no help from PIX
- Shaders are compiled when the data is packaged at export time, no compilation at run-time.
- The PS & VS are created at load time, not when needed
So I tried a simpler test case:
All PS are returning a random value -> the app freezes for ~1.5 seconds and the overhead occurs in DrawIndexedPrimitive.
float4 Main( ) : COLOR0
{
float4 returnv = float4(0,0,0,0);
returnv.b += 0.909146; <- random value for each PS
return returnv;
}
The VS is equaly simple and only outputs the projected position.
any help greatly appreciated.
thanks!