Preventing HLSL compiler unrolling loops with fastopt

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
robmar
Posts: 1125
Joined: Sun Aug 14, 2011 11:30 pm

Preventing HLSL compiler unrolling loops with fastopt

Post by robmar »

When specifying EVST_VS_3_0 shaders, break and fastopt still generate errors.

I´m using the SDK for DX9 from Aug 2005, but I think these features were added in 2009.

Has anyone compliled Irrlicht with the Aug 2009 DX9 SDK release? : http://www.microsoft.com/en-us/download ... x?id=23549
robmar
Posts: 1125
Joined: Sun Aug 14, 2011 11:30 pm

Re: Preventing HLSL compiler unrolling loops with fastopt

Post by robmar »

Does it need a later version of the HLSL compiler to be used, fxc.exe?

One that supports break and fastopt for ps 3?
Granyte
Posts: 849
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: Preventing HLSL compiler unrolling loops with fastopt

Post by Granyte »

I use the aug 2009 DX9 and the real issue with irrlicht is that it use the avoid_flow_control flagg when compiling the shader

in my version I made it detect a specific name to and change those flags when that name is found

but some other technique could be used and compilation flags exposed for good as it's a pain when you encounter a loop that cannot be unrolled with that flagg
robmar
Posts: 1125
Joined: Sun Aug 14, 2011 11:30 pm

Re: Preventing HLSL compiler unrolling loops with fastopt

Post by robmar »

Okay, thanks, that explains it. I had a quick look for that flag but didn´t find it.
Post Reply